From: Mark W. <mew...@un...> - 2000-11-07 22:30:09
|
Ugh, active directory. Assuming the password is stored in the userpassword attribute, you should be able to do something like this: $ldap->modify("cn=NAME,ou=DEPT,ou=DIV,ou=SCHOOL,dc=SERV1,dc=cc,dc=umr,dc=edu", replace => { 'userpassword' => 'somepassword'}); should work. Might want to double check the name of the password attribute in the active directory schema. mark On Tue, 7 Nov 2000, Edgington, Jeffrey Alan wrote: > As I did not find anything in the archives that seemed to answer my > question, I thought I would ask the list for some help. > > I know how to change a password via VBS and LDAP... but I need to run this > script from Unix and would prefer to write it in perl. > > > This is the portion of the VBS script that changes the password... > > Set adsUser = > GetObject("LDAP://cn=NAME,ou=DEPT,ou=DIV,ou=SCHOOL,dc=SERV1,dc=cc,dc=umr,dc= > edu") > adsUser.SetPassword "NEWPASSWORD" > > I have figured out how to connect to the ADS LDAP directory from perl > (running on unix)... but once there, I am not sure how to translate the > above lines into perl. > > I am using Net::LDAP to do my connection. > > Thanks in advance. > > > > ----------------------------------------------------------------------- > Jeffrey Edgington > Systems Administrator > University of Missouri - Rolla > Are you a Spectator or a Participant? > ----------------------------------------------------------------------- > > |