LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 11-19-2014, 11:19 AM   #1
33volx
LQ Newbie
 
Registered: Mar 2014
Posts: 21

Rep: Reputation: Disabled
Exclamation Fedora: How can I add myself back to sudoers file?


I've accidentally removed myself from sudoers file by doing `usermod -G user group` without `-a`, and now I am not in the `sudoers` group. I've tried doing `su -` and entering root's password but it says `su: Authecation failure`. Is there a way to add myself back? Using Fedora 20.
 
Old 11-19-2014, 11:32 AM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
If you are physically at the computer and willing to reboot it then using rescue media such as a bootable CD should help you.

To get root without rebooting would need more knowledge of your system than you have posted. Are other users in the sudoers group? Are remote commands allowed as root?
 
Old 11-19-2014, 11:38 AM   #3
33volx
LQ Newbie
 
Registered: Mar 2014
Posts: 21

Original Poster
Rep: Reputation: Disabled
No, no other users are in sudoers group AFAIK (personal computer, I have just one main user).
I think I am going to use Live CD Ubuntu, and try to sudo there and edit /etc/shadow, as explained here: http://unix.stackexchange.com/questi.../168422#168422. Will that work?
 
Old 11-19-2014, 12:55 PM   #4
33volx
LQ Newbie
 
Registered: Mar 2014
Posts: 21

Original Poster
Rep: Reputation: Disabled
Oke, I've managed to fix this. I had to reset my root password: http://fedoraproject.org/wiki/How_to..._root_password. And then I managed to get myself back into sudoers group
 
  


Reply

Tags
fedora, permissions, su, sudo



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
[SOLVED] How to add a new user in sudoers file? ravisingh1 Linux - Security 7 09-01-2013 05:02 AM
[SOLVED] User not in sudoers: How to add user? Permtion Denied for sudoers file esgol Linux - Newbie 3 07-13-2012 07:44 AM
/etc/sudoers file back up steps needed, please ... redhat70 Linux - General 5 07-05-2012 10:43 AM
Fedora /etc/sudoers file and sudoers.d directory davejjj Linux - Newbie 2 10-21-2011 06:19 PM
I deleted /etc/sudoers and creates a new file call sudoers but now it doesnt for visu abefroman Linux - Software 1 11-10-2005 05:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:55 AM.

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