As OpenSolaris provides a integrated CIFS/Samba Server, it’s quite easy to setup. If you use a ZFS file-system (you’ll most likely do with Solaris…), all settings are even exported and imported with the pool. Therefore you can transfer your whole data-pool to a new machine, import it and don’t have to setup the shares again.

First you need to set the sharesmb attribute.

deveth0@nas:~# zfs set sharesmb=name=Share,guestok=true tank/Share

You can now access the Samba Share via Network and write/read files. But as ls -la shows, your UserID and GroupID will not be mapped correct:

deveth0@nas:~# ls -la
total 9
drwxr-xr-x 2 deveth0 staff 2 Jul 14 21:15 .
drwxr-xr-x 22 deveth0 staff 38 Jul 16 10:27 ..
-rwxrwxrwx+ 1 2147483650 2147483650 0 Jul 16 15:47 text.txt

To get an appropriate mapping, we use the idmap tool and add the Winuser Guest to the Unixuser nobody.  Furthermore we can add the common group Domain Users to nogroup.

deveth0@nas:~# idmap add winuser:Guest unixuser:nobody
deveth0@nas:~# idmap add "wingroup:Domain Users" unixgroup:nogroup
deveth0@nas:~# ls -la
total 9
drwxr-xr-x   2 deveth0  staff          2 Jul 14 21:15 .
drwxr-xr-x  22 deveth0  staff         38 Jul 16 10:27 ..
-rwxrwxrwx+  1 nobody nogroup 0 Jul 16 15:47 text.txt

If you still have problems with the permissions, you can try to set them appropriate.

deveth0@nas:~# chmod -R A=everyone@:full_set:fd:allow /tank/Share


Related Posts



Eine Antwort schreiben