LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-05-2014, 10:56 AM   #1
Bindairdundat
LQ Newbie
 
Registered: May 2014
Posts: 14

Rep: Reputation: Disabled
Question YAQASU - yet another question about super user


OK... I have been trying to grant the user jbo on CentOS root access on a development box. Please don't ask me why, it is the documentation as a requirement, even though I don't agree with it. they break it, they can flippin fix it.

Anyways... I have tried giving the following in the \etc\sudoers file

jbo ALL=(ALL) ALL

I have also added the user to the Root and Wheel group and uncommented out those lines from the sudoers file.

but that doesn't seem to do a damn thing... when I go to the prompt and do the SU command, I still have to enter the Root user password (which I DO NOT want to give these guys...)

I am pretty much a noob to Linux... but I have been a system admin for over 10 years. from everything I was able to glean, this little change should do the trick, but the OS is unfazed..

I am thinking this might be my lack of understanding of the purpose of the groups and sudoer's file.

a lil help or noob edjemekation would be appreciated. Thanks folks.
 
Old 06-05-2014, 10:59 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,917

Rep: Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921
oh yes, you mixed two different commands: the su and sudo. su is not related to /etc/sudoers. You need to use sudo <command>. see man page....
 
1 members found this post helpful.
Old 06-05-2014, 11:29 AM   #3
Bindairdundat
LQ Newbie
 
Registered: May 2014
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
oh yes, you mixed two different commands: the su and sudo. su is not related to /etc/sudoers. You need to use sudo <command>. see man page....
thanks... I think I may have a handle on this now

what is the difference between running the command

$sudo yum update <--- fails, "must be root"

and

sudo yum update <--- which succeeds, but being offline doesn't work anyways
 
Old 06-05-2014, 06:38 PM   #4
maples
Member
 
Registered: Oct 2013
Location: IN, USA
Distribution: Arch, Debian Jessie
Posts: 813

Rep: Reputation: 264Reputation: 264Reputation: 264
Are you typing the dollar sign? Because if you are, that explains the problem. '$sudo' would be a variable, and it is apparently empty, so the end result is ' yum update' which then results in the permission error. Whenever you see
Code:
$command -flags
it means that you should type the command in as a non-root user. You do NOT type the dollar sign. Similarly, when you see
Code:
#command -flags
it means that you need to run the command as the ROOT user. Prefixing the command with sudo usually takes care of this. Again, you do NOT type the pound/hashtag symbol. In this case, it would treat it as a comment, since that symbol indicates a comment in bash.

Last edited by maples; 06-05-2014 at 09:23 PM.
 
1 members found this post helpful.
Old 06-05-2014, 07:44 PM   #5
ymf331
Member
 
Registered: May 2014
Posts: 50

Rep: Reputation: Disabled
Is jbo your username, then? I've been using su -s primarily when I need root access, but I've read that it's better to use "USER HOST=(root) COMMANDPATH" for security reasons. I use a 20-char password myself, so adding the NOPASSWD flag helps in some cases. Basically, su logs you into root and sudo issues the command as root, giving the app root access as well. Main difference I can see for your issue is that sudo takes user pass as long as you give it access, while logging into the shell as root obviously requires the root pass. I'd Google sudo security problems as well. For instance, you can shell out of less or a text editor to alter files you shouldn't have access to. You can deny all of that if you configure it properly. Like I said, I'm new to all of this so forgive me if I missed the point.
 
  


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
Super user—yes! Super Cow? vyver Ubuntu 10 10-24-2010 08:29 PM
How do i change to super user then revert back to ordinary user ,using shell script? wrapster Solaris / OpenSolaris 6 03-18-2009 04:37 AM
super user privileges check for a normal user in bash script freeindy Programming 2 08-01-2008 07:08 AM
Super-User question , explained below Linux_interest Linux - Newbie 5 09-05-2004 10:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:39 PM.

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