Re: RE: Net user add & password expiration




You forgot the password

/expires:never is for account expiration, NOT password expiration

See tip 0570 in the 'Tips & Tricks' at http://www.jsifaq.com

net user /ADD "newuser" "Pass phrase" /passwordchg:no
netuser "user" /pwnexp:y

net user newlocaluser
User name newuser
Full Name
Comment
User's comment
Country code 000 (System Default)
Account active Yes
Account expires Never

Password last set 04/26/2006 11:59
Password expires Never
Password changeable 04/27/2006 11:59
Password required Yes
User may change password No

Workstations allowed All
Logon script
User profile
Home directory
Last logon Never

Logon hours allowed All

Local Group Memberships *Users
Global Group memberships *None
The command completed successfully.


On Wed, 26 Apr 2006 05:22:01 -0700, Guilhem <Guilhem@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

Sorry I eat some words...

We are working on a script for Windows 2003 server in standalone. We wanted
to add a user locally with the password expiration to never and no possiblity
to modify its password.
The following command is used:
net user /ADD "user" /expires:never /passwordchg:no

This command works on windows 2000 and NT but not on windows 2003. we did
not find any other options.

can somebody help us ?
Thanks in advance

Guilhem

"Guilhem" wrote:

Hello,

We are working on a script for Windows 2003 server in standalone. We wanted
to add a user locally with the password expiration to never and no possiblity
to modify its password.
The following command is used:
net user /ADD "user" /expires:never /passwordchg:no

This command works on windows 2000 and NT but not on windows 2003. We have


Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com
.



Relevant Pages

  • Re: batch file to delete files based on criteria
    ... The Advanced Version of Snapshot will create date/time coded backups that ... This script is included with the FREE Advanced NT/2K/XP/K3 Command Library ... script will perform CONSISTENTLY under Windows NT4, 2000, XP and Server ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: WshShell.Exec output read impossible until command finished
    ... I've done a script to force remove of old DCs. ... I'm using NTDSUTIL command line tool for that, ... How can I have a live output read (like under Windows 2003 DC)? ...
    (microsoft.public.scripting.vbscript)
  • Re: Swap/Remap Ctrl and Alt keys.......Finally
    ... startup/login script. ... It shows a message saying you need to add a line to a login script to ... The back quotes mean that the output of the "uname -n" command shall be ... options are much more comprehensive that those in Windows (does Windows ...
    (Ubuntu)
  • Re: Windows 2000 remote login problems
    ... Whenever a user forgets their Windows password we ... When the user forgets his password, he logs on with the user Setpassword. ... and the script asks for the user name to reset as well as the ... Changing password from a script (vbscript as well as command line): ...
    (microsoft.public.win2000.security)
  • Re: Telnet session
    ... It does not remove, in that script, "good" output ... And the first symptom of the problem is not bad output but it's ... It's certainly related to Windows. ... command based on the precedent result). ...
    (comp.lang.python)