setting that password never expires 
Author Message
 setting that password never expires

Hi there

using w2k with AD.
I want to set that the user password never expires.
Using vbs i can get all of the users, but i can't find the "value" to use
for settings that :

user can't change password
password never expires

can anyone help ?

Thanks Brian



Tue, 28 Sep 2004 03:56:15 GMT  
 setting that password never expires
Here is how I've done this:
------------------
'&H00040 - Flag for No Password Change.
'&H10000 - Flag for Password never expire.

Dim User, UserID, uDomain, oCont
uDomain = "Domain_Name"
Set oCont = GetObject ("WinNT://" & uDomain)
oCont.Filter = Array("user")
For each User in oCont
    UserID = User.Name
    User.Put "UserFlags", User.Get("UserFlags") or _
   &H00040 or _
   &H10000
    User.SetInfo
Next
msgbox "Finished!"

----------------------------------

--
Gurgen Alaverdian
http://www.gurgensvbstuff.com

Quote:
> Hi there

> using w2k with AD.
> I want to set that the user password never expires.
> Using vbs i can get all of the users, but i can't find the "value" to use
> for settings that :

> user can't change password
> password never expires

> can anyone help ?

> Thanks Brian



Tue, 28 Sep 2004 04:36:10 GMT  
 setting that password never expires
you don't really need UserID = User.Name
meant for something else.....


Tue, 28 Sep 2004 04:45:51 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Set "Password never expires" on NT/2K User account using only WSH/VBSCRIPT!

2. Set password never expires?

3. Password Expire - Help Needed

4. Password Expire - Help Needed

5. user password never expires

6. Password never expires

7. Password Never Expires

8. "password never expires"

9. Password never expires

10. Propertie "Password Never Expires..."

11. Password Expiring Value

12. How to get list of users have expired password

 

 
Powered by phpBB® Forum Software