Hi All, The smbldap-tools in latest Samba tarball 3.0.1 use SambaSAMAccount rather than SambaSamAccount as per the samba.schema file. Attached are four patches to fix this. Darren -------------- next part -------------- --- smbldap-useradd.pl.orig Tue Dec 30 22:34:08 2003 +++ smbldap-useradd.pl Tue Dec 30 22:38:19 2003 @@ -208,7 +208,7 @@ if (!$with_smbpasswd) { # (jtournier) - # Objectclass sambaSAMAccount is now added directly by samba when joigning the domain (for samba3) + # Objectclass sambaSamAccount is now added directly by samba when joigning the domain (for samba3) #if (!add_samba_machine_mkntpwd($userName, $userUidNumber)) { # die "$0: error while adding samba account\n"; #} @@ -312,7 +312,7 @@ my $modify = $ldap_master->modify ( "uid=$userName,$usersdn", changes => [ - add => [objectClass => 'sambaSAMAccount'], + add => [objectClass => 'sambaSamAccount'], add => [sambaPwdLastSet => "$valpwdlastset"], add => [sambaLogonTime => '0'], add => [sambaLogoffTime => '2147483647'], -------------- next part -------------- --- smbldap-populate.pl.orig Tue Dec 30 22:39:56 2003 +++ smbldap-populate.pl Tue Dec 30 22:37:54 2003 @@ -122,7 +122,7 @@ cn: $adminName sn: $adminName objectClass: inetOrgPerson -objectClass: sambaSAMAccount +objectClass: sambaSamAccount objectClass: posixAccount gidNumber: 512 uid: $adminName @@ -149,7 +149,7 @@ cn: $guestName sn: $guestName objectClass: inetOrgPerson -objectClass: sambaSAMAccount +objectClass: sambaSamAccount objectClass: posixAccount gidNumber: 514 uid: $guestName -------------- next part -------------- --- smbldap_tools.pm.orig Tue Dec 30 22:34:47 2003 +++ smbldap_tools.pm Tue Dec 30 22:38:33 2003 @@ -239,7 +239,7 @@ my $mesg = $ldap_slave->search ( base => $dn_group, scope => $scope, filter => "(sambaSID=$sid)" - #filter => "(&(objectClass=sambaSAMAccount|objectClass=sambaGroupMapping)(sambaSID=$sid))" + #filter => "(&(objectClass=sambaSamAccount|objectClass=sambaGroupMapping)(sambaSID=$sid))" ); $mesg->code && die $mesg->error; $ldap_slave->unbind; @@ -333,7 +333,7 @@ my $ldap_master=connect_ldap_master(); my $modify = $ldap_master->modify ( "uid=$user,$computersdn", changes => [ - replace => [objectClass => ['inetOrgPerson', 'posixAccount', 'sambaSAMAccount']], + replace => [objectClass => ['inetOrgPerson', 'posixAccount', 'sambaSamAccount']], add => [sambaPwdLastSet => '0'], add => [sambaLogonTime => '0'], add => [sambaLogoffTime => '2147483647'], -------------- next part -------------- --- smbldap-usermod.pl.orig Tue Dec 30 22:34:26 2003 +++ smbldap-usermod.pl Tue Dec 30 22:38:05 2003 @@ -53,7 +53,7 @@ print " -S surname\n"; print " -P ends by invoking smbldap-passwd.pl\n"; print " For samba users:\n"; - print " -a add sambaSAMAccount objectclass\n"; + print " -a add sambaSamAccount objectclass\n"; print " -e expire date (\"YYYY-MM-DD HH:MM:SS\")\n"; print " -A can change password ? 0 if no, 1 if yes\n"; print " -B must change password ? 0 if no, 1 if yes\n"; @@ -107,7 +107,7 @@ # apply changes my $modify = $ldap_master->modify ( "$dn", changes => [ - add => [objectClass => 'sambaSAMAccount'], + add => [objectClass => 'sambaSamAccount'], add => [sambaPwdLastSet => "$valpwdlastset"], add => [sambaLogonTime => '0'], add => [sambaLogoffTime => '2147483647'],
Gerald (Jerry) Carter
2004-Jan-06 15:19 UTC
[Samba] sambaSamAccount versus SambaSAMAccount
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Chew, Darren wrote: | Hi All, | | The smbldap-tools in latest Samba tarball 3.0.1 use | SambaSAMAccount rather than SambaSamAccount as per | the samba.schema file. Attached are four patches to | fix this. Got it. But this really shouldn't have caused any problems. Did it break something for you? - -- cheers, jerry ~ ---------------------------------------------------------------------- ~ Hewlett-Packard ------------------------- http://www.hp.com ~ SAMBA Team ---------------------- http://www.samba.org ~ GnuPG Key ---- http://www.plainjoe.org/gpg_public.asc ~ "If we're adding to the noise, turn off this song" --Switchfoot (2003) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE/+smVIR7qMdg1EfYRAuaXAKDwz1xpcC299y7GPZDMOOoZaD5aNwCfYyI9 add2wU29OCyEM09TDIhrxhA=oZsf -----END PGP SIGNATURE-----