JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Administration: SMB and Windows Interoperability     Oracle Solaris 11 Information Library
search filter icon
search icon

Document Information

Preface

1.  Windows Interoperability (Overview)

2.  Identity Mapping Administration (Tasks)

3.  SMB Server Administration (Tasks)

4.  SMB Client Administration (Tasks)

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

How to Delete 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

A.  SMB DTrace Provider

Glossary

Index

Managing SMB Mounts in Your Local Environment (Task Map)

The following table points to the tasks that a regular user can perform to manage SMB mounts.

Task
Description
For Instructions
Join your SMB client to an Active Directory (AD) domain.
You can use the kclient command to join your SMB client to an AD domain.
Find the shares that are available on an SMB server in your domain.
From a particular SMB server, view the shares that you can mount on a directory that you own.
Mount an SMB share on a directory that you own.
Use the mount command to mount the share on a mount point that you own.
View the list of SMB shares that are mounted on the system.
View the list of mounted SMB shares.
Unmount an SMB share from a directory that you own.
When you no longer need access to an SMB share, you can unmount it.
Store a persistent password to be used for authentication.
When you store a persistent password, you can bypass the manual authentication required each time that you want to mount a share from the specified server.
Use a PAM module to store a persistent password to be used for authentication.
Use this optional functionality only in environments that do not run AD or Kerberos, but which synchronize passwords between Oracle Solaris clients and their SMB servers.
Delete a persistent password.
If you no longer want to store a persistent password, delete it.

How to Find Available SMB Shares on a Known File Server

  1. Determine the server that you want to query about available shares.

    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.

  2. List the available SMB shares on a server.
    $ 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.

  3. When prompted, enter the password for the user that you specified 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.

  4. View the list of available SMB shares.

    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

How to Mount an SMB Share on a Directory You Own


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.


  1. Verify that the network/smb/client service is enabled.
    $ 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
  2. Find the share that you want to mount from a server.
    $ 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.

  3. Enter your password at the prompt.
  4. Create a mount point on which to mount the share.
    $ mkdir mount-point

    For example, to create a mount point called /tmp/mnt, type:

    $ mkdir /tmp/mnt
  5. Perform the mount on your directory.
    $ 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

How to View the List of Mounted SMB Shares

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.

How to Unmount an SMB Share From a Directory You Own

To successfully unmount a share, you must own the mount point on which the share is mounted.

  1. Determine the mount point of the share that you want to unmount.

    Use one of the following commands to find shares that are mounted from an SMB server:

    • Use the mount command.
      $ 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
    • Use the df -k -F smbfs command.
      $ df -k -F smbfs
      //solarsystem/tmp      1871312   70864 1800448     4%    /mnt
      //solarsystem/files    8067749    8017 7979055     1%    /files
  2. Unmount the share by specifying the name of the mount point, /mnt or /files in the previous step.

    For example:

    $ umount /mnt

How to Store an SMB Persistent Password

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.

How to Configure the PAM Module to Store an SMB Persistent Password

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.

How to Delete an SMB Persistent Password

Use this procedure to delete persistent passwords that are stored by the smbadm add-key command.