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



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!
\-:



"Richard Mueller [MVP]" wrote:

FB wrote:

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?


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 Directory Services
Hilltop Lab - http://www.rlmueller.net
--



.



Relevant Pages

  • Re: Expiration dates without AD
    ... expires, it cannot be used. ... but the user can change the password and continue to use the account. ... For local accounts, the PasswordExpirationDate ... I need to run a script to enumerate objuser on expiration dates, ...
    (microsoft.public.windows.server.scripting)
  • Re: How to change PASSWORD expiration settings with command line?
    ... I have several LOCAL accounts created and i wanna to disable PASSWORD ... expiration via Script ... I found a Script (Modify a Local User Account So It Never Expires) in ... Servers that are not DC's do have local accounts. ...
    (microsoft.public.windows.server.scripting)
  • Re: CSCRIPT
    ... not have local accounts. ... The script works great under ... >an administrator but when regular users try it, ... >CSCRIPT command comes back with Access denied. ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Need help about script
    ... Just a dump question. ... How can I run that script? ... Look for deleting local accounts under ... I received a spreadsheet from department every 2 weeks regarding ...
    (microsoft.public.windows.server.scripting)
  • wierd output
    ... I just got this script to get the SID's from the local accounts, ... is retrieving all sids from Active Directory. ... Set colCSItems = objWMIService.ExecQuery("SELECT * FROM ...
    (microsoft.public.scripting.vbscript)