On Monday 21 September 2009 04:27:07 pm Steve Cayford wrote: > Looking at smbldap-useradd I can see that it first creates a posix machine > account with this code in smbldap_tools.pm: > > my $add = $ldap->add ( > "uid=$user,$config{computersdn}", > attr => [ > 'objectclass' => [ > 'top', 'account', 'posixAccount' > ], > 'cn' => "$user", > 'uid' => "$user", > 'uidNumber' => "$uid", > 'gidNumber' => "$gid", > 'homeDirectory' => '/dev/null', > 'loginShell' => '/bin/false', > 'description' => 'Computer', > 'gecos' => 'Computer', > ] > ); > > Then it tries to modify the entry with this code in smbldap-useradd which > is where it dies: > > my $modify = $ldap_master->modify ( > "uid=$userName,$config{computersdn}", > changes => [ > replace => [ > objectClass => [ > 'top', 'person', 'organizationalPerson', > 'inetOrgPerson', 'posixAccount', 'sambaSAMAccount']], > add => [sambaLogonTime => '0'], > add => [sambaLogoffTime => '2147483647'], > add => [sambaKickoffTime => '2147483647'], > add => [sambaPwdCanChange => '0'], > add => [sambaPwdMustChange => '2147483647'], > add => [sambaPwdLastSet => "$date"], > add => [sambaAcctFlags => '[I ]'], > add => [sambaLMPassword => "$lmpassword"], > add => [sambaNTPassword => "$ntpassword"], > add => [sambaSID => "$user_sid"], > add => [sambaPrimaryGroupSID => "$config{SID}-515"] > ] > );
It's defining it as objectClass 'account' in the first entry. attr => [ 'objectclass' => [ 'top', 'account', 'posixAccount' ], You'll have to look at your schema, but you can probably get away with replacing "account" in the first codelet with "inetOrgPerson" Wes -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba