Windows команда для смены пароля

Загрузить PDF

Загрузить PDF

В этой статье рассказывается, как в Windows изменить пароль к учетной записи администратора с помощью командной строки. Если у вас нет административного доступа к компьютеру, пароль изменить нельзя. В Mac OS X пароль можно сбросить с помощью терминала.

  1. Step 1 Откройте меню «Пуск» icon.

    Для этого щелкните по логотипу Windows в нижнем левом углу экрана или нажмите клавишу Win на клавиатуре.

  2. Step 2 В строке поиска введите командная строка.

    Система найдет утилиту командной строки и отобразит ее значок над строкой поиска.

    • Чтобы открыть строку поиска в Windows 8, переместите указатель мыши в верхний правый угол экрана и щелкните по отобразившемуся значку в виде лупы.
    • В Windows XP нажмите «Выполнить» в правой части меню «Пуск».
  3. Step 3 Щелкните правой кнопкой мыши по значку Командная строка.

    Он имеет вид черного квадрата. Откроется контекстное меню.

    • В Windows XP в окне «Выполнить» введите cmd.
  4. Step 4 Нажмите Запуск от имени администратора.

    Эта опции находится в верхней части раскрывшегося меню. Откроется командная строка с правами администратора.

    • В открывшемся окне с предложением подтвердить ваши действия нажмите «Да».
    • В Windows XP, чтобы открыть командную строку, нажмите «OK».

    Реклама

  1. Step 1 В командной строке введите net user и нажмите ↵ Enter.

    Не забудьте поставить пробел между двумя словами.

  2. Step 2 Найдите имя учетной записи, пароль к которой нужно изменить.

    Если вы меняете пароль к своей собственной учетной записи, ее имя отобразится в разделе «Администратор» в левой части окна командной строки. В противном случае имя аккаунта, скорее всего, появится в разделе «Гость» справа.

    • Вы также можете добавить нового пользователя при помощи командной строки.
  3. Step 3 В командной строке введите net user [имя] * и нажмите ↵ Enter.

    Вместо [имя] введите имя учетной записи, пароль к которой нужно изменить. Введите имя учетной записи именно так, как оно отображается в соответствующем разделе командной строки.

    • Если на экране появилось несколько строк, которые начинаются с «The syntax of this command is» (Синтаксис этой команды), введите net user Administrator * (для учетной записи администратора) или net user Guest * (для учетной записи гостя).
  4. Step 4 Введите новый пароль и нажмите ↵ Enter.

    Во время ввода пароля курсор не перемещается и символы не видны. Это нужно для того, чтобы никто не подсмотрел, какой пароль вы вводите.

  5. Step 5 Введите пароль еще раз и нажмите ↵ Enter.

    Опять-таки, пароль не отображается во время ввода, поэтому не торопитесь. Пароли, введенные в первый и во второй раз, должны полностью совпадать.

    • Более быстрый (но менее скрытый от посторонних глаз) вариант — ввести в командной строке net user [имя] [новый_пароль] и нажать «Enter». Вместо [имя] введите имя учетной записи, для которой вы меняете пароль, а вместо [новый_пароль] — соответственно, ваш новый пароль.[1]
    • С помощью командной строки также можно найти свой пароль Wi-Fi.

    Реклама

Советы

  • Если вы не имеете прав администратора, для смены пароля вам придется обратиться к администратору.
  • Если компьютер, в который вы пытаетесь войти, защищен паролем BIOS, вам нужно будет либо воспользоваться главным паролем, чтобы сбросить пароль BIOS, либо извлечь CMOS-батарейку из материнской платы.
  • Чтобы увидеть полный список команд командной строки, введите в ней [[kbd|help]] и нажмите «Enter».

Реклама

Предупреждения

  • Никогда не меняйте пароль, если не имеете на это права.

Реклама

Об этой статье

Эту страницу просматривали 219 271 раз.

Была ли эта статья полезной?

on September 11, 2011

We can change a user password from Windows command line using net user command. The command is explained below with examples.

How to change local user password

net user  loginid  newpassword

For example, if you want to reset the password for the user John on the local computer, you can run the below command. Let’s say the new password is pq12d*12@

net user  John  pq12d*12@

You may not want to provide the new password in the command prompt for obvious security reasons. Net use command allows to reset the password so that none around your desk can see it. You need to provide * in the place of password while executing net use command. You will be prompted to type the password and the password you enter won’t be printed on the screen. But you need to feed the password twice to make sure that you have entered the password you intended to.

example:

