Configure LDAP group for SUDO CentOS 6

Configure LDAP group for SUDO CentOS 6

Configure LDAP group for LOCAL SUDO CentOS 6

** THERE IS A BETTER WAY TO DO THIS THAT YOU SHOULD CONSIDER**

389 Sudo LDAP Integration

This blog assumes you have already installed SUDO on your server, and that your server is joined to LDAP

if not, issue yum -y install sudo.x86_64, and run authconfig-tui

at this point, edit your sudoers file using the following command:

visudo command to edit the sudoers file

you are now editing the sudo config file, go to line 98, or to the area where it shows allowing root to run any command

sudoers line 98: root ALL=(ALL) ALL under Allow root to run any commands anywhere

In this example, we are giving the “sudo” LDAP group access to run root commands

sudoers line 99 %sudo ALL=(ALL) ALL added below the root entry for the LDAP sudo group

save + quit

now login as a user that’s a member of the SUDO LDAP group

type the word sudo, and then a command that you would only be able to do as root

sudo yum -y update run by an LDAP user

you should get a nice warning that re-emphasizes your use of root

sudo lecture warning and [sudo] password for andrew prompt

type in your LDAP password, and hit enter

sudo yum -y update output: Setting up Update Process, No Packages marked for Update

Success, in this case, the command ran as root, all is working!

That’s it!

Hosted Linux Servers at www.zwiegnet.com/go

Leave a Reply

Your email address will not be published. Required fields are marked *