[Samba] Samba 4, where is wbinfo 'info' stored?

steve steve at steve-ss.com
Tue Feb 14 02:50:32 MST 2012

On 02/14/2012 06:47 AM, Gémes Géza wrote:
> Hi
>> On 02/13/2012 07:53 PM, Gémes Géza wrote:
>>> Hi,
>>> See comments/questions below:
>>>> Hi
>>>> When I type this:
>>>> getent passwd steve6
>>>> steve6:*:3000015:3000016:steve6:/home/CACTUS/steve6:/bin/bash
>>>> I can see that the info is coming from LDAP by looking at the ldif for
>>>> cn=steve6
>>> What is your /etc/nsswitch.conf file like?
>> passwd files ldap
>> group files ldap
>>>> When I type this:
>>>> wbinfo -i steve6
>>>> CACTUS\steve6:*:3000015:3000016::/home/CACTUS/steve6:/bin/false
>>> Is this on the samba4 box?
>>> wbinfo is the samba4 wbinfo or a samba3 one?
>> samba4 box
>> wbinfo = samba4 No s3 installed on this box.
>>>> Where is the info coming from now?
>>>> Thanks,
>>>> Steve
> Samba4 stores idmap information under an idmap.ldb named ldb file which
> is NOT exported to AD. So you could modify things by ldbediting it directly.
Geza, I'm really struggling with ldbsearch. The doco is almost non existent.

As you suggest, the primaryGroupID attribute I'm looking for must be in 
idmap.ldb as I can't find it using ldapsearch until _after_ I add a user 
to my posix group using dsa.msc in windows. Afterwards, I see that the 
primaryGroupID attribute has been added to the user. What i want to do 
is find out what that primaryGroupID is _before_ I run my posix script 
so I can add the attribute myself without having to do it from windows.

All I can find on ldapsearch is:
ldbsearch [-h] [-s base|one|sub] [-b basedn] [-i] [-H LDB-URL] 
[expression] [attributes]

1. Could you help me with the ldbsearch syntax to have a look inside 
2. Which database am I consulting when I run ldapsearch?

More information about the samba mailing list