C\>net user John *
Type a password for the user:
Retype the password to confirm:
The command completed successfully.

How to change domain user account password

If you want to change password for a domain account, you can do it by running the below command.

net  user  loginid  *  /domain

Next, you will be prompted twice to enter the password and on successful completion your domain account password will be reset. You can also provide the password in the command itself as explained above.

In case the domain is not reachable then you will get the below error when you try to run the above command.

System error 1355 has occurred.
The specified domain either does not exist or could not be contacted.

Related Posts:

  • Add new user account
  • Enable or disable user account

Если по какой-то причине вам потребовалось изменить пароль пользователя в Windows 10  — сделать это обычно очень просто, при условии, что вы знаете текущий пароль: для этого предусмотрено несколько способов, о которых — в этой инструкции. Если вам не известен текущий пароль, должно помочь отдельное руководство Как сбросить пароль Windows 10.

Прежде чем приступить, учтите один важный момент: в Windows 10 у вас может быть учетная запись Майкрософт или локальная учетная запись. Простой способ изменения пароля в параметрах работает и для той, и для другой учетной записи, а вот остальные описываемые методы — отдельные для каждого типа пользователя.

Чтобы узнать, какой тип учетной записи используется на вашем компьютере или ноутбуке, зайдите в пуск — параметры (значок шестеренки) — учетные записи. Если вы увидите имя пользователя с указанием адреса E-mail и пунктом «Управление учетной записью Майкрософт», это, соответственно, учетная запись Майкрософт. Если же только имя и подпись «Локальная учетная запись», то этот пользователь «локальный» и его настройки не синхронизируются онлайн. Также может оказаться полезным: Как отключить запрос пароля при входе в Windows 10 и при выходе из спящего режима.

Изменение пароля пользователя в параметрах Windows 10

Первый из способов изменения пароля пользователя — стандартный и, вероятно, самый простой: с использованием параметров Windows 10, специально предназначенных для этого.

  1. Зайдите в Пуск — Параметры — Учетные записи и выберите пункт «Варианты входа».
  2. В разделе «Пароль» нажмите кнопку «Изменить».
    Изменение пароля Windows 10 в параметрах

  3. Вам потребуется ввести свой текущий пароль пользователя (причем, если у вас учетная запись Майкрософт, для изменения пароля также потребуется, чтобы компьютер был подключен к Интернету в момент выполнения этих шагов). 
    Ввод текущего пароля Windows 10

  4. Введите новый пароль и подсказку для него (в случае локального пользователя) или еще раз старый пароль плюс дважды новый пароль (для учетной записи Майкрософт). 
    Изменение пароля Windows 10 в параметрах

  5. Нажмите «Далее», а затем, после применения сделанных настроек — Готово.

После этих шагов при повторном входе вам необходимо использовать уже новый пароль Windows 10.

Примечание: в случае, если для входа используется ПИН-код, изменить его можно на той же странице параметров в соответствующем разделе. А если цель изменения пароля — более быстрый вход в систему, вместо того, чтобы изменять его, на той же странице настроек («Варианты входа») вы можете установить ПИН-код или графический пароль для входа в Windows 10 (при этом пароль останется прежним, но вводить его для того, чтобы войти в ОС не потребуется).

Изменение пароля учетной записи Майкрософт онлайн

В том случае, если вы используете учетную запись Майкрософт в Windows 10, вы можете поменять пароль пользователя не на самом компьютере, а онлайн в параметрах учетной записи на официальном сайте Майкрософт. При этом, сделать это можно с любого устройства, подключенного к Интернету (но для того, чтобы войти под паролем, установленным таким образом, ваш компьютер или ноутбук с Windows 10 при входе также должны быть подключены к Интернету, чтобы синхронизировать изменившийся пароль).

  1. Зайдите на страницу https://account.microsoft.com/?ref=settings и войдите с вашим текущим паролем учетной записи Майкрософт.
  2. Измените пароль, используя соответствующую настройку в параметрах учетной записи в разделе Дополнительные действия.
    Изменить пароль учетной записи Майкрософт на официальном сайте

После сохранения настроек на сайте Майкрософт, на всех устройствах, где был выполнен вход с помощью этой учетной записи, подключенных к Интернету, пароль также будет изменен.

Способы изменить пароль локального пользователя Windows 10

Для локальных учетных записей в Windows 10 существует сразу несколько способов изменить пароль, помимо настроек в интерфейсе «Параметры», в зависимости от ситуации можно использовать любой из них.

