LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-09-2012, 06:04 AM   #1
Adol
Member
 
Registered: Feb 2011
Location: Osaka, Japan
Distribution: Gentoo, Opensuse
Posts: 271

Rep: Reputation: 6
I just lost root acess


Hello,

Not really sure what happened. Everything was working well. I took a lot of time to build a gentoo machine exactly the way I wanted it and have been using it for almost a month now.

I just rebooted and now its saying my su password is not good. Permission denied.

It seems that I just lost root access to my machine. Is there anything I can do? I really dont want to build everything again because it takes a long time.
 
Old 02-09-2012, 06:33 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
reboot, at your grub bootloader menu, hit e to edit, and add a "1" to the kernel options line. This will log you right in as root and then you can run "passwd" to set it again.
 
1 members found this post helpful.
Old 02-09-2012, 08:01 AM   #3
Adol
Member
 
Registered: Feb 2011
Location: Osaka, Japan
Distribution: Gentoo, Opensuse
Posts: 271

Original Poster
Rep: Reputation: 6
Thank you very much.

I was able to start as root and change my password but I still cant get root access when I log into my regular system.

I keep geting
Code:
petreuss@linux ~ $ su
Password: 
su: Permission denied
 
Old 02-09-2012, 08:17 AM   #4
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
Maybe it is other error than password error

I mean try a wrong password to see if error is the same
 
1 members found this post helpful.
Old 02-09-2012, 08:24 AM   #5
Adol
Member
 
Registered: Feb 2011
Location: Osaka, Japan
Distribution: Gentoo, Opensuse
Posts: 271

Original Poster
Rep: Reputation: 6
Thank you everyone. I got it working.

I tried to add my user to the cdrom group by using:
Code:
usermod -G cdrom (username)
I thought that it would append the cdrom group to my username but instead it put my user in only one group.

I fixed it by going to root from boot up with acid_kewpie`s suggestion and adding my user to all of the groups:
Code:
usermod -G users,wheel,audio,cdrom (username)
In my case the wheel group is important for getting root acess.

Thank you very much.
 
Old 02-09-2012, 08:32 AM   #6
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
Next time use -a (append) option for usermod
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Does not acess root passward from user login sushant_pawar Linux - Security 2 11-26-2009 07:50 AM
Lost root password? skaldicpoet9 Slackware 8 03-02-2009 02:14 AM
Check to see which users have root level acess harsh5235 Linux - Newbie 2 05-21-2008 06:40 PM
root acess? SnowSurfAir Linux - Software 12 08-08-2003 04:27 PM
/root help I'm lost hiwatt25 Linux - Newbie 5 06-01-2001 09:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration