تحميل

How to Change a Password in Linux: Root and Other Users

Updated at
22/08/2023
Views
5423

To change a password in Linux, whether it's for the root user or any other user, follow these steps:

1. Log in to the Linux system as the user whose password you want to change or log in as the root user.

2. Open a terminal or command prompt.

3. Type the following command to change the password for the current user:


passwd

If you want to change the password for another user, use the following command instead:


sudo passwd username

Replace "username" with the actual username of the user whose password you want to change.

4. You will be prompted to enter the current password for the user. If you are changing the root password, you may not be prompted for the current password.

5. Next, you will be prompted to enter the new password. Type the new password and press Enter. Make sure your password is strong and secure.

6. You will be prompted to re-enter the new password to confirm it. Type the new password again and press Enter.

7. If the password change is successful, you will receive a confirmation message.

By following these steps, you can change the password for any user on a Linux system, including the root user. It is recommended to change your passwords regularly to ensure the security of your system.

YottaSrc footer

لماذا تختارنا؟

أفضل الأسعار, تخزين SSD سريع و دعم فني
24/7 حقيقي

control panel icon
cPanel

إدارة موقعك من خلال CPanel بأحدث إصدار

security icon
سريع وموثوق وآمن

ضمان وقت تشغيل بنسبة 99.8٪.
لذا ركز على عملك!

support icon
دعم 24/7/365

ليلاً أو نهارًا ، مطر أو شمس ،
فريقنا هنا من أجلك!

cloud backup icon
نسخ احتياطي يومي

نسخ احتياطي يومي وأسبوعي.
ملفاتك آمنة!