Solved

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

Posted on 2011-03-09
9
1,534 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
 
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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

In a hurry?.. scroll down to "HERE's HOW TO DO IT" Section. Greetings All, I was going to post this as question/solution, but its seems more appropriate as an article considering its length.  I felt it important to illucidate all the details c…
Many times while working on a computer regardless of any Operating System, lag and crashes seem to creep in, hindering your working speed. Sometimes, it can also cause your work to be lost unexpectedly and as a result, you are unable to meet your de…
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…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

706 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now