Setting up an SMB share from Solaris

My Environment

SMB Server: blackhole.dfusion.com.au (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.

Documents


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

Steps

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:
on
Just turns SMB on with defaults
off
Disable SMB sharing. To just remove any settings for a specific share
name=share_name
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 '_')
rw[=opts]
read/write access. Default is rw for everyone. Refer man page. eg
ro[=opts]
read only access (to all if specified, else just to specified list


Example
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=()
zfs
    /tank/backup
           backup=/tank/backup	 smb=(rw="@192.168")




The original document is available at http://dfusion.com.au/wiki/tiki-index.php?page=Setting+up+an+SMB+share+from+Solaris