Solved

Local admin account - needs password never expires set via Script, GPO, or other

Posted on 2011-03-09
9
1,556 Views
Last Modified: 2012-05-11
On our Windows 7 computer images, we create a local admin account for IT purposes when we need to login locally when that is our only option.

The problem is, that on the image, I forgot to check the "password never expires".  So now when we use the account months later, it prompts the tech to change the password.

I need to push this change out, where the "password never expires" gets checked, but not sure how.  Again, it's a local admin account on Windows 7 machines and I only need to apply this change only.

Also I may need to push out a change to reset the password back to your current standard, but the most important item is setting the local acocunt password to never expire to start with.
0
Comment
Question by:tdwhelp
  • 2
  • 2
  • 2
  • +2
9 Comments
 
LVL 3

Expert Comment

by:dsexton18
ID: 35087557
0
 
LVL 4

Assisted Solution

by:vnicolae
vnicolae earned 166 total points
ID: 35087724
You can create a Group Policy startup script that looks something like that:

Const ADS_UF_DONT_EXPIRE_PASSWD = &h10000
 
Set objUser = "your_username"
intUAC = objUser.Get("userAccountControl")
 
If ADS_UF_DONT_EXPIRE_PASSWD AND intUAC Then
    Wscript.Echo "Already enabled"
Else
    objUser.Put "userAccountControl", intUAC XOR _
        ADS_UF_DONT_EXPIRE_PASSWD
    objUser.SetInfo
    WScript.Echo "Password never expires is now enabled"
End If
0
 
LVL 3

Assisted Solution

by:dsexton18
dsexton18 earned 166 total points
ID: 35087751
Also take a look at the net user commands
http://support.microsoft.com/kb/251394
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 11

Accepted Solution

by:
TheGorby earned 168 total points
ID: 35087777
If for some reason that doesn't work, you could create this simple 1-line batch script and run it as a startup script on all machines. I would of course test this on one computer first.

Note that this will change the setting for all local users on the PC, but not domain users.

http://technet.microsoft.com/en-us/library/bb490698.aspx
NET ACCOUNTS /MAXPWAGE:UNLIMITED

Open in new window

0
 
LVL 4

Expert Comment

by:vnicolae
ID: 35087796
For the "net.exe" commands to work, they have to be executed with local admin privileges.
0
 
LVL 11

Expert Comment

by:TheGorby
ID: 35087860
Since startup scripts run as local system, admin privilages shouldn't be a problem.
0
 

Author Comment

by:tdwhelp
ID: 35139904
Thanks.  I will use the NET ACCOUNTS /MAXPWAGE:UNLIMTED method
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 35953955
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My purpose is to describe the basic concepts of virtual memory as implemented in a modern Windows-based operating system. I will also describe the problems inherent in older systems and how virtual memory solves them. The dark ages - before virtu…
This is a little timesaver I have been using for setting up Microsoft Small Business Server (SBS) in the simplest possible way. It may not be appropriate for every customer. However, when you get a situation where the person who owns the server is i…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question