Reset "Password does not expire" flag

Discussion in 'Active Directory' started by Colin M. Smith, Aug 3, 2005.

  1. How can I make a bulk change to all users to UNCHECK the "Password does not
    expire" flag?

    We're putting a new password policy into effect and many users have this
    flag checked.
     
    Colin M. Smith, Aug 3, 2005
    #1
    1. Advertisements

  2. Colin M. Smith

    Al Mulnick Guest

    LDIFDE, Script, admodify etc would all do that for you. The 2003 MMC may do
    allow this in bulk as well, although I don't have one handy to see.

    Al
     
    Al Mulnick, Aug 3, 2005
    #2
    1. Advertisements

  3. But I think it's a byte offset on the UserFlags property. I think it can be
    read but not edited.
    Yes W2003 MMC allows for bulk changes but only in the same OU. We've got
    3000 some OU's. :)
     
    Colin M. Smith, Aug 3, 2005
    #3
  4. Colin M. Smith

    Al Mulnick Guest

    Al Mulnick, Aug 3, 2005
    #4
  5. See tips 9626 » How can I set 'all' user's UserAccountControl attribute for 'Password never expires' on or off?
    and 9625 » How can a batch set a user's UserAccountControl attribute for 'Password never expires' on or off?
    and links in the 'Tips & Tricks' at http://www.jsifaq.com
     
    Jerold Schulman, Aug 3, 2005
    #5
  6. Colin M. Smith

    kj Guest

    dsquery user -name * | dsmod user -pwdneverexpires:no

    One line ought to do it!
    (However, there may be "User Accounts" that you really don't want to change.
    So, before you make the changes, document the current status by saving the
    output of the following;

    dsquery user -name * | dsget user -pwdneverexpires -samid

    Again, one line, no scripting or coding!

    You may find it worth the learning experience to modify users in select OU's
    rather than directory wide.

    Then get to know the dsquery, dsget, dsadd, dsmod,dsmove, and dsrm tools.
    But be CAREFULL!!!
     
    kj, Aug 4, 2005
    #6
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.