С помощью командной строки

  1. Запустите командную строку от имени Администратора (Инструкция: Как запустить командную строку от Администратора) и по порядку используйте следующие команды, нажимая Enter после каждой из них.
  2. net user

    в результате выполнения этой команды, обратите внимание на имя нужного пользователя, чтобы не допустить ошибок в следующей команде.

  3. net user имя_пользователя новый_пароль

    здесь имя_пользователя — нужное имя из пункта 2, а новый пароль — пароль, который требуется установить. Если имя пользователя содержит пробелы, возьмите его в кавычки в команде.

    Изменение пароля пользователя в командной строке

Готово. Сразу после этого для выбранного пользователя будет установлен новый пароль. При желании, указав вместо пароля две кавычки (без пробела посередине), вы можете удалить пароль учетной записи и в дальнейшем вход в нее будет выполняться без ввода пароля.

Изменение пароля в панели управления

  1. Зайдите в панель управления Windows 10 (в поле «Просмотр» вверху справа установите «Значки») и откройте пункт «Учетные записи пользователей».
  2. Нажмите «Управление другой учетной записью» и выберите нужного пользователя (в том числе текущего, если изменяем пароль для него).
  3. Нажмите «Изменить пароль». 
    Изменение учетной записи в панели управления

  4. Укажите текущий пароль и дважды введите новый пароль пользователя. 
    Новый пароль Windows 10 в панели управления

  5. Нажмите кнопку «Сменить пароль».

Можно закрыть управление учетными записями панели управления и при следующем входе в систему использовать новый пароль.

Параметры пользователей в «Управление компьютером»

  1. В поиске на панели задач Windows 10 начните набирать «Управление компьютером», откройте этот инструмент 
  2. Зайдите в раздел (слева) «Управление компьютером» — «Служебные программы» — «Локальные пользователи и группы» — «Пользователи».
  3. Нажмите правой кнопкой мыши по нужному пользователю и выберите пункт «Задать пароль». 
    Установка нового пароля в управлении компьютером

Надеюсь, что описанных способов смены пароля вам окажется достаточно. Если же что-то не получается или ситуация сильно отличается от стандартной — оставьте комментарий, возможно, мне удастся вам помочь.

Sign in to your MUO account

Command line interface with cartoon people sitting around it working on laptops

Need to change a user password in Windows 10 or 11? You can do this through the Settings app, but it’s much faster and takes fewer clicks to change a password through the command line instead.

Even if you’re new to text commands on Windows, changing the user password with the net user command is simple. We’ll show you how to change a Windows password using the command line with this handy method.

Use the Net User Command to Change a Windows Password

To change another Windows user’s password via the command line, you need administrator privileges. See how to check if your Windows account is an admin if you’re not sure. If you aren’t using an admin account because you’ve lost your administrator password and can’t make any changes, follow our tips for resetting a lost Windows admin password.

Also, keep in mind that this method only works for local accounts in Windows 10 and 11. It won’t work if you use a Microsoft account to sign in to Windows; you’ll need to change the password using Microsoft’s web account management page instead. See our guide to securing your Microsoft account for help with this and other security measures.

Now, here’s how to change passwords via CMD using net user:

  1. Open an administrator Command Prompt window. To do this, type cmd into the Start menu, then right-click on the Command Prompt entry and choose Run as administrator.

    1. You can also use PowerShell or the Windows Terminal to perform this; you’ll find a shortcut to those by right-clicking the Start button or hitting Win + X.
  2. Type the following net user command and press Enter to list all the users on your system. When they appear, take note of the account name you want to change the password for:

            net user
        
  3. To change a password, type the net user command shown below, replacing USERNAME and NEWPASS with the actual username and new password for the account. If the username is more than one word, you’ll need to place it inside quotes, as shown:

            net user USERNAME NEWPASS
        
            net user "USER NAME" NEWPASS
        
  4. After you press Enter to run this command, you’ll see a message that it completed successfully. Now you can use the new password to log into this account, just like if you had changed it via the graphical interface.
Windows 10 Change Password Net User

If you see an Access denied message when you try this, make sure that you started the Command Prompt (or other command line window) as an Administrator. Standard users can’t change the password for other accounts. If you see an error that the username wasn’t found, make sure you typed it correctly.

How to Privately Change a Password With Net User

You might want to prevent people around you from seeing the new password that you type when using net user. Thus, for more privacy, you can use a slightly different command to prevent the new password from appearing in plain text onscreen.

To do this, follow the above instructions, but during step 3, enter an asterisk instead of the password. Be sure to still replace USERNAME with the actual username:

        net user USERNAME * 
    

