LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
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


Reply
  Search this Thread
Old 10-01-2013, 09:47 AM   #1
prathamesh7478
Member
 
Registered: Feb 2013
Location: Pune
Distribution: Unix,Solaris,Ubuntu.
Posts: 35

Rep: Reputation: Disabled
Question 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$ sudo su - jupiter
sudo: >>> /etc/sudoers: syntax error near line 114 <<<
sudo: parse error in /etc/sudoers near line 114
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

Thanks,
Pat B
 
Old 10-01-2013, 09:53 AM   #2
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian Jessie / sid
Posts: 1,471

Rep: Reputation: 444Reputation: 444Reputation: 444Reputation: 444Reputation: 444
looks like your /etc/sudoers file is broken..
might be line 114


and "sudo su - jupiter" is just silly

sudo # get root
su # switch user ( not superuser )
- # make the shell a login shell
<user>

this does the same

Code:
sudo -i -u jupiter
 
Old 10-01-2013, 09:58 AM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,133
Blog Entries: 2

Rep: Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836
Quote:
Originally Posted by prathamesh7478 View Post
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$ sudo su - jupiter
sudo: >>> /etc/sudoers: syntax error near line 114 <<<
sudo: parse error in /etc/sudoers near line 114
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

Thanks,
Pat B
As Firerat pointed out, there is a syntax error in your sudoers file. This can happen if you don't use the recommended command visudo to edit the sudoers file. visudo will check the file for errors before saving it.
 
Old 10-02-2013, 12:56 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,356

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
If you know the passwd, you could just
Code:
su - jupiter
 
Old 10-02-2013, 01:53 AM   #5
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian Jessie / sid
Posts: 1,471

Rep: Reputation: 444Reputation: 444Reputation: 444Reputation: 444Reputation: 444
assumes jupiter has a password

actually, my previous offering assumes jupiter has a home dir,
if not

Code:
sudo -u jupiter <shell>
shell = sh, bash, csh, tsch, ksh, ....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
sudo error f4drvr Linux - Server 4 09-18-2013 01:41 PM
LXer: The Ultimate Sudo FAQ To Sudo Or Not To Sudo? LXer Syndicated Linux News 13 04-13-2013 01:36 AM
sudo to solve this error "tar: Error exit delayed from previous errors" ? xombboxer Linux - Newbie 7 03-13-2012 02:26 AM
[SOLVED] error of sudo sandyrouge Linux - Newbie 4 03-07-2011 11:33 PM
sudo error mouse46 Ubuntu 7 03-07-2009 06:20 AM


All times are GMT -5. The time now is 12: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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration