Reputation: 41
I am trying to change my password through net user command using command prompt(administrator).
When i type net user Taimoor Ali mypassword
and press enter, it says:
syntax of this command is: " NET USER [username [password | *][options]][DOMAIN] "
along with other syntax examples.
Can anyone tell me what i am doing wrong? I am able to log in through my finger print scan but forgot my password.
Upvotes: 4
Views: 7430
Reputation: 34979
Since your user name contains a SPACE, which constitutes a token separator in Windows cmd
(like also TAB, ,
, ;
, =
, and the non-break space, code 0xFF
), your net user
command line receives actually three tokens: Taimoor
(user name), Ali
(password) and mypassword
(additional unexpected token).
To fix that, use quotation marks:
net user "Taimoor Ali" mypassword
Or, in case the password also contains token separators:
net user "Taimoor Ali" "mypassword"
There are also other characters that have got special meanings to cmd
, which can also be taken as literal characters if the string is surrounded by quotation marks: ^
, &
, (
, )
, <
, >
, |
and !
.
Upvotes: 3