Windows will then ask you to type a new password twice. However, with this method, the passwords don’t appear as you type—making sure anybody nearby won’t see them.

Change Your Windows Password More Conveniently

Now you know how to use the net user command to change passwords in Windows. It’s a quick way to change passwords without sorting through menus, plus you can change multiple passwords in quick succession without your hands leaving the keyboard.

Give it a try next time you need to change a user password. And when you set a new one, make sure to choose a strong password that’s not easy to guess or crack.

In this tutorial, you will learn how to use the net user command to create, delete and change user accounts in the Windows command prompt (CDM).

We can perform the following tasks using the net user command:

  • View user accounts.
  • Add and Remove user accounts.
  • Activate and Deactivate user accounts.
  • Change the user password.

If you are operating in an Active Directory domain environment, always use the /domain command switch to execute the net user command on the domain controller rather than on the local computer.

Examples

List users on the local computer:

net user

List users on the domain controller:

net user /domain

This command displays detailed information about the Administrator account:

net user Administrator

Create a user named user1 with a password of strongPassword:

net user /add user1 "strongPassword"

Delete the user user1 from the computer:

net user /delete user2

This command enables the built-in Administrator account on Windows 10/11:

net user Administrator /active:yes

This command sets (changes) the Administrator account password:

net user Administrator "adminPassWord"

Execute the following command to disable the Administrator account on Windows 10/11:

net user Administrator /active:no

This command forces the user user1 to change the password at the next logon:

net user user1 /logonpasswordchg:yes

Create a user; the user must change the password at the next logon:

net user /add user1 "strongPassword" /logonpasswordchg:yes

Create a new user; the account expires on January 31st:

net user /add user1 "strongPassword" /expires:01/31/2023

Command Options

username The name of the user to create, delete, view, or modify.
password Password for the user.
* Use this option to produce a prompt for the password.
/add Use this option when you want to create a new user.
/delete Use this option to remove a user from the Windows system.
/active:{yes | no} Activates or Deactivates a user. The default is yes when creating a new user.
/expires:{date | never} Use this option to set the expiration date (mm/dd/yy) for an account. The default is never.
/fullname:»name» Full name of the user.
/passwordchg:{yes | no} Specifies whether users can change their own password. The default is yes.
/passwordreq:{yes | no} No means the user can log in without a password. The default is YES.
/logonpasswordchg:{yes|no} Specifies whether the user should change the password at the next logon. The default is NO.
/homedir:path The home directory location.
/comment:»text» Use this option to add a description to the user’s account.

You can view the manual page by typing net help user at the command prompt.

View a User

When you execute the net user command without any options, it displays a list of user accounts on the computer.

net user

You will see an output similar to the following:

the net user command

Add the /domain command switch if you want to list users on the Active Directory Domain controller.

net user /domain

To see detailed information about a particular user, execute the command net user Username, where the Username is the name of the user you want to view. For example, you can view the Administrator account by running the following command:

net user Administrator

Create and Delete User Accounts

To create a user account, use the following syntax:

net user /add UserName Password

For example, the following command creates a user named user1 with a password of strongPassword:

net user /add user1 "strongPassword"

Use an asterisk (*) in place of the password to produce a prompt, as shown in the following example:

net user /add user1 *
net user change password

Change Password

Alternatively, you can also use the /random option to generate a strong random password, as shown in the following example:

net user /add user1 /random

The randomly generated password will be displayed on the command prompt after you execute the command.

Using Net User command to generate a strong random password

Using Net User command to generate a strong random password

To delete a user, use the following syntax:

net user /delete UserName

The following command deletes the user user1 from the computer:

net user /delete user2

Change Passwords

To change passwords, use the following syntax:

net user UserName New-Password

Use an asterisk (*) or /random in place of the password to produce a prompt or generate a random password:

net user UserName *
net user user1 /random

Notes

The net user command is most of the time used in Windows Server to manage Active Directory users.

Windows 10/11 uses a new Settings pane to manage users, but the net user command is still useful for some tasks. For example, if you want to activate the built-in Administrator account, it is easy to do that using this command.

While working at the command prompt, run the net help user command to see all available command options.

In the next tutorial, we are going to learn how to manage Windows groups using the net localgroup CMD command.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Hp 4015 драйвер windows 10
  • Ммс не может открыть файл c windows system32 devmgmt msc
  • Какие ненужные программы можно удалить с компьютера windows 10
  • Лучшая версия microsoft office для windows 10
  • Acronis backup for windows server настройка