Re: Complex Password Scripting





"/\\/\\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
.



Relevant Pages

  • Re: Moving Multiple users from many differnt OUs at once
    ... This script work great. ... ' Filter on user objects with given Common Name. ... ' Failed to bind to user object. ... If "Test Accnt1" is the common name, then we have to use ADO to search AD ...
    (microsoft.public.windows.server.scripting)
  • Re: Update Notes Field
    ... I was able to run the script without any problems. ... The info attribute can be assigned a value when the user object is created, but I don't see where dsadd can do it. ... Most attributes are string values, and VBScript strings can include the character vbCrLf. ... If there is another way to add the information to the Notes field, ...
    (microsoft.public.windows.server.active_directory)
  • Re: Mass Username Change-How do I do it?
    ... What I am looking to change is the users login name (SAM account name) Will the script you provided do that? ... Assuming you are changing the NT Names and that the first name and last name fields are filled in, a VBScript program to modify all users in AD could use ADO to retrieve the values for all users, then bind to each user object and modify. ... ' Move to the next record in the recordset. ...
    (microsoft.public.windows.server.general)
  • Re: List Domain users, group Membership & Creation Date
    ... script to run against a domain to extract the following to a text ... list the Creation date of the user object ... ' Search entire Active Directory domain. ... ' Move to the next record in the recordset. ...
    (microsoft.public.scripting.vbscript)
  • Re: List Audit Permissions for a User Account
    ... I thought that when you run ?Active Directory Users and Computers? ... The script requires the Distinguished Name of the user object. ... "Pre-Windows logon name", also called the NT name. ...
    (microsoft.public.windows.server.scripting)

Loading