Sudoers Installation in AIX

  1. Download the rpm file needed to install the sudoers package in AIX
    AIX open sources rpms
    Search for the file sudo-1.6.7p5-3.aix5.1.ppc.rpm and download it
  2. Copy the downloaded file to the AIX servers /tmp/SUDO directory
  3. change the permission to chmod 777 <Filename>
    4.smitty install-> Install and Update Software-> Install Software-->INPUT device / directory for software [.]#current directory
    SOFTWARE to install (Press Esc+F4 which displays the rpm file in the directory)
    ACCEPT new license agreements? Yes
    and press enter to install the rpm File on your machine
  4. Configuring logs for Sudo
vi /etc/sudoers
place an entry @ the end of the file
Defaults log_year,logfile=/var/log/sudo.log
SUDOERS FILE SAMPLE
# visudo
------------------------------------------------------------------------------------------
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
# Host alias specification
# User alias specification
# Cmnd alias specification
# Defaults specification
# User privilege specification
root ALL=(ALL) ALL
sound ALL=(ALL) ALL
uday ALL=(ALL) ALL
sandeep ALL=(ALL) ALL
neha ALL=(ALL) ALL
# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
Defaults log_year,logfile=/var/log/sudo.log
#Defaults syslog=auth

----------------------------------------------------------------------------------------------------
6.Enter visudo command to view and putting an entry of the users in the /etc/sudoers quit it by saving it.
7. Login into the userlogin by opening a duplicate session of su <user name> and enter sudo -s for sudo -s login credentials.
8. Finally check the log file

# more /var/log/sudo.log
May 14 18:37:20 2010 : sound1 : TTY=pts/1 ; PWD=/home/sound1 ; USER=root ; COMMAND=/usr/bin/ksh
May 14 18:50:06 2010 : uday : TTY=pts/0 ; PWD=/ ; USER=root ; COMMAND=/bin/bsh
May 14 19:23:34 2010 : sound1 : TTY=pts/3 ; PWD=/home/sound1 ; USER=root ; COMMAND=/usr/bin/ksh
May 17 14:23:05 2010 : sound1 : TTY=pts/2 ; PWD=/home/sound1 ; USER=root ; COMMAND=/usr/bin/ksh
May 17 14:27:56 2010 : neha : TTY=pts/2 ; PWD=/home/neha ; USER=root ; COMMAND=/usr/bin/ksh
May 17 14:30:45 2010 : neha : TTY=pts/2 ; PWD=/home/neha ; USER=root ; COMMAND=/usr/bin/ksh
May 17 14:31:49 2010 : sandeep : TTY=pts/2 ; PWD=/home/sandeep ; USER=root ; COMMAND=/usr/bin/ksh

This is the way to use the sudoers in AIX.

Between step 3 and 4: change to the directory "/tmp/SUDO" and run the command

inutoc .

This will create the file ".toc" in the directory, which is used as information base about the packages in this directory.

bakunin

inutoc is not necessary.. As I have not done that.

Is the sudo rpm compatible with all AIX versions? ie AIX 5.3 & 6.1 ?

Thanks

yes its compatible with the versions you asked for.
:b: