Saturday, June 9, 2018

Assign root privilege to normal user using sudoers on AIX

Assign root privilege to normal user using sudoers file.

Unix root user is master of all user.but sometime situation demand that other user also need access of command which are only executed by root user .

Here /etc/sudoers file come in picture. this configuration file containing stanza for user and their access right.visudo is the command used for editing  /etc/sudoers file.

# User privilege specification
root    ALL=(ALL) ALL

In above yellow highlighted text user oracle and webuser able to execute all root user command without entering root password.

Following are some example where normal  user provided root command access.

If admin wants to provide poweroff command access to user test,then following will be the stanza in /etc/sudoers.
 test ALL=(ALL) NOPASSWD: /sbin/poweroff

Default log file for sudo log

Defaults logfile=/var/adm/sudo.log

No comments:

Post a Comment