Solved

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

Posted on 2011-03-09
9
1,562 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
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 143

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Preface Having the need * to contact many different companies with different infrastructures * do remote maintenance in their network required us to implement a more flexible routing solution. As RAS, PPTP, L2TP and VPN Client connections are no…
The way I use Experts Exchange to assist me in analyzing and diagnosing a problem is I first enter a Verbose Question at Experts Exchange like: Office 2007 will hang when opening and saving files I then launch WordPad (any text editor will do) an…
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). …
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…

856 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