The below is correct for Solaris 9 and Solaris 10 up to Solaris 10 Update 3 (11/06). If you are running Solaris 10 Update 4 (8/07) then the version of SAMBA is 3.0.25a, the patches are not applicable and the way that you stop and start SAMBA has changed: look at this blog entry for notes on that.

  1. Make sure that /usr/sfw/bin and /usr/sfw/sbin are on the root user's path.

  2. Check you have the latest version of SAMBA installed:

    root# /usr/sfw/sbin/smbd -V
    Version 3.0.21b

    This is the most recent version supported by Sun at this time. If you find you have an older version than the above then you should patch the system. The latest patch for SAMBA on Solaris 10 SPARC is 119757-04 and Solaris 10 x86 is 119758-04. If you have access to Sunsolve then Sun InfoDoc 80581 talks about this some more.

  3. By default, all files create by the windows server in the Solaris directories shared by SAMBA will be owned by user nobody. If you want to change this then you can force the ownership to another user. I created a user evault in group other for this purpose. Make sure that the user you choose has permission to write to the directories in the file systems that you are sharing with SAMBA. You can use the user root if you wish.

  4. Create an entry in the SAMBA user database for the user with the below command:

    root# smbpasswd -a evault

  5. Create the file /etc/sfw/smb.conf. Below is the /etc/sfw/smb.conf that I used. The SAM-FS file system was mounted as /ev_test and vaultstores was the subdirectory I wanted to share.

      workgroup = EV-SAMFS
      server string = Samba Server
      log file = /var/adm/samba_log.%m
      security = SHARE
      comment = vaultstores
      path = /ev_test/vaultstores
      force user = evault
      force group = other
      read only = No
      guest ok = Yes

    It is not obvious, but the share is defined in the square brackets and is "vaultstores" in this case.

    Note that once the file /etc/sfw/smb.conf exists SAMBA will start automatically when the system boots.

  6. You should check the syntax of /etc/sfw/smb.conf using the command testparm. Assuming that all is well you can start SAMBA.

    root# /etc/init.d/samba start

    This returns silently. If you are paranoid, like me, check to see that smbd is running. If you are running Solaris 10 Update 4 (8/07) or later this step has changed: look at this blog entry for notes on that.