How to Change the Root Password on Ubuntu 24.04

Setting up the root password is essential for full access to the system. To change the root password in Ubuntu 24.04, you can utilize the “sudo passwd root” command from the standard user account. 

This blog demonstrates the methods to set or update the root password on Ubuntu 24.04.

How to Change the Root Password with Sudo Rights

The root user is an administrative or super user with complete access to the system. To secure or manage Ubuntu 24.04, a strong root password is required.

To set or update the root user password from the system or standard user account, utilize the following command:

sudo passwd root
changing root password in ubuntu 24.04

How to Change Root Password as Root User

To change the root password as the root user, follow the below steps:

Step 1: Login as Root

First, log in as a root user from the terminal using the following command:

sudo -i
logging in as root user using sudo -i

Step 2: Change Root User Password

Next, execute the “passwd” command to change the root password:

passwd

Provide the new password, retype the password for confirmation, and hit Enter.

changing root password in ubuntu 24.04 using passwd

We have effectively changed the root password, and now exit from the root user terminal using the “exit” command.

How to Change Passwords for Ubuntu Settings App

To change an administrative or root account password, the user can also utilize the “Settings” app in Ubuntu 24.04.

For illustration, follow the below steps:

Step 1: Launch Settings 

First, launch the “Activity” menu using the “Super +A” key. Then, launch the Setting app:

launching settings app in ubuntu 24.04

Step 2: Open User Settings

Next, open the “System” setting from the left pane, and navigate to the “User” settings option:

navigating to users settings in settings app

Step 3: Unlock the User

Now, first, unlock the user account using the “Unlock” button. Then, press the “Password” menu to change the password:

unlocking the user in ubuntu settings

Step 4: Change Password

Lastly, provide the current and new passwords and retype the new ones for validation. Then, press the “Change” button to change the password:

changing root password in ubuntu 24.04 from settings app

To sum up, the user can set or update the root password using the “sudo passwd root” command. Additionally, you can also set or update the administrative or standard user password using the Ubuntu 24.04 settings program.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top