+ Post New Thread
Results 1 to 6 of 6
Windows Server 2008 R2 Thread, How to make every user change password next time login in Technical; Hey Guys Title pretty much explains my issue, I was just wondering if there is a simple way to make ...
  1. #1

    abillybob's Avatar
    Join Date
    May 2013
    Location
    Shropshire
    Posts
    2,453
    Thank Post
    209
    Thanked 306 Times in 227 Posts
    Rep Power
    205

    How to make every user change password next time login

    Hey Guys

    Title pretty much explains my issue, I was just wondering if there is a simple way to make all the students have to change their password again next time they login I don't want to have to configure this manually for each child?

    Thankyou!!!

  2. #2

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    9,262
    Thank Post
    242
    Thanked 1,568 Times in 1,250 Posts
    Rep Power
    340
    You can bulk select users in AD to do this task, but of course it doesn't solve it if a child logs on 3 times a day, at different times.

  3. 2 Thanks to Michael:

    abillybob (22nd May 2014), hallb15 (22nd May 2014)

  4. #3

    witch's Avatar
    Join Date
    Nov 2005
    Location
    Dorset
    Posts
    11,109
    Thank Post
    1,367
    Thanked 2,374 Times in 1,671 Posts
    Rep Power
    703
    I've got a walkthrough for setting a fine-grained password policy in 2008 if that would be of any help?

  5. #4
    Trojan's Avatar
    Join Date
    Aug 2007
    Location
    Sutton Coldfield
    Posts
    157
    Thank Post
    112
    Thanked 21 Times in 12 Posts
    Rep Power
    19
    This script will reset all the users passwords in a defined OU to whatever you specify and force a password change at next login (just change the "OU=" and "password" to whatever you want.

    Code:
    ' PwdLastSet.vbs
    ' Example VBScript to FORCE a user's password change
    ' Author Ulrich P amended by Guy Thomas
    ' Version 2.0 - October 17th 2004
    ' ---------------------------------------------------------' 
    Option Explicit
    Dim objOU, objUser, objRootDSE
    Dim strContainer, strLastUser, strDNSDomain, strPassword 
    Dim intCounter, intAccValue, intPwdValue
    
    Set objRootDSE = GetObject("LDAP://RootDSE") 
    strDNSDomain = objRootDSE.Get("DefaultNamingContext")
    intAccValue = 544
    intPwdValue = 0
    
    ' --------------------------------------------------------'
    ' Important change OU= to reflect your domain
    ' --------------------------------------------------------'
    
    strContainer = "OU=pass, "
    strPassword = "password"
    
    ' -------------------------------------------------------'
    ' Makes the user change P@ssw0rd at first logon
    ' -------------------------------------------------------'
    
    strContainer = strContainer & strDNSDomain
    
    set objOU =GetObject("LDAP://" & strContainer )
    intCounter = 0
    For each objUser in objOU
    If objUser.class="user" then
    objUser.SetPassword strPassword
    objUser.SetInfo
    
    objUser.Put "pwdLastSet", intPwdValue
    objUser.SetInfo
    
    objUser.Put "userAccountControl", intAccValue
    objUser.SetInfo
    intCounter = intCounter +1
    strLastUser = objUser.Get ("name")
    End if
    next
    
    WScript.Echo strPassword & " is Password. UserAccountValue = " _
    & intAccValue
    WScript.Quit
    
    '  End of Script
    Save it as a .vbs file and run it
    Last edited by Trojan; 22nd May 2014 at 01:11 PM.

  6. #5

    tmcd35's Avatar
    Join Date
    Jul 2005
    Location
    Norfolk
    Posts
    5,620
    Thank Post
    845
    Thanked 883 Times in 731 Posts
    Blog Entries
    9
    Rep Power
    326
    Quote Originally Posted by Michael View Post
    You can bulk select users in AD to do this task, but of course it doesn't solve it if a child logs on 3 times a day, at different times.
    ^ This is the easiest way. Can't see why login on 3 time in one day should matter. Next time child logs in they'll be asked for a password reset. Can't see why you'd want to force resets everytime they login.

  7. Thanks to tmcd35 from:

    abillybob (22nd May 2014)

  8. #6

    abillybob's Avatar
    Join Date
    May 2013
    Location
    Shropshire
    Posts
    2,453
    Thank Post
    209
    Thanked 306 Times in 227 Posts
    Rep Power
    205
    Cheers for all your help guys didn't know it was under properties when selecting all users in AD that's all I want but appreciate all the help and support!

SHARE:
+ Post New Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •