Skip Navigation Links | |
Exit Print View | |
Managing SMB File Sharing and Windows Interoperability in Oracle Solaris 11.1 Oracle Solaris 11.1 Information Library |
1. Sharing Files Between Windows and Oracle Solaris Systems
2. Setting Up Identity Mapping Between Windows and Oracle Solaris Systems
3. Setting Up a Oracle Solaris SMB Server to Manage and Share Files
4. Using SMB File Sharing on Client Systems
Managing SMB Mounts in Your Local Environment (Task Map)
How to Find Available SMB Shares on a Known File Server
How to Mount an SMB Share on a Directory You Own
How to View the List of Mounted SMB Shares
How to Unmount an SMB Share From a Directory You Own
How to Store an SMB Persistent Password
How to Configure the PAM Module to Store an SMB Persistent Password
Managing SMB Mounts in the Global Environment (Task Map)
How to Mount a Multiuser SMB Share
How to Customize the SMB Environment in Oracle Solaris
How to View the SMB Environment Property Values
How to Add an Automounter Entry for an SMB Share
Troubleshooting the SMB Client
Viewing SMB Client Property Settings
Access Denied Message When Accessing a Server
Cannot View or Mount SMB Shares
Cannot Mount SMB Shares as a Regular User
The following table points to the tasks that a regular user can perform to manage SMB mounts.
|
If you are not familiar with the SMB file servers available in your domain, contact your system administrator. You might be able to use Network Neighborhood on Windows systems or the GNOME file browser to browse for available SMB shares.
$ smbadm show-shares [-A | -u username] [-t] server
The -A option enables you to view shares anonymously. You are not prompted for a password. The -u username option indicates the user to authenticate on the specified SMB server. The -t option shows a heading for the output. If neither the -A nor the -u option is specified, the user that is running the command is authenticated on the SMB server.
If you specified the -A option to view shares anonymously, you are not prompted for a password.
If you did not specify a user, enter the password associated with your user name.
The smbadm show-shares -t output shows the name of the share and an optional text description of the share.
For example, the following command shows how to view the shares on the solarsystem server:
$ smbadm show-shares -t solarsystem Enter password: SHARE DESCRIPTION netlogon Network Logon Service ipc$ Service (Samba Server) tmp Temporary file space public Public Stuff ethereal root Home Directories 6 shares (total=6, read=6)
The following command enables you to anonymously view the shares on the solarsystem server:
$ smbadm show-shares -A solarsystem
Note - If you own the directory on which you want to mount a share, you can perform the mount operation yourself. If you do not own the directory, you must perform the mount operation as the owner of the directory or as superuser.
$ svcs network/smb/client STATE STIME FMRI online 19:24:36 svc:/network/smb/client:default
This service is enabled by default, so the usual state for the service is online. To enable the service, type the following command:
$ svcadm enable -r network/smb/client
$ smbadm show-shares [-A | -u username] [-t] server
The -A option enables you to view shares anonymously. You are not prompted for a password. The -u username option indicates the user to authenticate on the specified SMB server. The -t option shows a heading for the output. If neither the -A nor the -u option is specified, the user that is running the command is authenticated on the SMB server.
$ mkdir mount-point
For example, to create a mount point called /tmp/mnt, type:
$ mkdir /tmp/mnt
$ mount -F smbfs [-o user=username,domain=domain-name,...] //server/share mount-point
For example, to mount the tmp share from the solarsystem server on the /tmp/mnt mount point, type:
$ mount -F smbfs //solarsystem/tmp /tmp/mnt
This procedure shows how to list all of the SMB shares that are mounted on your system. The resulting list includes your mounts, other users' mounts, and multiuser mounts created by the system administrator.
Use one of the following commands to list the mounted SMB shares:
$ mount -v | grep 'type smbfs' //solarsystem/tmp on /mnt type smbfs read/write/setuid/devices/dev=5080000 on Tue Mar 29 11:40:18 2011 //solarsystem/files on /files type smbfs read/write/setuid/devices/dev=4800000 on Mon Mar 28 22:17:56 2011
Note that the mount command includes information about the mount options specified at mount time.
$ df -k -F smbfs //solarsystem/tmp 1871312 70864 1800448 4% /mnt //solarsystem/files 8067749 8017 7979055 1% /files
To successfully unmount a share, you must own the mount point on which the share is mounted.
Use one of the following commands to find shares that are mounted from an SMB server:
$ mount -v | grep 'type smbfs' //solarsystem/tmp on /mnt type smbfs read/write/setuid/devices/dev=5080000 on Tue Mar 29 11:40:18 2011 //solarsystem/files on /files type smbfs read/write/setuid/devices/dev=4800000 on Mon Mar 28 22:17:56 2011
$ df -k -F smbfs //solarsystem/tmp 1871312 70864 1800448 4% /mnt //solarsystem/files 8067749 8017 7979055 1% /files
For example:
$ umount /mnt
Interactions with an SMB file server require authentication. For instance, when you view the shares available on a server or you try to mount a share on your system, the transaction is authenticated.
Note - A persistent password is not needed when Kerberos is configured on the client and server and you have a Kerberos ticket-granting ticket (TGT). In such configurations, you can view and mount shares without specifying a password.
You can supply the password each time that you make a connection to the server, or you can store a persistent password to be automatically used for these transactions.
Note - You can store a persistent password for each user on the SMB server that you use to access shares.
The password you store persists until the smbadm remove-key command is run for the user.
$ smbadm add-key [-u username]
You can specify the user name as one of the following name types:
An isolated name can be a single label, such as terry, or a user principal name (UPN), such as terry@example.com.
A composite name includes the domain name, which can be a host name. A composite name uses one of these formats: domain\username, domain/username, or username@domain.
The following command stores the persistent password for terry@solarsystem. Each time Terry performs a transaction with solarsystem, the persistent password is used to perform the authentication.
$ smbadm add-key -u terry@solarsystem Password for SOLARSYSTEM/terry:
When installed, the pam_smbfs_login.so.1 module enables you to store a persistent password as if you had run the smbadm add-key command for PAM_USER in the user's or system's default domain.
This optional functionality is meant to be used only in environments that do not run AD or Kerberos, but which synchronize passwords between Oracle Solaris clients and their SMB servers.
For more information, see the pam_smbfs_login(5) man page.
Add the following line to the end of the /etc/pam.d/login file:
auth optional pam_smbfs_login.so.1
This action adds a persistent password entry as if you had run the smbadm add-key command.
Note - The PAM module implements a privilege to permit it to run as superuser to store your password.
Use this procedure to delete persistent passwords that are stored by the smbadm add-key command.
$ smbadm remove-key -u username
For example, the following command removes the persistent password for terry@solarsystem:
$ smbadm remove-key -u terry@solarsystem
$ smbadm remove-key
For example, when user dana runs the command, he removes all of the persistent passwords that he created. After the passwords are deleted, the user is prompted for a password each time that he or she performs an SMB transaction.