Install & Configure Sudo in AIX

Install Sudo:

  1. Source file in /p690Basel/sudo-1.6.6.0/ sudo-1.6.6.0.bff
#cd /p690Basel/sudo-1.6.6.0
  1. Install sudo-1.6.6.0.bff :
#smitty installp
Configure Sudo
  1. Create group “sysadmin” on server.
  2. Assign the user id to group “sysadmin” as primary group.
  3. Run this command by root:
#/usr/local/sbin/visudo
  1. Edit it and add the group “sysadmin”
# 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
# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
# Allow people in group sysadmin to run all commands
%sysadmin ALL=(ALL) ALL
#%ateam 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
Run Sudo
  1. Login by your user id:
  2. Run this command:
$/usr/local/bin/sudo su -

  1. Input your password like that:
sxia@dmspar01[/homecomm/sxia]# /usr/local/bin/sudo su -
Password:
hello dmspar01
root@dmspar01[/]
  1. You can use your id and password to do something like as you are root.


































Post a Comment

Previous Post Next Post