LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   YAQASU - yet another question about super user (https://www.linuxquestions.org/questions/linux-newbie-8/yaqasu-yet-another-question-about-super-user-4175507132/)

Bindairdundat 06-05-2014 09:56 AM

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.

pan64 06-05-2014 09:59 AM

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....

Bindairdundat 06-05-2014 10:29 AM

Quote:

Originally Posted by pan64 (Post 5182933)
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

maples 06-05-2014 05:38 PM

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.

ymf331 06-05-2014 06:44 PM

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.


All times are GMT -5. The time now is 12:42 AM.