How to Change a User Password in Linux
作者:XD / 发表: 2024年9月29日 12:36 / 更新: 2024年9月29日 12:36 / 编程笔记 / 阅读量:369
Changing a user’s password in Linux is simple and efficient. Here’s how to do it:
1. Changing Your Own Password
To change your own password, run the passwd
command:
passed
You'll be prompted to enter your current password, followed by your new password.
2. Changing Another User’s Password
If you’re a system administrator and need to change another user’s password, use:
sudo passwd username
Replace username
with the actual user account. You’ll be prompted to enter the new password.
3. Changing the Root (Admin) Password
To change the root account password, run:
sudo passwd root
That’s it! Managing passwords in Linux is quick and secure with these commands.
相关标签