How to change PASSWORD expiration settings with command line?

Discussion in 'Scripting' started by FB, Jun 4, 2008.

  1. FB

    FB Guest

    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/scriptcenter/scripts/default.mspx?mfr=true

    Can be used for that?
     
    FB, Jun 4, 2008
    #1
    1. Advertisements

  2. 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/scriptcenter/scripts/ds/local/users/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.
     
    Richard Mueller [MVP], Jun 4, 2008
    #2
    1. Advertisements

  3. FB

    FB 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!
    \-:
     
    FB, Jun 5, 2008
    #3
    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.