[Samba] SaMBa 4.0.x homedir mapping - is possible without user account in system?

Dewayne Geraghty dewayne.geraghty at heuristicsystems.com.au
Tue Feb 26 18:56:47 MST 2013


For FreeBSD people that use the source at  http://ftp.samba.org/pub/samba/, you will need to use:
ln -s /usr/local/samba/lib/libnss_winbind.so.1 /usr/local/lib/nss_winbind.so.1

Please NOTE the location and *name* of the winbind library, this may be relevant to your nsswitch

Which works nicely when nsswitch.conf contains, amoungst other things:
group: files winbind
passwd: files winbind

The only entry for idmap or winbind in smb.conf is
idmap_ldb:use rfc2307 = yes
There are no entries for idmap or winbind in smb.conf.

To create an account, we use (for learning purposes, password complexity checking is off)
S=fred; P=pwd
/usr/local/samba/bin/samba-tool user create $S $P
mkdir -p /s4/homes/$S
chown $S /s4/homes/$S

At which point, I can access the home fileshare.

FYI: homes was defined from a cut/paste from samba3, with only a path change:
[home]
        comment = Home Directories
        path = /s4/homes/%S
        valid users = %S
        read only = No
        valid users = %S
        read only = No
        create mask = 0600
        directory mask = 0700
        inherit permissions = Yes
        inherit acls = Yes
        inherit owner = Yes
        hide unreadable = Yes
        veto oplock files = /*.pst/
        browseable = No

Based on the instructions at
https://wiki.samba.org/index.php/Samba4/Domain_Member#Make_domain_users.2Fgroups_available_locally_through_winbind.

Regards, Dewayne.
PS For the FreeBSD'ers that use ports, Timur (Samba port maintainer) has taken care of this for you; and a lot of other
install/configuration changes to make Samba4 well integrated into the system. He couldn't make it easier ;)




More information about the samba mailing list