reset root pw ? [Solved]

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :-)

Moderator: Moderators

Post Reply
Baby Hen
Posts: 19
Joined: Sat Jul 21, 2012 12:48

reset root pw ? [Solved]

Post by jolato » Tue Jul 24, 2012 19:40

Is this the correct method ?

To reset the root password I restarted the system into single use mode until I got the #
mount -o rw,remount /dev/sdax
I edited the /etc/shadow file with nano and deleted the encrypted field, saved and checked
I reboot, open terminal, su or su - but the new password doesn't work
Last edited by jolato on Wed Jul 25, 2012 9:16, edited 1 time in total.

Growing Hen
Posts: 180
Joined: Mon Jul 19, 2010 22:21

Re: reset root pw ?

Post by manifesto » Tue Jul 24, 2012 21:18

it should work like root::0:........
if it doesnt you can try to modify /etc/sudoers (visudo -f /etc/sudoers should work as well from cd) and add :
youruser ALL=(ALL) ALL
and/or uncomment %wheel entry if commented and add your user in /etc/group => wheel:x:.....:root,youruser
if you want to be sure (if shadow file is corrupted ) use nopasswd :

User avatar
Old Dear Hen
Posts: 495
Joined: Sun Oct 28, 2007 11:44
Location: the netherlands

Re: reset root pw ?

Post by batvink » Wed Jul 25, 2012 0:26

if you didn't messed with the sudoers file, you are on the wheel group, and just can : sudo su
and enter your own passwd.
passwd and enter new passwd for root...

Sagely Hen
Posts: 2718
Joined: Wed Nov 26, 2008 16:41

Re: reset root pw ?

Post by micia » Wed Jul 25, 2012 0:44

I removed a duplicate of this thread, please don't double post.

Old Dear Hen
Posts: 724
Joined: Sun Feb 28, 2010 17:55

Re: reset root pw ? [Solved]

Post by svantoviit » Wed Jul 25, 2012 10:12

You can restore the root password using a live CD (DVD, USB, whatever)
1. boot the live media
2. mount the root partition
3. cd to the mounted partition
4. chroot /bin/bash
5. passwd

Post Reply