Not able to reset root password

I lost my my root password. So, I’m resetting my root password using Using bash as init method(I’m not able to include links in this post)
But when I’m appending init=/bin/bash to kernel paramater. I’ve been promoted to bash written [majaro/]$
And not
[root@**] as shown in some tutorials.
So, I followed every steps but couldn’t able to reset my password.
Please help.

Hi @NeurlAP1, and welcome!

If you still have your normal user’s password, it should be quite easy.

Just open a terminal and run:

sudo su -

To change to the root user. From there, run:

passwd

And enter the new password for root.

Done! Close, exit and test…

Thanks, actually I forgot my sudo password.
So, I’m not able to run any sudo commands.

Are those “tutorials” for manjaro linux. If not then you can follow Reset lost root password - ArchWiki. Also note that manjaro comes with a preconfigured bashrc for both the user and the root. If you are not sure if you are running as root run id -u. Output 0 means root.

Screenshot

Screenshot_20220312_161229

1 Like

sudo uses your standard user’s password, not the root user.

When booting with
init=/bin/bash
your root filesystem is mounted read only

remount it read-write
mount -o remount,rw /
then you can change the password with
passwd

Actually, it has worked previously.
And how to change standard user password :smiling_face_with_tear::smiling_face_with_tear::smiling_face_with_tear:?

Yes, It worked but it’s not changing my sudo password.

Standard user’s password can be changed by just running:

passwd

as that user.

passwd NeurlAP1
(the username you want to change it for …)

1 Like

Thanks, it worked :heart::heart::heart::heart:

Thanks, community for quick support…

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.