Enabling and configuring SAMBA as shipped with Solaris 10

Sun ships SAMBA with Solaris 9 & Solaris 10 and it is supported as part of the Operating System. I recently completed a project with Symantec Enterprise Vault and Sun StorageTek Storage Archive Manager (aka SAM-FS) which required me to do some work with SAMBA for the first time.

My requirement was to use SAMBA to give a server running Microsoft Windows Server 2003 and Symantec Enterprise Vault access to a SAM-FS file system on a Sun server running Solaris 10. The good news is that it does all work correctly and that it performed well. As a result, this configuration is now supported by Symantec.

Initially I struggled with SAMBA and looked at many web sites and docs before I worked out how to set it up. In the end it was simple and the object of this blog entry is to explain how to set up a basic SAMBA server installation on Solaris.

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.

From the server running Microsoft Windows I was then able to map the share \\\\servername\\vaultstores to a drive and create and delete files and directories. I then looked on the SAMBA server and confirmed that the file were created with the correct ownership, which they were.

So far as SAMBA performance tuning goes, I tried various configuration options, but in the end I used the default socket option settings, hence no custom settings for this in my smb.conf file. I found that these gave the best performance. I was fortunate in being able to get advice on this topic from Jeremy Allison who has been involved with SAMBA for years.

Note that the version of SAMBA that Sun provides at the time of writing this does not support Active Directory Services (ADS), a frequently asked for feature. Sun will ship a later version of SAMBA with support for ADS as part of a future release of Solaris 10. In the meantime, you can build your own version of SAMBA with this feature using the packages and sources at Sunfreeware.com but unfortunately the custom SAMBA build would not be supported by Sun.

For information and documentation on SAMBA go to samba.org.

If you would like to know how to configure SWAT, the SAMBA Web Administration Tool, I have written a blog entry on that here.


Hi Tim, as a simple user on a netra 1, I took a lot of time to get "samba on SPARC/Solaris 10" working. Your blog was very useful ;-) Thanx a lot from Aachen, Germany. Roland

Posted by Roland Kirschning on June 26, 2007 at 08:54 AM BST #

Hi, Just like to tell you that this piece of info is one quick to the point, no nonsense, workable and effective way to have directories shared in Solaris as fast as possible. It worked for me and thank you for the effort. Keep up the good work.

Posted by Max on July 05, 2007 at 09:26 AM BST #

Tim, Just a few words of Thanks for a such a nice work. You got it right, short and to the point. I got my shares up and running in no time. Thanks, Ion / Canada

Posted by Ion Ciobanu on July 07, 2007 at 10:48 AM BST #

Fantastic, straight to the point and very usable ... wish all documentation was the same . ;-)

Posted by Danny Mohar on July 27, 2007 at 01:11 AM BST #

Thank you for making it so simple. You made my day!

Posted by Walter Stavreff on September 18, 2007 at 06:10 PM BST #

Hi Tim, I noticed performance problems with Sun's samba build on S10U4. On 100 Mbit network - 700 MB file over samba was copied about 5-6 min. and over FTP just 1:46 min.
Do you know anything about this? Can I resolve this problem with build my own samba from sources?

Thanks in advance

Posted by Michal Zila on September 29, 2007 at 09:46 AM BST #

Hi Michal. I don't have any advice on this. You best log a support call with Sun or you could post a query on www.opensolaris.org. Rgds, Tim

Posted by Tim Thomas on September 30, 2007 at 09:54 AM BST #

Mea culpa - log level=10 in smb.conf :-))

Posted by Michal Zila on September 30, 2007 at 11:29 AM BST #

Hi. Thanks for the notes on samba. I am getting the following error when I connect from my XP PC on a samba share:

"The network path was not found"

Is this a problem with samba config or XP?


Posted by JT on November 08, 2007 at 02:07 AM GMT #

Hi JT. It means that XP cannot see the share. It is probably a network problem or you smb.conf file has an error in it. Rgds, Tim

Posted by Tim Thomas on November 09, 2007 at 06:14 AM GMT #

well when i tried to configure smba - everything went fine ... but when clicked on the icon of UNIX SERVER from WIN xp - got an error stating that I do not have access permission and shld contact administartor of that server ..
also i was not able to fin anywhere smbclent and smbpasswd files on my pc .. so touched them at the proper location but was not able to configure them properluy.. can any one tell me wat to add in those file to make xp access unix

Posted by harneet on January 19, 2008 at 08:56 AM GMT #

perfect work, i had my samba running,Thanks from Austria

Posted by Gregor on December 27, 2008 at 07:33 PM GMT #

Post a Comment:
Comments are closed for this entry.

Tim Thomas


« July 2016