Etc/sudoers Syntax Error Near Line 18
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 parse error in etc sudoers near the company Business Learn more about hiring developers or posting ads with us Ask Ubuntu sudo parse error in etc sudoers Questions Tags Users Badges Unanswered Ask Question _ Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them;
Fix Broken Sudoers File
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 can I fix broken sudo -
Sudo: No Valid Sudoers Sources Found, Quitting Sudo: Unable To Initialize Policy Plugin
sudo: parse error in /etc/sudoers near line 23? up vote 18 down vote favorite 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 /etc/sudoers.d/50_stack_sh: syntax error near line 1 am a newbie to Ubuntu, I got sick of Windows :) So far I've found some people suggesting booting in single user 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 mor
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
/etc/sudoers Is World Writable
site About Us Learn more about Stack Overflow the company Business Learn more no valid sudoers sources found quitting centos about hiring developers or posting ads with us Ask Ubuntu Questions Tags Users Badges Unanswered Ask Question _ Ask Ubuntu default sudoers file is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The http://askubuntu.com/questions/209558/how-can-i-fix-broken-sudo-sudo-parse-error-in-etc-sudoers-near-line-23 best answers are voted up and rise to the top sudoers file corrupted up vote 1 down vote favorite My server crashed and I had to restart it from the power button. However once I restarted it i can no longer run sudo. When I try I get >>> /etc/sudoers: syntax error near line 1 <<< sudo: parse error in /etc/sudoers near line 1 sudo: no valid http://askubuntu.com/questions/612731/sudoers-file-corrupted sudoers sources found, quitting sudo: unable to initialize policy plugin I then ran pkexec visudo which returns ��������������������������ï¿ï¿½u�fZc�f�<��^F� ��^H���g���&^R& k^N�^[N)��@{^H�Ƽ^P��8^^����0,(iȼ4_ï¿ï¿½ï¿½d$9��y^YW�ż^O}�f��ȼ0v��lE"G^A^@^Y1���$ So how do I recreate my sudoers file, or am I boned? 14.10 sudo share|improve this question asked Apr 23 '15 at 5:42 Dowlers 18519 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote accepted Here's the default /etc/sudoers file in Trusty: # # This file MUST be edited with the 'visudo' command as root. # # Please consider adding local content in /etc/sudoers.d/ instead of # directly modifying this file. # # See the man page for details on how to write a sudoers file. # Defaults env_reset Defaults mail_badpass Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" # Host alias specification # User alias specification # Cmnd alias specification # User privilege specification root ALL=(ALL:ALL) ALL # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL # Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) ALL # See sudoers(5) for more information on "#include" directives: #includedir /etc/sudoers.d You can replace your corrupted /etc/sudoers file with this one using a Live DVD: Boot from a Live DVD Open Terminal with
Tags Search LQ Wiki Search Tutorials/Articles Search HCL Search Reviews Search ISOs Go to Page... LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie Why i am getting this error when trying to do su http://www.linuxquestions.org/questions/linux-newbie-8/why-i-am-getting-this-error-when-trying-to-do-su-sudo-4175479212/ sudo User Name Remember Me? 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 Welcome to LinuxQuestions.org, a friendly and active Linux Community. You are currently viewing LQ as a guest. By joining our community you will have the ability to post syntax error topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today! Note that registered members see fewer ads, and ContentLink is completely disabled once you log in. Are you new to LinuxQuestions.org? Visit the following links: Site Howto | Site FAQ | Sitemap | Register Now If you have any problems with the registration process syntax error near or your account login, please contact us. If you need to reset your password, click here. Having a problem logging in? Please visit this page to clear all LQ-related cookies. Introduction to Linux - A Hands on Guide This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter. For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own. Click Here to receive this Complete Guide absolutely free. Search this Thread 10-01-2013, 09:47 AM #1 prathamesh7478 LQ Newbie Registered: Feb 2013 Location: Pune Distribution: Unix,Solaris,Ubuntu. Posts: 27 Rep: Why i am getting this error when trying to do su sudo Hi Guys, Can you please help me why i am getting following error when i am trying to accesses one of Production Servers. -bash-4.1