For security reasons, it is sometimes smart to change login passwords periodically. This post shows you how to change the root password in Ubuntu if you want to do so periodically, or if you think the security or your computer has been compromised.
NOTE: Ubuntu is initially setup such that the first user created is automatically given Administrator, or root, privileges and has the right to become root using sudo. Subsequent users who need root privileges need to be manually given Administrator privileges.
Change the Root Password on the User Settings Dialog Box
To use a graphical user interface (GUI) to change the root password, press Alt + F2 to open the Run Application dialog box. Enter the following line in the edit box and click Run.
gksu users-admin
Changing users settings requires you to enter your user password. Enter your password when prompted.
The Users Settings dialog box displays. If you need to give a user Administrator privileges, select the user in the list on the left and click the Change button to the right of the Account type field.
Select the Administrator radio button and click OK.
Now, to change the root password, select the root user from the list on the left and click the Change button to the right of the Password field.
The Change User Password dialog box displays. Enter the current root password in the Current password edit box. Enter the new root password in the New password edit box and again in the Confirmation edit box. Click OK.
Click Close to close the Users Settings dialog box.
Change the Root Password Using the Command Line
A simpler and quicker method of changing the root password involves using the command line. To use this method, select Accessories | Terminal from the Applications menu.
Type the following line at the prompt and press Enter.
$ sudo passwd root
Enter your user password when prompted. Enter the new root password at the Enter new UNIX password prompt and again at the Retype new UNIX password prompt. You should see a message that the password has been updated successfully. To close the Terminal window, type “exit” (without the quotes) at the prompt and press Enter.
Be sure to select a strong password to ensure the security of your computer.
No comments:
Post a Comment