Unable to add posixAccount objectclass to AD user

brendan powers brendan0powers at gmail.com
Tue Dec 1 18:32:59 MST 2009


On Mon, Nov 30, 2009 at 5:47 AM, Andrew Bartlett <abartlet at samba.org> wrote:
> I can't see where the error is generated, but perhaps try adding users with the objectClass: posixAccount, or using a 'replace' operation.

I tried doing a replace operation with the same results. Next I tried
adding a new user, and that also failed with the same error. So I set
up an OpenLDAP server, configured it with the same details as the
samba4 domain, and tried again with the same ldiff file, and it
worked.

Here is the command I used,
ldapadd -H 'ldap://localhost:389' -f test.ldiff -I

and the output I get when using samba4
adding new entry "cn=Administrator2,CN=Users,DC=resara,DC=local"
ldap_add: Object class violation (65)
       additional info: 00002014: Object class violation

One thing I noticed is the additional info field contained useful
information about the error when using OpenLDAP, but is always the
same as the error when using samba4.

Here is the ldif file I used.

dn: cn=Administrator2,CN=Users,DC=resara,DC=local
objectClass: top
objectClass: person
objectClass: posixAccount
cn: Administrator2
uid: Administrator2
sn: Administrator2
uidNumber: 10123
gidNumber: 10123
homeDirectory: /home/Administrator
userPassword: badpw
loginShell: /bin/bash
gecos: Administrator;;;
description: Admin User


More information about the samba-technical mailing list