Installing Sudo

Download the source code

The source of sudo is available from http://www.courtesan.com/sudo/ or http://www.sudo.ws/sudo/ (mirror site). The current stable version of sudo is V1.7.2p1 and the source code is provided as a compressed tar archive in the file sudo-1.7.2p1.tar.gz. Download this file to a temporary directory, such as /tmp.

Prepare the source code for compilation

Log in as root, make a directory at a convenient point in the file system to hold the source code and copy the source into this directory. For example:

 1. # mkdir -p /opt/source/sudo
 2. # cd /opt/source/sudo
 3. # cp /tmp/sudo-1.7.2p1.tar.gz . 

Unzip and untar the source and then change to the directory created by tar:

 # gunzip sudo-1.7.2p1.tar.gz
 # tar xvf sudo-1.7.2p1.tar
 # cd sudo-1.7.2p1

At this point, you may like to have a look at the README, INSTALL and FAQ files.

Compile the source code and install sudo

Configure the compilation process for your system:

 # ./configure 

Compile the source code:

 # make 

And install the compiled code:

 # make install 

This install the sudo program into /usr/local/bin, the visudo script (see later) into /usr/local/sbin and the manual page into subdirectories of /usr/local/man.

Compile the source code and install sudo

Configure the compilation process for your system:

 # ./configure 

Compile the source code:

 # make 

And install the compiled code:

 # make install 

This install the sudo program into /usr/local/bin, the visudo script (see later) into /usr/local/sbin and the manual page into subdirectories of /usr/local/man.

Modify the search path

If you haven't already done so for other software, you now need to modify the search paths so that the system can find the sudo program and its manual pages. If you're running the CDE windowing system, this is done by editing the file /.dtprofile and adding the following lines (if they aren't already there) to the end of this file:

# PATH=$PATH:/usr/local/bin:/usr/local/sbin:/usr/ccs/bin 
# MANPATH=$MANPATH:/usr/man/:/usr/local/man

Please note that you may need to edit the users .profile and add the following line into the PATH to make the path permenant, this includes root.

PATH=$PATH:/usr/local/bin:/usr/local/sbin:/usr/ccs/bin:/usr/bin

It's advisable to log out and log in again at this point to activate these changes. Make sure that the system can find the sudo program:

 # sudo -V 

The above installation instructions can be found here: http://it.toolbox.com/wiki/index.php/Install_and_configure_sudo_in_AIX

 
aix/aix_sudo-install.txt · Last modified: 06/04/2022 18:51 by andrew