Setting up CIFS Sharing on Solaris 11.3 (and connecting with windows)

Some facts:
hostname : solaris11
username : john
poolname : rpool/export/archive
mountpnt : /archive
share    : archive
workgroup: compnect

On solaris

Install SMB server package

root@solaris11:~# pkg install service/file-system/smb
Packages to install:   1
Services to change:   1
Create boot environment:  No
Create backup boot environment: Yes

DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                                1/1         29/29      0.7/0.7  297k/s

PHASE                                          ITEMS
Installing new actions                         84/84
Updating package state database                 Done
Updating package cache                           0/0
Updating image state                            Done
Creating fast lookup database                   Done
Updating package cache                           1/1

Create the dataset you want to share:

root@solaris11:~# zfs create rpool\export\archive

Create the name of the share (what the outside world sees):

root@solaris11:~# zfs set share=name=archive,path=/export/archive,prot=smb rpool/export/archive

turn on sharing in ZFS:

root@solaris11:~# zfs set sharesmb=on rpool/export/archive

Set permissions (don’t worry PAM will handle access)
root@solaris11:~# chmod 777 /export/archive

Turn on the SMB server:

root@solaris11:~# svcadm enable -r smb/server

Check that the share is active:

root@solaris11:~# smbadm show-shares solaris11
Enter password:
c$                  Default Share
IPC$                Remote IPC
4 shares (total=4, read=4)

Enable an existing UNIX user for CIFS sharing:

root@solaris11:~# smbadm enable-user john
john is enabled.

Tell PAM:
root@solaris11:~# echo “password required nowarn” >> /etc/pam.d/other

NOTE: You have to reset the users password (it can be the same) so that picks it up
and adds it to /var/smb/smbpasswd

Now you have to either join the workgroup or domain:

Use the smbadm join -u username domain-name command to join the domain.
Use the smbadm join -w workgroup-name command to join the workgroup.

I’m going to join my home workgroup compnect:

root@solaris11:~# smbadm join -w compnect
After joining compnect the smb service will be restarted automatically.
Would you like to continue? [no]: yes
Successfully joined compnect

On windows 8.1 (aka micocrap, aka never use an even numbered microsoft product):
open file explorer
click on network on the left
click on the network tab
click on add devices and printers



–sigh– windows can’t find it, so try three more times


Moral of the story:
Solaris 11.3 may be complicated but it WORKS!
Windows may be ok for your grandma but it doesn’t always work until you kick it a few times


Leave a Reply

Your email address will not be published. Required fields are marked *