Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Password Reset Help

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,60028
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Password Reset Help
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Password Reset Help - 5/9/2008 3:12:19 AM   
  scheule523

 

Posts: 2
Score: 0
Joined: 5/9/2008
Status: offline
Hey guys, i'm trying to write a script that will reset the user account passwords in Active Directory for all members of a group.  Heres what I have..


      

I keep getting an error code 800A01A8 stating "Object Required: 'user1'"  It's successfully enumerating the group and breaking down the usernames but it's not resetting the passwords.  Any ideas?  Thanks.

< Message edited by scheule523 -- 5/9/2008 3:36:35 AM >
 
 
Post #: 1
 
 RE: Password Reset Help - 5/9/2008 3:36:34 AM   
  dm_4ever


Posts: 1938
Score: 30
Joined: 6/29/2006
From: Orange County, California
Status: offline
This

Set objMember = GetObject("LDAP://" & objUser)
objUser = objMember.CN
If objUser.class="user" Then
objUser.SetPassword strPassword
objUser.SetInfo

should be more like this

Set objMember = GetObject("LDAP://" & objUser.distinguishedName)
If UCase(objMember.class) = "USER" Then
   objMember .SetPassword strPassword
   objMember .SetInfo
End If

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to scheule523)
 
 
Post #: 2
 
 RE: Password Reset Help - 5/9/2008 3:43:35 AM   
  scheule523

 

Posts: 2
Score: 0
Joined: 5/9/2008
Status: offline
That worked, thanks a lot!!

(in reply to dm_4ever)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Password Reset Help Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts