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

reset root pw ? [Solved]

Postby 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.
jolato
Baby Hen
 
Posts: 19
Joined: Sat Jul 21, 2012 12:48

Re: reset root pw ?

Postby 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 :
%wheel ALL=(ALL) NOPASSWD: ALL
manifesto
Growing Hen
 
Posts: 169
Joined: Mon Jul 19, 2010 22:21

Re: reset root pw ?

Postby 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.
then:
passwd and enter new passwd for root...
User avatar
batvink
Old Dear Hen
 
Posts: 495
Joined: Sun Oct 28, 2007 11:44
Location: the netherlands

Re: reset root pw ?

Postby micia » Wed Jul 25, 2012 0:44

I removed a duplicate of this thread, please don't double post.
micia
Sagely Hen
 
Posts: 2718
Joined: Wed Nov 26, 2008 16:41

Re: reset root pw ? [Solved]

Postby 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
svantoviit
Old Dear Hen
 
Posts: 658
Joined: Sun Feb 28, 2010 17:55


Return to Beginners|Newbies Area

Who is online

Users browsing this forum: No registered users and 1 guest