Results 1 to 5 of 5

Thread: user password group policy

  1. #1
    Join Date
    Sep 2005
    Posts
    19

    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.

  2. #2
    Join Date
    Sep 2004
    Posts
    59

    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.

  3. #3
    Join Date
    Sep 2004
    Posts
    73

    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

    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

  4. #4
    Join Date
    Sep 2004
    Posts
    128

    Re: user password group policy

    You just need to create a saved query\custom query with this syntax in your in dsa.msc:

    (&(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.

  5. #5
    Join Date
    Sep 2005
    Posts
    19

    Re: user password group policy

    thanks everyone! Very helpful.

Similar Threads

  1. Using local group policy to override domain group policy
    By Nickason in forum Active Directory
    Replies: 3
    Last Post: 28-09-2011, 04:20 AM
  2. Replies: 4
    Last Post: 29-12-2010, 11:20 AM
  3. Group policy not applying to user configuration
    By jean in forum Active Directory
    Replies: 3
    Last Post: 25-07-2009, 12:36 PM
  4. Restriction password - Group policy
    By ameer123 in forum Networking & Security
    Replies: 2
    Last Post: 18-11-2008, 03:01 PM
  5. Group Policy - Maximum Password Age
    By Meng R in forum Active Directory
    Replies: 2
    Last Post: 21-08-2008, 12:06 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,410,094.57174 seconds with 17 queries