Linux ubuntu change password

Как изменить пароль пользователя в Ubuntu

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

Как обычный пользователь Ubuntu вы можете изменить только свой собственный пароль. Пользователь root и пользователи с привилегиями sudo могут изменять пароли других пользователей и определять, как пароль может быть использован или изменен.

В этом руководстве описывается, как изменить пароль пользователя в Ubuntu из командной строки или через графический интерфейс Ubuntu.

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

В Ubuntu и других дистрибутивах Linux вы можете изменить пароль учетной записи пользователя с помощью команды passwd .

Чтобы изменить пароль учетной записи пользователя, выполните команду passwd без каких-либо параметров:

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

В следующий раз, когда вы войдете в систему на своей машине Ubuntu, используйте новый пароль.

Изменить пароль другого пользователя

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

Чтобы изменить пароль другой учетной записи пользователя, выполните команду passwd а затем введите имя пользователя. Например, чтобы изменить пароль пользователя с именем sansa , выполните следующую команду:

Вам будет предложено ввести и подтвердить новый пароль:

Ubuntu изменить пароль из графического интерфейса

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

Gnome — это среда рабочего стола по умолчанию в Ubuntu 18.04 (Bionic Beaver). Предыдущие версии Ubuntu использовали Unity в качестве среды рабочего стола по умолчанию.

Чтобы изменить пароль пользователя, выполните следующие действия:

Откройте окно настроек системы, щелкнув значок настроек, как показано на изображении ниже.

В окне настроек системы перейдите на вкладку Пользователи.

Если вы хотите изменить пароли других пользователей, вам необходимо разблокировать панель, для которой требуются права sudo (администратора).

Откройте окно «Смена пароля», щелкнув значок ····· рядом с ····· Password .

Введите свой текущий пароль, затем введите и подтвердите новый пароль.

Чтобы автоматически сгенерировать случайный пароль, щелкните значок двойной шестеренки рядом с параметром « New Password .

Щелкните Change чтобы сохранить новый пароль.

Это оно! Вы успешно сменили пароль.

Выводы

В этом руководстве вы узнали, как изменять пароли пользователей в Ubuntu.

Читайте также:  Как продолжить установку windows после перезагрузки

При смене пароля убедитесь, что вы используете надежный и уникальный пароль. Наличие надежного пароля — самый важный аспект безопасности вашей учетной записи. Часто надежный пароль содержит не менее 16 символов, используйте как минимум одну заглавную букву, одну строчную букву, одну цифру и один специальный символ.

Источник

How do I change a user password in Ubuntu Linux?

W e recently switched from Windows server operating system to Ubuntu Linux operating system at work. I am a developer by profession and do not know much about Linux. I need to change the sftp/ssh user account password on Ubuntu. How do I change a user password in Ubuntu Linux?

Introduction – Your Ubuntu Linux account information stored in a file named /etc/passwd and encrypted password in /etc/shadow . This page explains to you how to change the Ubuntu Linux root and user account password using the passwd command line.

Tutorial details
Difficulty level Easy
Root privileges Yes
Requirements Ubuntu Linux
Est. reading time 2 minutes

How to change a user password in Ubuntu

  1. Open the terminal application by pressing Ctrl + Alt + T
  2. To change a password for user named tom in Ubuntu, type:
    sudo passwd tom
  3. To change a password for root user on Ubuntu Linux, run:
    sudo passwd root
  4. And to change your own password for Ubuntu, execute:
    passwd

How to change a root (superuser) password in Ubuntu

Firstly, open a terminal window. If you want to change the password for remote Ubuntu server, log in using the ssh command:
ssh user@ubuntu-server-ip
ssh vivek@ubuntu-webserver-1
Type ‘sudo -i’ at the command prompt, and Enter key:
sudo -i
Type the current user password and press Enter key. Finally type NA command and press Enter to change password for root user:
passwd

Change password for root user on Ubuntu

How do I change the user account password on Ubuntu?

Again open a terminal window. Type the following command to change the password for regular Ubuntu user account named jerry:
sudo passwd < userNameHere >
sudo passwd jerry ## ##
sudo passwd vivek ## ##

How to change the user Password in Ubuntu Linux

Deleting a user password

Users will not be able to log in when the password is deleted or expired on Ubuntu Linux.

  • No ads and tracking
  • In-depth guides for developers and sysadmins at Opensourceflare✨
  • Join my Patreon to support independent content creators and start reading latest guides:
    • How to set up Redis sentinel cluster on Ubuntu or Debian Linux
    • How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
    • How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
    • A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
    • How to protect Linux against rogue USB devices using USBGuard

