Using The Solaris Samba Service

February 17, 09 by cjgibbs

Before you can enable the samba service in SMF the config file needs to be created. Copy /etc/sfw/smb.conf-example to /etc/sfw/smb.conf. Make sure you have lines that look like this:

security = user
passdb backend = tdbsam

That will let you use the Solaris user accounts for samba access. Next set up a share that you’d like to test with. Here’s a simple one I used:

[htdocs]
path = /opt/coolstack/apache2/htdocs
valid users = cjs00c
public = no
writable = yes

Start up the samba service with svcadm enable samba. Now we need to add a user/pass to the samba user database: smbpasswd -a cjs00c. You should be able to connect to your new samba share now.

Just for fun, the samba password database file is located at /etc/sfw/private/passdb.tdb. If you’d like to check it for users you can use:
tdbtool /etc/sfw/private/passdb.tdb
tdb> info
3 records totalling 224 bytes
tdb> dump

key 12 bytes
USER_cjs00c
data 213 bytes
[a whole bunch of encoded data here]

key 13 bytes
INFO/version
data 4 bytes
[000] 03 00 00 00 …

key 13 bytes
RID_000004b0
data 7 bytes
[000] 63 6A 73 30 30 63 00 cjs00c
tdb>

This entry no have comments... but you can be first.

Leave a Reply