As Good A Place As Any

Tim Thomas's Blog

Tuesday Apr 08, 2008

Configuring the OpenSolaris CIFS Server in Workgroup Mode

This article documents a quick and simple process showing you how configure the OpenSolaris CIFS Server in Workgroup Mode. 

I am working on a Sun Fire X4500 with Solaris Nevada build 86 installed....

root@isv-x4500b # uname -a
SunOS isv-x4500b 5.11 snv_86 i86pc i386 i86pc

I already have a ZFS storage pool called "tank" created, so here goes:

1. Enable the CIFS server

root@isv-x4500b # svcadm enable -r smb/server
svcadm: svc:/milestone/network depends on svc:/network/physical, which has multiple instances

I googled this diagnostic message, and it can be ignored.

2. Create the ZFS file system

root@isv-x4500b # zfs create -o casesensitivity=mixed tank/cifs0

3. Share the new file system via SMB and check that status of the operation

root@isv-x4500b # zfs set sharesmb=on tank/cifs0
root@isv-x4500b # sharemgr show -vp
default nfs=()
zfs
    zfs/tank/cifs0 smb=()
          tank_cifs0=/tank/cifs0

4. Change the name of the Share

I don't like the default name of the share, tank_cifs0, so I will change that to cifs0

root@isv-x4500b # zfs set sharesmb=name=cifs0 tank/cifs0
root@isv-x4500b # sharemgr show -vp
default nfs=()
zfs
    zfs/tank/cifs0 smb=()
          cifs0=/tank/cifs0

5. Set the name of the Workgroup.

By default the workgroup name is "workgroup" but I want to change that to "solcifs".

root@isv-x4500b # smbadm join -w solcifs
Successfully joined workgroup 'solcifs'

6. Install the SMB PAM module

Add the below line to the end of /etc/pam.conf:

other   password required       pam_smb_passwd.so.1     nowarn

In this whole process, this is the only time I have to edit a file, and this is a one off.

7. Set/Change the Passwords for any Solaris User That Will be Used to Authenticate when Connecting to a  CIFS share

I will user root, but I could use any Solaris user the server knows about.

root@isv-x4500b # passwd root
New Password:
Re-enter new Password:
passwd: password successfully changed for root

With the SMB PAM module installed, this generates passwords that can be used by Windows as well as Solaris. This is a required step.

8. From Windows, Map the Share

From windows, the share is accessed via its UNC path: \\isv-x4500b\cifs0. OpenSolaris CIFS does not support access to shares by unauthenticated users: it does not have an equivalent of SAMBA's "guest mode". In this example, I have authenticated myself as root.

Map Share

The mapped share looks like this...

 Mapped Share

Files created from Windows will be owned on the Solaris server by the user you authenticated with. If that user does not have the correct UNIX permissions for the shared directory then some file operations will fail. That is easily fixed using chmod .

I can also browse the OpenSolaris CIFS server from Windows...

Browse Shares

For More Information

OpenSolaris Project: CIFS Server Home Page

Open Solaris CIFS Documentation including the Solaris CIFS Administrators Guide & Troubleshooting Information

Also, consider joining the Open Solaris Storage Discuss Forum

Comments:

Hi,

So I was quickly testing this and found that my Solaris 10 (SunOS 5.10 Generic_127111-11 sun4u sparc SUNW) did not have this CIFS server.
server/smb Do you know when/if it will be added?

Thanks
A

Posted by A on April 18, 2008 at 09:06 PM BST #

Oops I mean smb/server or smb of any type in svcs -a... although it does have swat (which I belive is the samba admin www).

Posted by A on April 18, 2008 at 09:08 PM BST #

Hi A. The CIFS Server will not be added to Solaris 10. It is in OpenSolaris now and will be in the next major release of Solaris. Backporting it to Solaris 10 would break the VFS layer and so all the file systems that use it. SAMBA is shipped in Solaris 10 if you need CIFS services. See the SAMBA section of my blog. Rgds, Tim

Posted by Tim Thomas (again) on April 20, 2008 at 09:42 PM BST #

Post a Comment:
  • HTML Syntax: NOT allowed
A Day At The Seaside

Calendar

Available in

English

简体中文

日本語

Feeds

Search

Links

Navigation