[Samba] create smbpasswd/tdbsam from ldapsam/LDAP query?
mangoo at wpkg.org
Mon Jan 23 16:48:59 GMT 2006
> On Mon, 2006-01-23 at 17:08 +0100, Tomasz Chmielewski wrote:
>> As some of you may know, I'm trying to set up Samba BDC on a disk- and fan-less tiny mipsel_CPU router running OpenWRT distribution.
>> I already managed to compile Samba 3.0.21a and OpenLDAP 2.3.18 for it, and they seem to work fine.
>> The problem is, this tiny distribution for routers doesn't seem to have anything like Name Service Switch (NSS), and relies solely on /etc/passwd
>> and /etc/group.
>> In other words, Samba will be unable to get users from LDAP.
>> I thought that perhaps a workaround would be to fetch all needed info from the LDAP, and create proper /etc/passwd and smbpasswd files (or tdbsam
>> Is it possible to do so?
>> Or perhaps there are some tools for converting ldapsam to tdbsam?
> pdbedit -i -e and look also at importing mapped users
So these will create a tdbsam file out of the current ldapsam (I think it's better to stick with tdbsam):
pdbedit -e tdbsam:/tmp/tdbsam.tdb
Now, how can I create a /etc/passwd and /etc/group files in a similar way?
> however probably, given it is a BDC, the best thing is to sync the
> passwd and group from ldap.
That's more or less what I want to do.
> you may also try to experiment with ldapsam:trusted parameter
I just read the ldapsam:trusted description in smb.conf and it seems that this is what I'm looking for.
However, I'm not sure: how will Samba write UIDs/GIDs on shared folders, user profiles?
Will it just write the GIDs/UIDs as they are (in the ldapsam db), although "getent passwd" will not show the relevant users?
And "ls -l /share/some/user/file" will show only numeric UIDs/GIDs?
More information about the samba