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.
Table of Contents
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
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
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.
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:
Step 2: Open User Settings
Next, open the “System” setting from the left pane, and navigate to the “User” settings option:
Step 3: Unlock the User
Now, first, unlock the user account using the “Unlock” button. Then, press the “Password” menu to change the password:
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:
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.
Software engineer with 3+ years of expertise in Linux, Windows, and multiple programming languages. Proficient in Docker, Kubernetes, and Elasticsearch. Passionate about building scalable systems and helping others through clear, problem-solving guides