[Samba] ldapsam, smbpasswd and posixAccount
awilliam at mdah.state.ms.us
Tue Oct 6 11:13:01 MDT 2009
are you loading samba.schema in your slapd.conf?
Thorsten Scherf wrote:
> 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 =
> Failed to add entry for user schalke.
> This is from the log:
> sambaAcctFlags objectClass
> Oct 6 18:05:26 tiffy slapd: conn=12 op=7 RESULT tag=103 err=20
> text=modify/add: uid: value #0 already exists
> Could anybody shed some light on this?
More information about the samba