Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to change the user's password in Ubuntu

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Ubuntu how to change the user password, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.

Change the user's password in Ubuntu-- from the command line

Changing a user's password under Ubuntu is actually very simple. In fact, the way it is modified on any Linux distribution is the same, because you are using a normal Linux command called passwd to do this.

If you want to change your current password, simply execute this command on the terminal:

Passwd

You will be asked to enter your current password and two new passwords.

When you type your password, you won't see anything on the screen. This is very normal in UNIX and Linux systems.

PasswdChanging password for abhishek. (current) UNIX password:Enter new UNIX password:Retype new UNIX password:passwd: password updated successfully

Since this is your administrator account, you have just changed the sudo password under Ubuntu, but you are not even aware of this operation. LCTT Note: when you perform a sudo operation, you enter the user's own password, and here you change your own password. By "administrator account", it means that the user is in a user group that can execute sudo commands. This article describes here that it is easy to cause misunderstanding. )

Change the user's password on the Linux command line

If you want to change other users' passwords, you can also use the passwd command to do so. But in this case, you will have to use sudo. (LCTT translation note: to execute sudo here, enter your sudo password first-as prompted above has been modified, and then enter the new password set for other users-twice. )

Sudo passwd

If you have changed your password but forget it later, don't worry. You can easily reset your password under Ubuntu.

Modify the password of root user under Ubuntu

By default, root users in Ubuntu do not have a password. Not surprisingly, you don't always use root users under Ubuntu. Don't you understand? Let me explain it to you quickly.

When you install Ubuntu, you will be forced to create a user. This user has administrator access. This administrator user can gain access to root through the sudo command. However, the user uses his own password, not the password of his root account (because there is no one).

You can use the passwd command to set or change the password of a root user. However, in most cases, you don't need it, and you shouldn't do it.

You will have to use the sudo command (for accounts with administrator privileges). If the root user's password has not been set before, it will require you to set it. In addition, you can use the existing root password to modify it. (LCTT translation note: there is an error described here. When you execute the passwd command using sudo or directly as a root user, you do not need to enter the current password of the user whose password has been changed. )

Sudo password root uses graphical interface (GUI) to change passwords under Ubuntu

I am using the GNOME desktop environment here, and the Ubuntu version is 18.04. These steps should not be much different for other desktop environments and Ubuntu versions.

Open the menu (press Windows/Super) and search for "Settings" (Settings).

In "Settings", scroll down some distance to open and enter "Details".

Enter Details in Ubuntu GNOME Settings

Here, click "Users" to get all the users visible under the system.

User settings under Ubuntu

You can choose any user you want, including your primary administrator account. You need to unlock the user and click on the "Password" area.

Modify user password under Ubuntu

You will be asked to set a password. If you are changing your own password, you will also have to enter the password you are currently using.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report