Etc/sudoers Syntax Error Near Line 17
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 Overflow the company Business Learn more about hiring developers
Parse Error In Etc Sudoers Near
or posting ads with us Ask Ubuntu Questions Tags Users Badges Unanswered Ask Question _ Ask sudo parse error in etc sudoers Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute: Sign up Here's how it
Fix Broken Sudoers File
works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top How can I fix broken sudo - sudo: parse error in /etc/sudoers near line 23? up vote 18 down vote favorite sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin 4 I am getting this error: sudo: parse error in /etc/sudoers near line 23 sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin I was trying to disable password authentication so I don't have to type password every time I want to install something, but I probably changed it in a not very good way. I am a newbie to Ubuntu, I got sick of Windows :) So far I've found some people suggesting booting in single user /etc/sudoers.d/50_stack_sh: syntax error near line 1 mode, but I'm afraid of messing things up more. How can I fix this error? sudo share|improve this question edited Sep 15 '13 at 17:46 Alaa Ali 15.4k95173 asked Oct 30 '12 at 11:06 Robert Fáber 91113 If you boot in single user mode and use visudo, then it won't let you save an incorrect file, so you will not be able to mess things up further. –hexafraction Oct 30 '12 at 11:18 Thank you, how do I change the file, then? And, how exactly do I boot in single user mode? –Robert Fáber Oct 30 '12 at 11:19 2 @ObsessiveSSOℲ it would be nice to convert the comment to answer and let the questioner to mark it as the best answer. For future - help - others I mean. –NikTh Oct 30 '12 at 12:14 1 possible duplicate of How to modify a invalid /etc/sudoers file? It throws out an error and not allowing me to edit again –belacqua May 22 '14 at 22:24 2 On newer Ubuntu distributions, there's a simple solution (not requiring any reboot nor recovery), described here: askubuntu.com/a/73872 –user321342 Aug 28 '14 at 11:23 | show 10 more comments 6 Answers 6 active oldest votes up vote 12 down vote Hold Shift immediately while booting so that you get the GRUB screen. Select the recovery mode. Choose to drop to a root terminal. Run mount -n -o remount,rw / and
Asked by Ceaser Webb on 2010-09-16 Tried to download virtual box and received error msg: Previous installation hasn't been completed. The installation could have failed because of an error
/etc/sudoers Is World Writable
in the corresponding software package or it was cancelled in an unfriendly way. no valid sudoers sources found quitting centos You have to repair this before you can install or remove any further software. I then tried the terminal:
Default Sudoers File
sudo apt-get install-f Then I received this: syntax error near line 17 <<< sudo: parse error in /etc/sudoers near line 17 sudo: no valid sudoers sources found, quitting I have NO idea of http://askubuntu.com/questions/209558/how-can-i-fix-broken-sudo-sudo-parse-error-in-etc-sudoers-near-line-23 what I should do. Question information Language: English Edit question Status: Answered For: Ubuntu sudo Edit question Assignee: No assignee Edit question Last query: 2010-09-18 Last reply: 2016-02-11 Related bugs Link existing bug Related FAQ: None Link to a FAQ Rohit R (rr0hit) said on 2010-09-16: #1 Please paste the contents of /etc/sudoers file in paste.ubuntu.com and provide the link here Ceaser Webb (ceaserw) said on https://answers.launchpad.net/ubuntu/+source/sudo/+question/125653 2010-09-16: #2 ceaser@ceaser-laptop:~$ sudo apt-get install -f >>> /etc/sudoers: syntax error near line 17 <<< sudo: parse error in /etc/sudoers near line 17 sudo: no valid sudoers sources found, quitting ceaser@ceaser-laptop:~$ /ect/sudoers file bash: /ect/sudoers: No such file or directory ceaser@ceaser-laptop:~$ /etc/sudoers file bash: /etc/sudoers: Permission denied ceaser@ceaser-laptop:~$ /etc/sudoers bash: /etc/sudoers: Permission denied ceaser@ceaser-laptop:~$ It said permission denied, or maybe I looked in the wrong place. Download as text --- On Thu, 9/16/10, rohit
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 Overflow the company Business Learn more about http://unix.stackexchange.com/questions/206355/problem-with-sudoers-file-syntax-error-at-line-82-but-cannot-find-exactly-what hiring developers or posting ads with us Unix & Linux Questions Tags Users Badges Unanswered Ask http://serverfault.com/questions/251213/repair-a-broken-sudoers-file Question _ Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 Problem with sudoers file. Syntax error at line 82, syntax error but cannot find exactly what? [closed] up vote -5 down vote favorite I ssh'ed into my new Linux machine (no physical access) and I have root credentials. However, I cannot run sudo commands because of some error in the sudoers file made by someone else who logged in as root as well earlier. I used visudo to add my username to the list and the file permissions are currently: -r--r----- 1 root root 3419 May 29 11:57 /etc/sudoers I get syntax error near the following error message : >>> /etc/sudoers: syntax error near line 82 <<< sudo: parse error in /etc/sudoers near line 82 sudo: no valid sudoers sources found, quitting Please have a look and let me know what you guys think is the problem. The contents of my sudoers file are: ## Sudoers allows particular users to run various commands as ## the root user, without needing the root password. ## ## Examples are provided at the bottom of the file for collections ## of related commands, which can then be delegated out to particular ## users or groups. ## ## This file must be edited with the 'visudo' command. ## Host Aliases ## Groups of machines. You may prefer to use hostnames (perhap using ## wildcards for entire domains) or IP addresses instead. # Host_Alias FILESERVERS = fs1, fs2 # Host_Alias MAILSERVERS = smtp, smtp2 ## User Aliases ## These aren't often necessary, as you can use regular groups ## (ie, from files, LDAP, NIS, etc) in this file - just use %groupname ## rather than USERALIAS # User_Alias ADMINS = jsmith, mikem ## Command Aliases ## These are groups of related commands... ## Networking #Cmnd_Alias NETWORKING = /sbin/route, /sbin/ifconfig, /bin/ping, /sbin/dhclient, /usr/bin/net, /sbin/iptables, /usr/bin/rfcomm, /usr/bin/wvdial, /sbin/iwconfig, /sbin/mii-tool ## Installation and management of software #Cmnd_Alias SOFTWARE = /bin/rpm, /usr/bin/up2date, /usr/bin/yum ## Services #Cmnd_Alias SERVICES = /sbin/service, /sbin/chkconfig ## Updating the locate database #Cmnd_Alias LOCATE = /usr/bin/updatedb ## Storage #
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 Overflow the company Business Learn more about hiring developers or posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for system and network administrators. 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 Repair a broken sudoers file [duplicate] up vote 7 down vote favorite 4 Possible Duplicate: Ubuntu : borked my sudoers file, how can I fix it? Problem description: I have broken my /etc/sudoers file by making a typo in it. Now I can no longer use any sudo commands as the below error is thrown. Therefore I can't fix my sudoers file and am effectively stuck. $ sudo nano /etc/sudoers >>> /etc/sudoers: syntax error near line 39 <<< sudo: parse error in /etc/sudoers near line 39 sudo: no valid sudoers sources found, quitting I found few solutions saying I should boot into recovery mode (like the one below) which I would obviously like to avoid. Ubuntu : borked my sudoers file, how can I fix it? Questions: -Are there any other ways to fix it without restarting ubuntu? -If it is so easy to lock yourself out of sudo when modifying the sudoers file (everybody can do a typo), why isn't the sudoers config read from memory instead of the file directly? There would be a command (e.g. sudo-load) that would make sure the syntax is OK before loading the config into memory thus avoid this sort of problems. Solutions: There seems to be 2 ways of recovering it: -if you have the root password you can simply issue a 'su' and then edit the file -if you don't have the root password you need to restart into single user mode ubuntu sudo share|improve this question edited Mar 24 '11 at 9:06 asked Mar 24 '11 at 8:27 Max 1,12263258 marked as duplicate by ThatGraemeGuy, Hangin on in quiet desperation, Rob Moir, Chopper3 Mar 24 '11 at 11:55 This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a ne