JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris SMB and Windows Interoperability Administration Guide     Oracle Solaris 11 Express 11/10
search filter icon
search icon

Document Information

Preface

1.  Windows Interoperability (Overview)

2.  Identity Mapping Administration (Tasks)

3.  Solaris SMB Server Administration (Tasks)

4.  Solaris 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

How to Customize Your Solaris SMB Environment

Managing SMB Mounts in the Global Environment (Task Map)

How to Mount a Multiuser SMB Share

How to Customize the Global Solaris SMB Environment

How to View the Global Solaris SMB Environment Property Settings

How to Add an Automounter Entry for an SMB Share

How to Delete All SMB Persistent Passwords

Glossary

Index

Managing SMB Mounts in the Global Environment (Task Map)

The following table points to the tasks that superuser can perform to manage SMB mounts.

Task
Description
For Instructions
Mount a share on a public mount point, such as one in the root file system, so that many users can access the share.
Some shares include files and directories that many people on a system might want to access, such as a global set of files or programs. In such cases, instead of each user mounting the share in his own directory, the system administrator can mount the share in a public place so that all users can access the share from the same location.
Customize the global environment by using the sharectl command to set Solaris SMB properties.
User-specified properties override global properties with the exception of security settings.
View the global Solaris SMB property settings by using the sharectl command.
If one property is set with different values in each section, all values are shown.
Add an SMB share to an automounter map.
Use this procedure if you want an SMB share to be automatically mounted at boot time.
Delete all persistent passwords.
Use this procedure if you want to clear all persistent passwords.

How to Mount a Multiuser SMB Share

If you want to make a share available to one or more users on a system, you can mount the share on a mount point anywhere on the system. When you mount a share as superuser, you do not need to own the mount point.

  1. Become an administrator.

    For more information, see How to Obtain Administrative Rights in System Administration Guide: Security Services.

  2. 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
  3. Find the share that you want to mount from a server.
    # smbutil view //server
  4. Specify the password at the prompt.
  5. Determine the mount point that you want to use.

    For example, you decide to mount shares on the /sales-tools mount point.

  6. Perform the mount.
    # mount -F smbfs -o mount-options //[domain;][user[:password]@]server/share mount-point

    For example, to mount the /tmp share from the solarsystem server on the /sales-tools mount point, type:

    # mount -F smbfs -o uid=terry,gid=staff,fileperms=0644 //solarsystem/tmp /sales-tools

    In this example, the mount options enable users other than root to access the share. User terry and users who are members of the staff group can access the share with mode 0644.

    When you mount a share, you can set the uid and gid mount options to specify the user and group owner of the share.

    The values specified by these mount options are used to do the following:

    • Specify the user and group to be used for local access checks. These checks are only used to determine which local users are permitted through the mount point. All other access checks are handled by the server.

    • Determine the UID and GID that appear in file listings when the mounted share does not support “per-file security.” Such shares might be shared CD-ROMs or Windows FAT volumes. Most shares support “per-file security,” so the UID and GID that are shown in directory listings are derived from the file security properties.

How to Customize the Global Solaris SMB Environment

You can customize the global Solaris SMB environment by using the sharectl(1M) command. With the exception of the minauth property, globally set properties can be overridden by a value set in user's .nsmbrc file. The most secure value of the minauth property takes precedence over a less secure value set by the user or set in the global environment.

  1. Become an administrator or use the SMBFS Management RBAC profile, which is part of the File System Management profile.

    For more information, see How to Obtain Administrative Rights in System Administration Guide: Security Services.

  2. Determine which properties you want to set.

    For a description of the properties, see the nsmbrc(4) man page.

  3. Set a property value for the global Solaris SMB environment.
    # sharectl set [-h] [-p property=value] ... smbfs

    For example, to specify a default domain name of SALES for the default section, type:

    # sharectl set -p section=default -p domain=SALES smbfs

How to View the Global Solaris SMB Environment Property Settings

You can view the global Solaris SMB environment property settings by using the sharectl(1M) command.

If you set a value for the same property in more than one section, the sharectl get output includes the section name, property name, and value.

How to Add an Automounter Entry for an SMB Share

You can add an SMB share to an automount map, such as the /etc/auto_direct file, so that the share will be automatically mounted when a user accesses the mount point. You cannot add these automount entries to the /etc/auto_master file.

To successfully use the automount feature, you must store a persistent password for authentication to mount the share. See How to Store an SMB Persistent Password.


Caution

Caution - When a user mounts a remote SMB share by using smbfs, all accesses through that mount, even by other users, are as the user who established the mount.

For shares that will only be used by the owner, you should restrict access to the share by using the dirperms mount option to ensure that only the owner can access the share.


  1. Become an administrator.

    For more information, see How to Obtain Administrative Rights in System Administration Guide: Security Services.

  2. Edit the /etc/auto_master file to refer to the automount map.

    For example, to add automount entries to the /etc/auto_direct file, add the following line to the /etc/auto_master file:

    /-    auto_direct
  3. Edit the automount map to add the mapping.

    The following examples show the changes to the automount map, in this example the /etc/auto_direct file, to configure automount maps.

    • To configure a private automount (a share that will only be accessed by the owner) of the //solarsystem/test share on the /sam-test mount point, create the following entry in the /etc/auto_direct file:

      /sam-test -fstype=smbfs,dirperms=0700,uid=sam //solarsystem/test

      The dirperms=0700 mount option ensures that only the owner can access the share. The uid=sam mount option ensures that the share root and everything in the share is owned by user sam.

    • To configure a public automount of the //solarsystem/public share on the /PUBLIC mount point, create the following entry in the /etc/auto_direct file:

      /PUBLIC -fstype=smbfs //solarsystem/public

      The dirperms=0555 mount option ensures that everyone has read and execute access to the share.

    • To configure a public automount of a share and to specify the password to be used for authentication, create the following entry in the /etc/auto_direct file:

      /PUBLIC -fstype=smbfs //guest:guest@solarsystem/public

      This entry specifies that all access to the //solarsystem/public share is done as the user guest and uses the specified password, which in this example is guest. The dirperms=0777 mount option ensures that everyone has read, write, and execute access to the share.

    • To configure a public automount of a share that can be accessed anonymously, which does not require a password, specify the noprompt option:

      /PUBLIC -noprompt,fstype=smbfs //solarsystem/public

      The noprompt mount option suppresses the prompting for a password when mounting the share. The dirperms=0555 mount option ensures that everyone has read and execute access to the share.

  4. Run the automount command to read the /etc/auto_master file.
    # automount
  5. Access the automounted share.

    The share is automounted when a user accesses the mounted share, such as by using the ls or cd command.

    $ ls /PUBLIC
    bin docs

    After the SMB share is mounted, a user can use regular Oracle Solaris commands to access the files. Automounted shares are automatically unmounted after a period of inactivity.

How to Delete All SMB Persistent Passwords

Use this procedure to delete all of the persistent passwords that are used to authenticate SMB transactions.

If you only want to delete the persistent passwords for a particular user, see How to Delete an SMB Persistent Password.

  1. Become an administrator.

    For more information, see How to Obtain Administrative Rights in System Administration Guide: Security Services.

  2. Delete all of the persistent passwords.
    # smbutil logoutall

    After the persistent passwords are deleted, each time a user performs a transaction with an SMB server, he is prompted for his password.