Results 1 to 4 of 4

Thread: How to change PASSWORD expiration settings with command line?

  1. #1
    FB Guest

    How to change PASSWORD expiration settings with command line?


    I Have a WIn2003SP1 Std Citrix PS4 Server joined to a Win2003 R2 Domain
    I have several LOCAL accounts created and i wanna to disable PASSWORD
    expiration via Script

    I´ve heard abou a NET USER paramater, "/pwnexp " but i think this parameter
    is invalid in Win2003 Servers.

    How can i do that? Can i do it with NET USE commands? .VBS? Batch?

    I found a Script (Modify a Local User Account So It Never Expires) in
    http://www.microsoft.com/technet/scr....mspx?mfr=true

    Can be used for that?


  2. #2
    Richard Mueller [MVP] Guest

    Re: How to change PASSWORD expiration settings with command line?

    Pasting links from the Microsoft site is a pain. You have to copy the
    shortcut from the toc at the left. If the VBScript you refer to is linked
    here:

    http://www.microsoft.com/technet/scr.../lousvb14.mspx

    then yes, you can use this to modify local accounts so the password never
    expires. Of course, if the server is joined to a domain I would expect you
    to use domain accounts rather than local accounts.

    As far as I know, net user can be used, but I cannot find the syntax to make
    the password not expire. It can be used to configure the user so they cannot
    change their own password. One issue is that Domain Controllers do not have
    local accounts. Servers that are not DC's do have local accounts.

  3. #3
    bmn Guest
    Yes, it works! Tanks

    Now i have to write a script to do this, on all my local accouns (FTP
    External Users) with names begining with "ftp" or to generate a .TXT of users
    and appy to it!

    The link i suggested did not worked!

    You can try set password expiration via WMI, using wmic command line like this,

    cmd> wmic path Win32_UserAccount where Name='testusername' set PasswordExpires=false

  4. #4
    Join Date
    Dec 2010
    Posts
    1

    Re: How to change PASSWORD expiration settings with command line?

    Dear all,

    i found a simple solution with a bit of further research.

    net accounts /maxpwage:unlimited

Similar Threads

  1. How to change the line display color with the echo batch command?
    By coolthinking in forum Windows Server Help
    Replies: 5
    Last Post: 24-11-2011, 07:14 PM
  2. How to change the command line resolution in Debian
    By Lucillee in forum Windows Software
    Replies: 5
    Last Post: 02-07-2011, 10:10 PM
  3. Replies: 2
    Last Post: 01-04-2009, 05:46 PM
  4. XP screen resolution change from command line ?
    By Kalav in forum Windows XP Support
    Replies: 2
    Last Post: 23-09-2008, 06:45 PM
  5. Replies: 2
    Last Post: 17-10-2007, 02:14 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,296,182.42449 seconds with 17 queries