Parse Error In Usr Local Etc Sudoers
Contents |
communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack
Fix Broken Sudoers File
Overflow the company Business Learn more about hiring developers or posting ads with us sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin Ask Ubuntu Questions Tags Users Badges Unanswered Ask Question _ Ask Ubuntu is a question and answer site for Ubuntu users and /etc/sudoers is world writable developers. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top How to modify a
/etc/sudoers.d/50_stack_sh: Syntax Error Near Line 1
invalid /etc/sudoers file? It throws out an error and not allowing me to edit again up vote 159 down vote favorite 64 How do I edit an invalid visudo file? Here is what happens: $ sudo visudo >>> /etc/sudoers: syntax error near line 28 <<< sudo: parse error in /etc/sudoers near line 28 sudo: no valid sudoers sources found, quitting sudo visudo share|improve this question edited Oct 11 '14 at 16:47 KasiyA 13.9k1458110
No Valid Sudoers Sources Found Quitting Centos
asked Oct 30 '11 at 19:15 YumYumYum 3,3992477119 2 great question considering this page creates that error help.ubuntu.com/community/RootSudoTimeout –user128334 Sep 21 '13 at 18:14 add a comment| 13 Answers 13 active oldest votes up vote 235 down vote accepted +50 On a modern Ubuntu system (and many other GNU/Linux distributions), fixing a corrupted sudoers file is actually quite easy, and doesn't require rebooting, using a live CD, or physical access to the machine. To do this via SSH, log in to the machine and run the command pkexec visudo. If you have physical access to the machine, SSH is unnecessary; just open a Terminal window and run that pkexec command. Assuming you (or some other user) are authorized to run programs as root with PolicyKit, you can enter your password, and then it will run visudo as root, and you can fix your /etc/sudoers. If you need to edit one of the configuration files in /etc/sudoers.d (which in uncommon in this situation, but possible), use pkexec visudo -f /etc/sudoers.d/filename. If you have a related situation where you have to perform additional system administration commands as root to fix the problem (also uncommon in this circumstance, but common in others), you can start an interactive root shell with pkexec bash. Generally speaking, any non-graphical command you'd
Get Kubuntu Get Xubuntu Get Lubuntu Get UbuntuStudio Get Mythbuntu Get Edubuntu Get Ubuntu-GNOME Get UbuntuKylin Ubuntu Code of Conduct Ubuntu Wiki no valid sudoers sources found quitting ubuntu Community Wiki Other Support Launchpad Answers Ubuntu IRC Support AskUbuntu Official Documentation
No Valid Sudoers Sources Found Quitting Linux
User Documentation Social Media Facebook Twitter Useful Links Distrowatch Bugs: Ubuntu PPAs: Ubuntu Web Upd8: Ubuntu OMG! default sudoers file Ubuntu Ubuntu Insights Planet Ubuntu Activity Page Please read before SSO login Advanced Search Forum The Ubuntu Forum Community Ubuntu Official Flavours Support New to Ubuntu [SOLVED] Can't Access Sudoers http://askubuntu.com/questions/73864/how-to-modify-a-invalid-etc-sudoers-file-it-throws-out-an-error-and-not-allowi File in Ubuntu, Kubuntu, Xubuntu Having an Issue With Posting ? Do you want to help us debug the posting issues ? < is the place to report it, thanks ! Results 1 to 8 of 8 Thread: Can't Access Sudoers File in Ubuntu, Kubuntu, Xubuntu Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch https://ubuntuforums.org/showthread.php?t=2036382 to Hybrid Mode Switch to Threaded Mode August 1st, 2012 #1 gdawg View Profile View Forum Posts Private Message 5 Cups of Ubuntu Join Date May 2010 Location New Mexico, USA Beans 39 DistroUbuntu 10.04 Lucid Lynx Can't Access Sudoers File in Ubuntu, Kubuntu, Xubuntu I managed to somehow mess-up /etc/sudoers file and now I am unable to access it. I added 2 users to the file using 'sudo visudo' command and apparently messed something up. Here are the results of attempts to access file: Code: jane@gdawg-Inspiron-530s:~$ sudo visudo sudo: >>> /etc/sudoers: syntax error near line 9 <<< sudo: >>> /etc/sudoers: syntax error near line 9 <<< sudo: parse error in /etc/sudoers near line 9 sudo: no valid sudoers sources found, quitting... sudo: unable to initialise policy plug-in I recently installed Ubuntu Remix. All help is welcome. Linux gdawg-Inspiron-530s 3.2.0-27-generic-pae #43-Ubuntu SMP Fri Jul 6 15:06:05 UTC 2012 i686 i686 i386 GNU/Linux Adv Reply August 1st, 2012 #2 drs305 View Profile View Forum Posts Private Message Staff Emeritus Join Date Jan 2007 BeansHidden! DistroUbun
• All times are UTC - 6 hours [ DST ] Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
did sudo vim /etc/sudoers and added the following to it: Cmnd_Alias GEM_INSTALL = /usr/bin/gem install * Cmnd_Alias GEM_UNINSTALL = /usr/bin/gem uninstall * vitaly ALL=NOPASSWD GEM_INSTALL vitaly ALL=NOPASSWD GEM_UNINSTALL The intention was to grant myself permissions to install gems w/o entering password. I know its insecure, but this is security-vs-convinience kind of thing and I only intended to leave it there for a couple of hours while I do some heavy gem development. Anyway, experienced unix users might have spotted the syntax error in my sudoers edits. I forgot the : just after the NOPASSWD. But the problem is even more basic then that. I shouldn't have beed editing the file directly. I should have known better. And now I'm paying the price: $ sudo >>> sudoers file: syntax error, line 36 <<< >>> sudoers file: syntax error, line 37 <<< sudo: parse error in /private/etc/sudoers near line 36 $ sudo vim /etc/sudoers >>> sudoers file: syntax error, line 36 <<< >>> sudoers file: syntax error, line 37 <<< sudo: parse error in /private/etc/sudoers near line 36 OOPS! Now the sudoers file is broken and I can't even fix it since I was using sudo to edit it! Never do that! :) Use the visudo command. it will check the file syntax before 'commiting' it. Now what? I looked at the net and the general consensus is that you need to boot into a single-user mode to fix it. I really really didn't want to do it. I have 4G of RAM and so I'm usually running dozens of programs and its a pain to close and reopen them all after boot. I'm lazy :) Then I thought there might be a better way. First I checked the permissions on the sudoers file: $ ls -l /etc/sudoers -r--r-----+ 1 root wheel 1302 Sep 28 17:20 /etc/sudoers and only 'root' is in the group wheel, so no luck here. I also couldn't 'su root' since my root user doesn't have a password. duh! But then it appeared to me that I might be able to circumvent this protection by leveraging my OS X 'admin' status. After all it ought to count for something :). I opened "/etc" folder in finder (Go -> Go to Folder...), then opened sudoers file properties. Opening the lock there doesn't require to be a root.