diff options
author | Gerald Carter <jerry@samba.org> | 2002-05-02 14:15:36 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2002-05-02 14:15:36 +0000 |
commit | 760b0a37bfbfbc721acbc0457c6dacf8680cb3d7 (patch) | |
tree | 45c76311a7e8bcbb8548e90951ae1c3b84cf72eb /examples | |
parent | 642ca1b6a234277a0d33b98c96a616937aff0c5f (diff) | |
download | samba-760b0a37bfbfbc721acbc0457c6dacf8680cb3d7.tar.gz samba-760b0a37bfbfbc721acbc0457c6dacf8680cb3d7.tar.xz samba-760b0a37bfbfbc721acbc0457c6dacf8680cb3d7.zip |
merge from 2.2
Diffstat (limited to 'examples')
-rw-r--r-- | examples/LDAP/import2_smbpasswd.pl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/LDAP/import2_smbpasswd.pl b/examples/LDAP/import2_smbpasswd.pl index bf643391a7e..0f83b5cae45 100644 --- a/examples/LDAP/import2_smbpasswd.pl +++ b/examples/LDAP/import2_smbpasswd.pl @@ -43,7 +43,7 @@ while ( $string = <STDIN> ) { ## check and see if account info already exists in LDAP. $result = $ldap->search ( base => "$DN", scope => "sub", - filter => "(&(|(objectclass=posixAccount)(objectclass=smbPasswordEntry))(uid=$smbentry[0]))" + filter => "(&(|(objectclass=posixAccount)(objectclass=sambaAccount))(uid=$smbentry[0]))" ); ## If no LDAP entry exists, create one. @@ -56,7 +56,7 @@ while ( $string = <STDIN> ) { ntPassword => $smbentry[3], acctFlags => $smbentry[4], pwdLastSet => substr($smbentry[5],4), - objectclass => [ 'top', 'smbPasswordEntry' ] + objectclass => [ 'top', 'sambaAccount', 'posixAccount'] ] ); print "Adding [uid=" . $smbentry[0] . "," . $DN . "]\n"; @@ -68,17 +68,17 @@ while ( $string = <STDIN> ) { print "Updating [" . $entry->dn . "]\n"; - ## Add the objectclass: smbPasswordEntry attribute if it's not there + ## Add the objectclass: sambaAccount attribute if it's not there @values = $entry->get_value( "objectclass" ); $flag = 1; foreach $item (@values) { - if ( lc($item) eq "smbpasswordentry" ) { + if ( lc($item) eq "sambaaccount" ) { print $item . "\n"; $flag = 0; } } if ( $flag ) { - $entry->add(objectclass => "smbPasswordEntry"); + $entry->add(objectclass => "sambaAccount"); } ## Set the other attribute values |