Setting up an SMB share from Solaris

My Environment

SMB Server: (Solaris 10 – specifically 5.11, NexentaOS_20090926)
Client: Apple OS X Leopard (10.5.8)

Server Configuration

Prior to Solaris 10, Samba was only available as an add-on Open Source package.
Starting with Solaris 10, SMB ability is built into the OS.
This page only covers Solaris 10.


For my purposes SMB == SMBFS == Samba == CIFS


1) Check is SMB is running on the server:
svcs |grep smb
online         Nov_16   svc:/network/smb/client:default
online         Nov_16   svc:/network/smb/server:default

If not use svcadm enable ... to start the server at least.

2)Export a share with options
For non ZFS I assume the relevant command is:
share -F smbfs -o OPTIONS FILESYSTEM
For ZFS the command is:
zfs set sharesmb=OPTIONS FILESYSTEM
Or one can use sharemgr

where OPTIONS is the same in both cases. See the Sun administration guide for options.

The options of immediate interest are:
Just turns SMB on with defaults
Disable SMB sharing. To just remove any settings for a specific share
What the share appears as to clients. Eg a client's URI would be smb:// server/share_name. Default name for tank/backup is tank_backup (ie '/' replaced by '_')
read/write access. Default is rw for everyone. Refer man page. eg
read only access (to all if specified, else just to specified list

zfs get sharesmb     # to see the current state of play

zfs set sharesmb=name=backup,rw=@192.168 tank/backup

zfs get sharesmb [[tank/backup]    # to see the changes
NAME         PROPERTY  VALUE                    SOURCE
tank/backup  sharesmb  name=backup,rw=@192.168  local

sharemgr show -vp     # another way to show what is actually shared
default nfs=()
           backup=/tank/backup	 smb=(rw="@192.168")

The original document is available at