Solaris CIFS Administration Guide
Previous Next

Utilities and Files Associated With the Solaris CIFS Server and Client

This section describes the CIFS utilities and files that are used by the CIFS service and client.


Note - The Solaris CIFS service is only supported in the global zone.


Solaris CIFS Utilities

These utilities must be run as superuser or with specific privileges to be fully effective, but requests for information can be made by all users:

mount_smbfs Command

With this command, you can attach a named CIFS share to a specified mount point. The mount_smbfs command enables you to mount a CIFS share to a directory you own without having to become superuser.

For more information, see the following:

Also, see the mount_smbfs(1M) man page.

sharectl Command

The sharectl utility is an administrative tool that enables you to configure and manage file-sharing protocols, such as CIFS and NFS. You can use this command to do the following:

  • Set client and server operational properties

  • Display property values for a specific protocol

  • Obtain the status of a protocol

For procedures that use the sharectl utility, see the following:

Also, see the sharectl(1M) man page.

sharemgr Command

The sharemgr utility is an administrative tool that provides an enhanced method of sharing files and performing related tasks. The sharemgr utility introduces the following concepts:

  • Share. One or more files or directories in a share group.

  • Share group. A container of one or more shared files or directories.

    Note the following:

    • Options for sharemgr are set to a share group, not to a specific file or directory. All options apply to each file and directory in the group.

    • A file or directory can only be assigned to one share group. However, you can move a file or directory from one group to another.

    • A share group can be used by multiple file system types. For example, the share group my_group could be used by NFS and ZFS and be assigned one set of options for NFS and another set of options for ZFS.


      Note - When a share is managed by ZFS, sharemgr identifies the share and lists it in a zfs share group.



Note - The sharemgr utility provides a unique way of checking the validity of a desired configuration. The -n option allows you to test the validity of the options and properties you want to use with a specific subcommand. The test does not change your configuration. For example, if you use the -n option with the subcommand create, no share group is created.


You can also use the ZFS sharesmb property to configure SMB sharing. For more information, see How to Create a CIFS Share (zfs) and the zfs(1M) and zpool(1M) man pages.

For procedures that use the sharemgr utility, see the following:

Also, see the sharemgr(1M) man page.

smbadm Command

You can use the smbadm command to manage domain membership of the Solaris CIFS service. For instance, you can have the Solaris CIFS service use domain mode or workgroup mode. The smbadm command also enables you to configure CIFS local groups. CIFS local groups can be used when Windows accounts must be members of some local groups and when Windows-style privileges must be granted. Solaris local groups cannot provide these functionalities.

For procedures that use the smbadm utility, see the following:

Also, see the smbadm(1M) man page.

smbstat Command

You can use the smbstat command to show statistical information about the smbd server. By default, the smbstat command shows general information about the CIFS service as well as dispatched CIFS request counters. For more information, see the smbstat(1M) man page.

The kstat command can be used to report on kernel CIFS statistics on a periodic basis and also to specify information about individual CIFS statistics. For more information, see the kstat(1M) man page.

smbutil Command

Use the smbutil command to perform the following CIFS client tasks:

  • View the shares available for mounting from a particular CIFS server

  • Generate a hash of a password for storing in a file such as $HOME/.nsmbrc

  • Create or remove persistent passwords used to authenticate to CIFS servers

  • Resolve a name to an IP address for a server that uses CIFS over NetBIOS, not TCP

  • Resolve the specified server to the NetBIOS workgroup and system name

For procedures that use the smbutil utility, see the following:

Also, see the smbutil(1) man page.

umount_smbfs Command

With this command, you can remove a named CIFS share from a mount point.

For more information, see How to Unmount a Share From a Directory You Own, and the mount_smbfs(1M) man page.

Solaris CIFS Service Daemon

The smbd daemon supports CIFS activities on Solaris systems. The smbd daemon provides the gateway to the various user space components that support non-file I/O CIFS services. Similar to the NFS kernel service, the SMB kernel module provides SMB file I/O services directly between the network interface and the virtual file system (VFS) within the kernel. Whenever a non-file I/O request is received, such as a user authentication or an MS-RPC named pipe request, it is passed to smbd for processing in user space. Requests that require interaction with a domain controller are passed to the SMB Redirector, which provides a simple user space SMB client for IPC communication.

The smbd daemon depends on the idmapd daemon. For more information about the identity mapping service, see Chapter 2, Identity Mapping Administration (Tasks), and the idmap(1M) and idmapd(1M) man pages.

smbd is part of the svc:/network/smb/server:default service.

For more information, see the smbd(1M) man page.

Solaris CIFS Files

The following files support CIFS activities on any computer:

  • /etc/auto_direct

  • /etc/smbautohome

  • $HOME/.nsmbrc

/etc/auto_direct File

Use the /etc/auto_direct file to automatically mount a CIFS share when a user accesses the mount point. To use the automount feature, you must store a persistent password for authentication to mount the share. See How to Store a Persistent Password.

For instructions and examples, see How to Add a Direct Automounter Entry for a CIFS Share.

/etc/smbautohome File

The /etc/smbautohome file is used to define the automatic sharing rules to be applied when a user connects to the Solaris CIFS service. For more information, see Autohome Shares and the smbautohome(4) man page.

$HOME/.nsmbrc File

You can use the $HOME/.nsmbrc file to override global behavior of the Solaris CIFS client. Global values are set in the Service Management Facility (SMF). The .nsmbrc file is used to customize the behavior of the Solaris CIFS client on a per-user basis.

By default, settings in the $HOME/.nsmbrc file are used unless they have security implications, in which case the stronger security setting is used.

For procedures that refer to the $HOME/.nsmbrc file, see the following:

Also, see the nsmbrc(4) man page.

Previous Next