[Samba] ldapsam, smbpasswd and posixAccount

Thorsten Scherf tscherf at redhat.com
Tue Oct 6 13:11:29 MDT 2009


On [Tue, 06.10.2009 12:13], Adam Williams wrote:
> are you loading samba.schema in your slapd.conf?

yes. running smbpasswd -a works without any problem when the user
doesn't already exists with posix-attrs in LDAP.

> Thorsten Scherf wrote:
>> Hi,
>>
>> I have a setup with Samba (3.4) as PDC with ldapsam as backend. LDAP is
>> managed by Samba, no external helper scripts. When I add a new user  
>> with "smbpasswd -a foo" it works fine, user is created and the  
>> openldap is populated with samba and  posix attributes.
>> Now, when I add a new user to the directory by running ldapadd against
>> a ldif file which contains only posix related attrs, I thought, running
>> smbpasswd -a would add the necessary samba attrs, but that's not the
>> case. I see this problem:
>>
>> $ ldapadd -x -D "cn=Manager,dc=tuxgeek,dc=de" -f /tmp/posix.ldif -W
>> adding new entry "uid=schalke,ou=users,dc=tuxgeek,dc=de"
>>
>> $ ldapsearch -xLLL uid=schalke
>> dn: uid=schalke,ou=users,dc=tuxgeek,dc=de
>> uid: schalke
>> objectClass: account
>> objectClass: posixAccount
>> cn: schalke
>> uidNumber: 10100
>> gidNumber: 10023
>> homeDirectory: /home/TUXGEEK/schalke
>> loginShell: /bin/bash
>>
>> [root at tiffy openldap]$ smbpasswd -a schalke
>> New SMB password:
>> Retype new SMB password:
>> ldapsam_create_user: failed to create a new user [schalke] (dn =
>> uid=schalke,ou=users,dc=tuxgeek,dc=de)
>> Failed to add entry for user schalke.
>>
>> This is from the log:
>> sambaAcctFlags objectClass
>> Oct  6 18:05:26 tiffy slapd[5819]: conn=12 op=7 RESULT tag=103 err=20
>> text=modify/add: uid: value #0 already exists
>>
>> Could anybody shed some light on this?
>>
>> Cheers.
>> Thorsten
>>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3855 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba/attachments/20091006/b813e6f2/attachment.bin>


More information about the samba mailing list