Changeset 207
- Timestamp:
- 05/28/09 22:24:31 (15 years ago)
- Location:
- LATMOS-Accounts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LATMOS-Accounts/bin/la-passwd
r189 r207 22 22 die "Object $otype $ARGV[0] not found\n"; 23 23 }; 24 $obj->set_password($ARGV[1]); 24 if ($obj->set_password($ARGV[1])) { 25 print "Password succefully changed\n"; 26 exit 0; 27 } else { 28 warn "Error when trying to change password\n"; 29 exit 1; 30 } -
LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Ad/User.pm
r203 r207 203 203 ] 204 204 ); 205 if ($mesg->code && $mesg->code != 82) {205 if ($mesg->code) { 206 206 warn $mesg->error; 207 207 return; 208 } else { return 1 } 208 } 209 210 my $userAccountControl = $self->get_field('userAccountControl'); 211 # http://msdn.microsoft.com/en-us/library/ms680832(VS.85).aspx 212 $userAccountControl |= 0x00010000; # ADS_UF_DONT_EXPIRE_PASSWD 213 # The password for this account will never expire. 214 $userAccountControl |= 0x00000040; # ADS_UF_PASSWD_CANT_CHANGE 215 # The user cannot change the password. 216 $self->set_fields(userAccountControl => $userAccountControl); 209 217 } 210 218
Note: See TracChangeset
for help on using the changeset viewer.