Re: Complex Password Scripting
- From: "Greg" <Greg@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 11 Jan 2006 14:07:03 -0800
"/\\/\\o\\/\\/ [MVP]" wrote:
> Greg wrote:
> >
> > "/\\/\\o\\/\\/ [MVP]" wrote:
> >
> >
> >>Greg wrote:
> >>
> >>>I have an OU that will have about two hundred users in it. The operations
> >>>manager wants to change all of the passwords to ie. "ABCDEF%1%2" ABCDEF
> >>>would be a fixed variable and %1 would be the first initial of the users
> >>>first name, and %2 would be the first initial of users last name. I have the
> >>>script for modifying all passwords in the OU to the same password. This is
> >>>going to be used so that they can login to OWA and then change their
> >>>password. He does not want them all to have the same password.
> >>>
> >>>Any ideas? He also informed me that I need to do this tonight so I am up
> >>>against a wall.
> >>>
> >>>Thanks in advance
> >>>
> >>>Greg
> >>
> >>If you can post the part that sets the password,
> >>(and getting the user object)
> >>
> >>i will look, how to construct the string
> >>
> >>gr /\/\o\/\/
> >
> >
> >
> > Thanks GR. The script that I have right now is below. What I think we are
> > going to do is perl out all of the accounts and basically generate this VB
> > script 200 times. My only question is can I run a vb script two hundred
> > times in the same vbs file. In other words put this script back to back 200
> > times with the changes for each user?
> >
> > PATH_OU = "ou=GROUP,dc=x,dc=y"
> >
> > Set objContainer = GetObject("LDAP://OU=AD, dc=x, dc=yl" & PATH_OU)
> > objContainer.Filter = Array("user")
> >
> > For Each objChild In objContainer
> >
> > '* get DistinguishedName
> > strDN = objChild.Name & "," & PATH_OU
> >
> > '* replace reserved char /
> > strDN = replace(strDN,"/","\/")
> >
> > Set objUser = GetObject("LDAP://OU=AD, dc=x, dc=y" & strDN)
> >
> > objUser.SetPassword "ABCDEF%1%2!"
> >
>
> you could change this :
>
> 'strFirstname = objUser.givenname
> 'strLastName = objUser.sn
>
> strFirstname = "mow"
> strLastName = "Last"
>
> strFL = Mid(strFirstname,1,1)
> strLL = Mid(strLastName,1,1)
> strPass = strFL & "123" & strLL
>
> wscript.echo strPass
> 'objUser.SetPassword strPass
>
> gr /\/\o\/\/
>
OK you are assuming that I know way too much about scripting. If you can
help with this I would greatly appreicate this as well.
The LDAP is tblc.local
The OU the accounts are in is called Hosted.
Can you do the script that binds to the domain, everytime I write it, it
comes up and says object not on server. Once I see a working script I think
I can figure it out for future.
Basically a fully working script. Sorry for the ignorance, but I am
learning and failing miserably. Thanks again
.
- Follow-Ups:
- Re: Complex Password Scripting
- From: /\\/\\o\\/\\/ [MVP]
- Re: Complex Password Scripting
- From: /\\/\\o\\/\\/ [MVP]
- Re: Complex Password Scripting
- References:
- Re: Complex Password Scripting
- From: /\\/\\o\\/\\/ [MVP]
- Re: Complex Password Scripting
- From: /\\/\\o\\/\\/ [MVP]
- Re: Complex Password Scripting
- Prev by Date: Re: Manage printers on remote computer
- Next by Date: Re: Complex Password Scripting
- Previous by thread: Re: Complex Password Scripting
- Next by thread: Re: Complex Password Scripting
- Index(es):
Relevant Pages
|
Loading