user password group policy
On our Windows 2003 Server / Domain there are more than 80 users connected. Somehow I want to apply a new password policy for all users connected to this domain. The only problem I am facing is few users have set their password to Never Expire. So I wanted to know if I apply the new policy, will it effect these users as well who have set passwords to never expire option? Or will they get any prompt message about my newly applied policy?
Thanks for all suggestions.
Re: user password group policy
Nope, it will not override the users "password never expires" settings. You will need to manually change their user properties one by one. If you remove this, then only your new Policy will take effect.
RE: user password group policy
Hello Oldmans. You will need to first create a list of users who have set their passwords to never expire. Once done, you will need to change / modify their properties and set it to password to expired. After doing the same, on Error Resume Next
Quote:
Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
Set objCommand.ActiveConnection = objConnection
objCommand.Properties("Page Size") = 1000
objCommand.CommandText = _
"<LDAP://dc=fabrikam,dc=com>;" & _
"(&(objectCategory=User)(userAccountControl:1.2.840.113556.1.4.803:=65536));"
& _
"Name;Subtree"
Set objRecordSet = objCommand.Execute
objRecordSet.MoveFirst
Do Until objRecordSet.EOF
Wscript.Echo objRecordSet.Fields("Name").Value
Set objUser = GetObject("LDAP://CN=" & objRecordSet.Fields("Name").Value
&",OU=Users,DC=Fabrikam,DC=com")
objUser.pwdLastSet = 0
objUser.SetInfo
objRecordSet.MoveNext
Loop
Re: user password group policy
You just need to create a saved query\custom query with this syntax in your in dsa.msc:
Quote:
(&(objectCategory=person)(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=65536))
This will be placed in your Users computers and you can simply run it anytime by clicking on it.
Re: user password group policy
thanks everyone! Very helpful.