Join Patreon

The syntax is as follow to remove the password for the account called tom:
sudo passwd -d tom
## OR ##
sudo passwd —delete jerry
You will see confirmation on screen as follows:

To set up a new password when deleted, run:
sudo passwd -d tom
We can also force expire the password for the named account jerry. Open the terminal and then type the following command:
sudo passwd -e jerry
sudo passwd —expire jerry
When user login they will be forced to reset their credentials when you use the -e / —expire option:

Linux locking an account

sudo passwd -l
sudo passwd -l tom

Linux unlocking an account

sudo passwd -u
sudo passwd -u tom

Conclusion

This quick tutorial taught you how to change the Ubuntu Linux root user and other user account password using the passwd command. You must root user to change the password for all other users, however users can change their password without sudo access. For more info see the passwd command help page using the man command man passwd

🐧 Get the latest tutorials on Linux, Open Source & DevOps via

Category List of Unix and Linux commands
Documentation help • mandb • man • pinfo
Disk space analyzers df • duf • ncdu • pydf
File Management cat • cp • less • mkdir • more • tree
Firewall Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04
Linux Desktop Apps Skype • Spotify • VLC 3
Modern utilities bat • exa
Network Utilities NetHogs • dig • host • ip • nmap
OpenVPN CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04
Package Manager apk • apt
Processes Management bg • chroot • cron • disown • fg • glances • gtop • jobs • killall • kill • pidof • pstree • pwdx • time • vtop
Searching ag • grep • whereis • which
Shell builtins compgen • echo • printf
Text processing cut • rev
User Information groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w
WireGuard VPN Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04

Comments on this entry are closed.

For your own password:
passwd
For root password:
sudo passwd root

FYI, we don’t set root password on Ubuntu for security reasons. One user will be added to the ‘sudo’ group and that will act as admin user. This ensures safety as root account without password is locked and cannot be used for ssh.

Источник

Изменение пароля пользователя в Ubuntu

Во время установки Ubuntu Linux вы задаете пароль пользователя. Рассмотрим, как изменить пароль пользователя в Ubuntu Linux, используя графическую утилиту или командную строку.

Изменить пароль пользователя в Ubuntu через Параметры системы

Запустите утилиту Параметры системы. Это можно сделать из меню запуска приложений (из Лаунчера). Чтобы открыть приложения (лаунчер) нажмите клавишу Super ( Win ).

Откроется программа настройки системы. Перейдите на вкладку Сведения о системе

Перейдите на вкладку Пользователи . Нажмите на поле Пароль

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

Примечание: Данная утилита не дает ввести произвольный новый пароль, а налагает некоторые требования на сложность и длину пароля. Если вы хотите использовать произвольный пароль, то воспользуйтесь командной строкой для смены пароля пользователя (см. следующий параграф).

Изменить пароль пользователя в Ubuntu через командную строку

Откройте терминал. Для этого можно нажать сочетание клавиш Ctrl+Alt+T

Введите команду (вместо pingvinus укажите свое имя пользователя):

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

Затем введите новый пароль и нажмите Enter .
Затем еще раз введите новый пароль и нажмите Enter .

Если появилось сообщение passwd: password updated successfully ( passwd: пароль успешно обновлён ) , то это означает, что пароль изменен.

Данный способ универсальный и будет работать в других дистрибутивах Linux. Смотрите также нашу статью Изменяем пароль пользователя в Linux

Источник

Ubuntu Change Password

Changing the password

This is the password that you have to enter when you’re logging into your account. This password isn’t the “root” password. Let’s fire up a terminal and run the following command –

This will prompt you to enter your current password. Then, you have to type your new password 2 times.

Changing the “root” password

The “root” is the ultimate user account for any Linux system that offers the most control over the system, even allowing access to sensitive system files and other files. For changing the “root” password, run the following command –

Then, restart your system.

Changing password without the current “root” access

In cases, you may not be able to access to your system because you forgot the “root” password. It’s also possible to change the password without having access to the system. Restart your system.

Keep holding “Shift” to access the GRUB menu.

Press “E” for editing the startup command.

Get to the line “linux / boot”.

At the end of “ro”, type the following text –

Press “Ctrl + X” to boot with the modified startup command. Run the following commands –

Enter your new password. After password changing is successful, run the following command for restarting your system –


Voila! Your password is changed successfully!

About the author

Sidratul Muntaha

Student of CSE. I love Linux and playing with tech and gadgets. I use both Ubuntu and Linux Mint.

Источник

Читайте также:  Nvidia graphics driver windows 10 64 bit
Оцените статью