Basic Samba Configuration on Solaris 10
Here’s a sample process for installing and configuring a basic Samba server on Solaris 10.
Use the Solaris 10 installation DVD or download Solaris 10 installation DVD ISO. If you are using the ISO file, here’s how to mount it:
mkdir /mnt/dvd ; mount -F hsfs -o ro `lofiadm -a /path/to/sol-10-u11-ga-sparc-dvd.iso ` /mnt/dvd
For the sake of convenience, you can create the “mountiso” command:
mkdir -p /var/adm/bin cat << EOF > /var/adm/bin/mountiso.sh #!/bin/ksh if [ -f $1 ] && [ -d $2 ] then mkdir -p "$2" mount -F hsfs -o ro `lofiadm -a $1` $2 else echo "Usage: mountiso /path/file.iso /mnt/mountpoint" fi EOF chmod 755 /var/adm/bin/mountiso.sh
Create a symbolic link to the script:
ln -s /var/adm/bin/mountiso.sh /usr/bin/mountiso
And use it like so:
mountiso /path/to/sol-10-u11-ga-sparc-dvd.iso /mnt/dvd
Install additional packages required to run a Samba server:
for i in SUNWlibpopt SUNWsmbaS SUNWsmbac SUNWsmbar SUNWsmbau ; do echo y | pkgadd -d /mnt/dvd/Solaris_10/Product $i ; done
Create a baseline /etc/samba/smb.conf
mkdir -p /etc/samba ; chmod 666 /etc/samba ; mkdir -p /nfsshare cat << EOF > /etc/samba/smb.conf [global] workgroup = SMBFS server string = `hostname` CIFS Server log file = /var/adm/samba_log.%m security = SHARE [nfsshare] comment = nfsshare path = /nfsshare force user = root force group = root read only = No guest ok = Yes EOF
In this example, the /nfsshare path with will be shared to all users with full access. This level of access should only be used for testing and disabled afterwards.
Enable Samba server and verify functionality:
svcadm enable samba wins svcs samba wins
root@nfsmaster# svcs samba wins STATE STIME FMRI online Aug_15 svc:/network/wins:default online Aug_15 svc:/network/samba:default
Try to connect to the share from Windows: //`hostname`/nfsshare