6.2 Using the Command Line to Manage CIFS

Command line utilities are available to control the CIFS services. The main activities for CIFS services are described in this section. For information about specific CIFS commands, see Section A.0, Command Line Utility for CIFS or enter man novcifs at the command prompt.

6.2.1 Starting CIFS

Use the rcnovell-cifs start command to start CIFS.

NOTE:If a Samba server is running, CIFS does not start. To resolve this problem, see Section 11.1.1, CIFS Does Not Start If Samba is Running.

6.2.2 Stopping CIFS

Use the rcnovell-cifs stop command to stop CIFS.

6.2.3 Restarting CIFS

Use the rcnovell-cifs restart command to restart CIFS.

6.2.4 Monitoring CIFS

Use the rcnovell-cifs monitor command to monitor the status of the CIFS server.

If the CIFS server is not running, the monitor script starts the CIFS server and returns the status.

6.2.5 Modifying the CIFS Configuration

The configuration settings are taken directly from the CIFS iManager settings. The recommended method to modify CIFS configuration is using iManager. For details, see Section 6.1, Using iManager to Manage CIFS.

To edit the CIFS configuration from command line:

  1. Use any text editor to open the cifs.conf file from the /etc/opt/novell/cifs/ directory.

    IMPORTANT:We recommend that you do not change the default settings in this file.

  2. Use the following information to change the configuration:

    • In the AUTHENT section, set the mode to either local or domain. Local is preferred. For example, -AUTHENT local.

      IMPORTANT:A domain mode is a third-party domain. For this mode, a Windows domain controller performs user authentication. A local mode is an eDirectory mode. For this mode, the server running CIFS services performs the user authentication.

    • In the COMMENT section, specify an appropriate user comment to associate with the server.

    • In the DOMAIN / WORKGROUP section, specify the Windows domain name for third-party domains and workgroup for the local option.

    • Leave the OPLOCKS [yes/no] set to yes.

    • Leave the UNICODE [yes/no] set to yes.

    • In the -PDC [PDC_NAME] [PDC_IP_ADDR] section, specify the PDC name and IP address.

    • In the -WINS [WINS_IP_ADDR] section, specify the WINS IP address. Set this if the PDC and the server running CIFS are on different subnets.

    • In the -SUBNET [subnet] section, specify the subnet value, if required.

  3. Restart the CIFS server by using the rcnovell-cifs restart command in order for the configuration changes to take effect.

6.2.6 Anonymous Login for CIFS

Anonymous login for CIFS can be used to map to the CIFS share without a user name and password.

If a user attempts to log in to a CIFS server with a user name that does not exist in eDirectory, he or she will be logged in as a guest user. The guest user will be granted rights applicable for a Public Trustee.

The anonymous configuration is set at the server level, so the anonymous login settings affect all CIFS shares on the server.

Setting Anonymous Login

To set anonymous login, use the following command:

novcifs -e [yes/no]

The CIFS connections logged in as an anonymous user have privileges on the NSS volumes assigned to the Public trustee. The Public trustee rights can be set on any folder in an NSS volume by using the Novell Client. For more information, see the Novell Client for Linux documentation.

If you don’t have the Novell Client installed, you can use iManager to add Public trustee rights. For more information, see Viewing, Adding, or Removing File System Trustees in the OES 11 SP3: File Systems Management Guide.

Anonymous Login in a Cluster

In a cluster setup, anonymous login must be configured on every node and must be set to the same configuration level for consistent behavior across all shares.

This needs to be done for all CIFS server parameters except for server name, server comment, and shares.

IMPORTANT:When you provide supervisor rights to public objects, it allows access to all secured folders. For security considerations, do not provide supervisor rights to the public objects.

6.2.7 Working with CIFS Shares

CIFS sharepoints can be added, removed, and displayed by using the command line interface or server console. CIFS shares cannot be added to a virtual server object using the command line (novcifs). If the shares are added on a cluster resource using the command line, then all the shares are lost if the resource leaves that node.

NOTE:Whenever a CIFS service is restarted on a node (node A) that hosts a cluster resource, the resource must be moved offline. It must then be available online or migrated to another node (node B) and brought back to the original node (node A) so that rebinding occurs.

You can view details about how CIFS shares are listed and configured by using any of the following commands at the server console or prompt:

To manage CIFS shares using iManager, see Section 6.1.4, Managing CIFS Shares.

To manage CIFS shares using the console, see the following sections:

6.2.8 Configuring the CIFS Context Search File

Do not modify the CIFS Context Search file directly in a text editor. You should use iManager to configure the search context. For information, see Section 6.1.5, Configuring a CIFS User Context.

To edit the CIFS Context Search File:

  1. Open the /etc/opt/novell/cifs/cifsctxs.conf file in a text editor.

  2. Specify the context to be added, in dot format, for example, ou=fa-testing.o=novell

  3. Save the file.