OpenSolaris – Migrating from samba to cifs

OpenSolaris 2008.11 has a cifs/smb server built into the kernel. From what i have been reading (and discovering) this is a much more efficient and faster way to get your files out into the network.

Previously i have run a dedicated samba service to share my files as I’ve come from various linux distros which require it. Seems i should be doing things differently on OpenSolaris.

The dedicated samba service is called;


The new kernel embedded solaris smb/cifs service is called;


If you do not have it running or installed you’ll need to add the following packages (use package manager); 



Update : both these packages are called SUNWsmbfs in newer builds

Enable the service via “services” gui else use the svcadm command; 

svcadm enable svc:/network/smb/server:default

This is a great page on how to do a basic cifs setup

I just need to find a bit more detail on how to configure access to the shares (update: see below). In another post i made previously using samba it was easy enough to restrict guests to read only while giving some users rw access… I’m also interested in whether its possible to backup or manually configure the cifs server via any config file? Still looking into this one.

First step is to disable the samba service and enable the solaris smb/cifs service;

svcadm disable network/samba

svcadm enable -r smb/server – the “r” switch also enables all services that smb requires.

The next step is to add the following line to your /etc/pam.conf file. This is so future changes to passwords  also update the smb password file;

other   password required     nowarn

now set the name of the workgroup…

smbadm join -w workgroup

now setup your users (you have to reset your current passwords to update the password file above). I usually create and use a “Guest” account to keep some windows boxes happy. I set the guest account password to blank… 

useradd guest

passwd guest – then enter twice to enter a blank password

Next its time to setup the actual shares. If you have a zfs pool setup (you most likey do if you are running opensolaris) then you can share your data via the zfs command like so….   (i have a “backups” zfs file system within a “unprotected” zpool)

zfs set sharesmb=on unprotected/backups

Unfortunately this creates a share called “unprotected_backups” which can be seen via the sharemgr show -vp command. To rename the share to something more appropriate do the following…

zfs set sharesmb=name=backups unprotected/backups

All going well the share should now be called “backups”, if you have both the old and new name listed restart the smb server : svcadm restart smb/server

From your windows machine you should be able to browse to your share via \\servername\backups, if you get a prompt then type “guest” and press enter. Here is an example of a quick and easy way to mount drives via an XP commandline…

net use * \\serverip\backups /user:guest

Update: i have figured out the ACLs for cifs — See this Post

5 thoughts on “OpenSolaris – Migrating from samba to cifs

  1. Pingback: OpenSolaris cifs/smb server - configuring ACL’s on shares | Daz's bits and bobs

  2. I struggled a little bit to get this working. My solution was to enable the client service as well (svcadm enable -r network/smb/client). Once I enabled the client, the server started with no problems.
    # svcs | grep smb
    online 20:10:25 svc:/network/smb/client:default
    online 20:11:00 svc:/network/smb/server:default

  3. Hmm… weird. I definitely do not have the client running; (just checked in case)

    # svcs -a | grep smb
    disabled Apr_09 svc:/network/smb/client:default
    online Apr_22 svc:/network/smb/server:default

  4. Posting as a follow up in case someone else finds this (very helpful) blog. I disabled the client and I can still connect to the share. I haven’t restarted, though.

  5. I’m eternally grateful for your *succinct* how-to. Worked like a charm to get my zpool online with opensolaris’ smbkr. My first try, I managed to pooch my Solaris install (couldn’t even commit passwd changes for user accounts while su’d!) Wish I could *bump* your PageRank for this! ;-)

    Now, for benchmarking!

Leave a Reply

Your email address will not be published.