Re: Password Expiration Date.





"Florian Frommherz [MVP]" <florian@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:u4HsbmW%23JHA.1336@xxxxxxxxxxxxxxxxxxxxxxx
Howdie!

Luca wrote:
I need to set same expiration date to all passwords for all users in my
domain ...
Could anyone help me ?! I am able to find how to ...
Thanks in advance.

Check the script from the Scripting Guys:
http://www.microsoft.com/technet/scriptcenter/resources/qanda/jul05/hey0706.mspx

Are you sure you want ALL users to have their passwords expired? I can
imagine that causes a call storm at the help desk and a huge load on the
DCs. I, personally, would opt for expiring users' passwords in batches (1
division/week,...)

Cheers,
Florian

As noted in the link, you can expire passwords by running a script that
assigns 0 to the pwdLastSet attribute. You cannot assign any other value.
You cannot make passwords expire at some date in the future. Your script
must run at the moment you want all passwords to expire. You would do this
for all users desired. For example, for all users in an OU:

' Bind to the organizational unit.
Set objOU = GetObject("LDAP://ou=West,dc=MyDomain,dc=com";)

' Enumerate users.
For Each objUser In objOU
' Only operate on users.
If (LCase(objUser.Class) = "user") Then
' Expire password.
objUser.pwdLastSet = 0
objUser.SetInfo
End If
Next

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--


.



Relevant Pages

  • How to determine users who are about to have their passwords expire
    ... Does anybody have a script to provide a list of users whose passwords ... will expire in the next n days? ... CCC QQQ U U Bruce Young ...
    (Tru64-UNIX-Managers)
  • Re: Script to remove password expires date on users
    ... I have about 200 users who have their passwords set to expire at various ... reviewed to undo this requirement and have all password expiry requirements ... Is there a script that would allow me to iterate through all these ...
    (microsoft.public.windows.server.scripting)
  • Re: Password expiration notification
    ... it is possible to implement a script or some app that will periodically ... check when passwords are about to expire and then e-mail a user. ... roaming user with little to no access to company sites. ...
    (microsoft.public.windows.server.active_directory)
  • Script to remove password expires date on users
    ... I have about 200 users who have their passwords set to expire at various ... Is there a script that would allow me to iterate through all these ...
    (microsoft.public.windows.server.scripting)
  • Re: Automating FTP transfers
    ... the passwords is added to the script just before it ... * To join/leave the list, search archives, change list settings, * ... Authorised and regulated by the Financial Services Authority. ...
    (comp.sys.hp.mpe)

Loading