reset root password [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 password [Solved]

Postby m.reza » Sat Dec 21, 2013 13:46

Hello, everybody.
I installed virtualbox and used "usermod" to add my username to vboxusers. Now, I can't access root anymore. I tried "sudo su -" to change root password, but I'm not a sudoer. I also tried to use recovery mode, but it asks for root password too.
Help me reset the root password, please.
Thanks.
Last edited by m.reza on Sun Dec 22, 2013 12:50, edited 1 time in total.
m.reza
Young Hen
 
Posts: 30
Joined: Sat Dec 21, 2013 13:37

Re: reset root password

Postby batvink » Sat Dec 21, 2013 14:48

I quess you have to reset your root-password using a live-cd., described in our Wiki:
https://wiki.sabayon.org/index.php?title=HOWTO:_chroot_from_a_LiveCD

Read carefully, and Just follow step by step.
Once chrooted in the installed Environment, you got yourself a root-prompt.
Simply enter:
Code: Select all
passwd

to assign a new password for root.
User avatar
batvink
Old Dear Hen
 
Posts: 495
Joined: Sun Oct 28, 2007 11:44
Location: the netherlands

Re: reset root password

Postby m.reza » Sat Dec 21, 2013 16:00

Thank you for the answer.
I followed the instructions in wiki. I didn't encounter any errors, but it doesn't still work. I get "permission denied" in terminal.
m.reza
Young Hen
 
Posts: 30
Joined: Sat Dec 21, 2013 13:37

Re: reset root password

Postby batvink » Sat Dec 21, 2013 17:08

???
on the live-cd?
User avatar
batvink
Old Dear Hen
 
Posts: 495
Joined: Sun Oct 28, 2007 11:44
Location: the netherlands

Re: reset root password

Postby m.reza » Sat Dec 21, 2013 17:29

No, I get "permission denied" in installed Sabayon. I used live-USB to do all those stuff. When I rebooted to my Sabayon, it was like before.

Anybody, please help. I can't update my Sabayon or install anything :cry:
m.reza
Young Hen
 
Posts: 30
Joined: Sat Dec 21, 2013 13:37

Re: reset root password

Postby batvink » Sun Dec 22, 2013 11:07

you don't get a root-prompt after chrooting? (thus: chroot failed)
or "permission denied" when entering passwd....
User avatar
batvink
Old Dear Hen
 
Posts: 495
Joined: Sun Oct 28, 2007 11:44
Location: the netherlands

Re: reset root password

Postby m.reza » Sun Dec 22, 2013 11:13

I did everything that wiki page said. Then I entered "passwd" and entered a password (which is supposed to be the new root pasword). Then I exit from "chrooted" and "umount" the partitions. Then I reboot and start my real Sabayon (which is installed on my hard disk. When I want to "su", I enter the password the I set in live session. But it returns "permission denied."
m.reza
Young Hen
 
Posts: 30
Joined: Sat Dec 21, 2013 13:37

Re: reset root password

Postby batvink » Sun Dec 22, 2013 11:27

Ah, of course.
You said earlier that you don't have permission, because you're not a sudoer.
You chould chroot again, and within the chroot add yourself to the sudoers file.
Enter:
Code: Select all
visudo

and alter the file.
It should look like this:
http://pastebin.sabayon.org/pastie/15873
User avatar
batvink
Old Dear Hen
 
Posts: 495
Joined: Sun Oct 28, 2007 11:44
Location: the netherlands

Re: reset root password

Postby m.reza » Sun Dec 22, 2013 11:48

Thank you. Now, I can at least update Sabayon and install sofwares. I added this line:
Code: Select all
<username> ALL=(ALL) ALL

I can now sudo.
Is there anyway to have the old root? 'Cause I can't still access it.
m.reza
Young Hen
 
Posts: 30
Joined: Sat Dec 21, 2013 13:37

Re: reset root password

Postby batvink » Sun Dec 22, 2013 11:53

add yourself to the wheel group,
and add this line to the sudoers file:
Code: Select all
%wheel  ALL=ALL
User avatar
batvink
Old Dear Hen
 
Posts: 495
Joined: Sun Oct 28, 2007 11:44
Location: the netherlands

Next

Return to Beginners|Newbies Area

Who is online

Users browsing this forum: No registered users and 4 guests