Parse Error 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 sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin the workings and policies of this site About Us Learn more about /etc/sudoers.d/50_stack_sh: syntax error near line 1 Stack Overflow the company Business Learn more about hiring developers or posting ads with us Ask Ubuntu Questions /etc/sudoers is world writable Tags Users Badges Unanswered Ask Question _ Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute: Sign up Here's no valid sudoers sources found quitting centos 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 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: $
Default Sudoers File
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 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
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
Pkexec
Overflow the company Business Learn more about hiring developers or posting ads with us Unix /etc/sudoers syntax error near line what now & Linux Questions Tags Users Badges Unanswered Ask Question _ Unix & Linux Stack Exchange is a question and answer site for no valid sudoers sources found quitting linux 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 http://askubuntu.com/questions/73864/how-to-modify-a-invalid-etc-sudoers-file-it-throws-out-an-error-and-not-allowi and rise to the top Problem with sudoers file. Syntax error at line 82, 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 http://unix.stackexchange.com/questions/206355/problem-with-sudoers-file-syntax-error-at-line-82-but-cannot-find-exactly-what username to the list and the file permissions are currently: -r--r----- 1 root root 3419 May 29 11:57 /etc/sudoers I get 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 NETW
parse error in /etc/sudoers near line -1 Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Below is a copy of my sudo file rimini is https://www.sudo.ws/pipermail/sudo-users/2015-June/005630.html the group I'm having problems with, I can sudo to viprsrm without the parse error. # sudoers file. # # This file MUST be edited with the 'visudo' command as root. # Failure https://www.raspberrypi.org/forums/viewtopic.php?t=57750&p=434943 to use 'visudo' may result in syntax or file permission errors # that prevent sudo from running. # # See the sudoers man page for the details on how to write a sudoers no valid file. # # Host alias specification # # User alias specification # # Cmnd alias specification # # Defaults specification # # Runas alias specification # # User privilege specification root ALL=(ALL) ALL # # Uncomment to allow people in group wheel to run all commands # %wheel ALL=(ALL) ALL # # Same thing without a password # %wheel ALL=(ALL) NOPASSWD: ALL # # Samples # %users no valid sudoers ALL=/sbin/mount /cdrom,/sbin/umount /cdrom # %users localhost=/sbin/shutdown -h now # let oracle accounts do some things to start/stop the database oratst ALL=(appltst) NOPASSWD:ALL oravis ALL=(applvis) NOPASSWD:ALL oracle ALL=(applmgr) NOPASSWD:ALL orat01a ALL=(applt01a) NOPASSWD:ALL sadbam ALL=(oracle) NOPASSWD:ALL sadba ALL=(oracle) NOPASSWD:ALL sadbam ALL=(applmgr) NOPASSWD:ALL sadba ALL=(applmgr) NOPASSWD:ALL #allows user viprsm to run the inq command viprsrm ALL=(ALL) NOPASSWD:/usr/lpp/EMC/Symmetrix/bin/inq.aix64_51 #Rimini Street accounts can sudo as oracle or applmgr %rimini ALL=(oracle) NOPASSWD:ALL %rimini ALL=(applmgr) NOPASSWD:ALL -----Original Message----- From: sudo-users [mailto:sudo-users-bounces at sudo.ws] On Behalf Of Todd C. Miller Sent: Tuesday, June 09, 2015 1:15 PM To: Eugene J. Pate Cc: sudo-users at sudo.ws Subject: Re: [sudo-users] Sudo: parse error in /etc/sudoers near line -1 On Tue, 09 Jun 2015 16:13:28 -0000, "Eugene J. Pate" wrote: > Hi guys I'm receiving the following error on an AIX server, can someone help? > > Sudo su - oracle > "Sudo: parse error in /etc/sudoers near line -1" You should try running visudo as root. Chances are there is a syntax error on the first line. If you just want to check the syntax you can run: # visudo -c - todd ____________________________________________________________ sudo-users mailing list
line 28(rpi) Post a reply 11 posts by rpi_ayu » Wed Oct 09, 2013 8:15 am when i edited my sudoers file & saved it on raspberry pi its giving me.Code: Select allsudo: parse error in /etc/sudoers near line 26
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin on raspberry pi
i am trying to avoid sudo permissions for a bash which is trying to access a root file i also tried pkexec as like general linux solution but its givingCode: Select allpi@raspberrypi ~ $ pkexec vim.tiny /etc/sudoers
-bash: pkexec: command not found is there any solution for this Last edited by rpi_ayu on Wed Oct 09, 2013 8:49 am, edited 1 time in total. Posts: 30Joined: Tue Sep 24, 2013 10:55 amLocation: Bhopal by FinnAnder » Wed Oct 09, 2013 8:20 am Please could you post the content of your sudoers file?As for your pkexec error, that is because it hasn't been installed (or not properly).I don't know where you got this pkexec from, but if it's on the repositories, you can install it with:sudo apt-get install pkexecHope this helps and I'll have a look at your sudoers file too. --finnian@fxapi.co.ukfxapi.co.uk Posts: 13Joined: Sun Jul 21, 2013 4:50 pm by RaTTuS » Wed Oct 09, 2013 8:42 am sudoedit /etc/sudoers How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.htmlWARNING - some parts of this post may be erroneous YMMV1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX Posts: 8501Joined: Tue Nov 29, 2011 11:12 amLocation: North West UK by rpi_ayu » Wed Oct 09, 2013 8:51 am Code: Select allsudo: parse error in /etc/sudoers near line 26
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin on raspberry pi
still same @Rattus in all the sudo or root operations showing this Posts: 30Joined: Tue Sep 24, 2013 10:55 amLocation: Bhopal by RaTTuS » W