удалить пароль с помощью cmd, если имя пользователя состоит из двух слов

12152
Saud

Я хочу изменить пароль с помощью cmd.exe, но я не могу этого сделать. :( Поскольку имя пользователя состоит из двух слов (например, англ. Saud). Оно работает только для одного слова. Как я могу сказать cmd.exe, так как оба слова являются одним именем пользователя?

1
Какую команду вы выполняете, которая терпит неудачу? dsolimano 7 лет назад 2
Почему теги cmder и nircmd? DavidPostill 7 лет назад 0

2 ответа на вопрос

2
DavidPostill

How I tell cmd.exe that both words are a single user name?

the user name is two words (e.g. Engr. Saud)

Use double quotes " around the name.

To remove the password, use the following command:

net user "Engr. Saud" "" 

Notes:

  • The net command must be run from a cmd shell that is "Run as Administrator".

Further Reading

0
John

You need to enclose the entire user name in quotes, or otherwise escape the space(s) between the words in the user name. Without doing either of these, the shell will treat a space as a parameter separator, not as part of the parameter.

Похожие вопросы