User creation by command - NET USER
Posted: 29 Jun 2015 08:21
How do I create a local user net user command, and user owned display marking (enabled) field: "User must change password at next logon"?
A Forum all about DOS Batch
https://www.dostips.com/forum/
Code: Select all
NET USER UserName * /ADD
Code: Select all
/logonpasswordchg:yes
D:\>NET USER 12345678901 ABcd@123 /ADD /FULLNAME:"JUAN DA SILVA DIAS" /comment:"CPF 123.456.789-01" /logonpasswordchg:yes
The option /LOGONPASSWORDCHG:yes is unknown.
The syntax of this command is:
NET USER
[username [password | *] [options]] [/DOMAIN]
username {password | *} /ADD [options] [/DOMAIN]
username [/DELETE] [/DOMAIN]
More help is available by typing NET HELPMSG 3506.
Code: Select all
/minpwlen:<length> Minimum number of characters for the password. Default is 6, valid range is between 0 and 14
/maxpwage:<days> Maximum number of days a password is valid. Default is 90, valid range is between 0 and 49710
/minpwage:<days> Number of days that must occur before the password can be changed. Default is 0, valid range is between 0 and maxpwage
/uniquepw:<number> Password may not be reused for number attempts
Code: Select all
net.EXE accounts /minpwage:0 /maxpwage:1