Installing Sudo On Solaris (*update)

Sudo (su "do") allows a system administrator to give certain users (or groups of users) the ability to run some (or all) commands as root while logging all commands and arguments
Sudo is supplied in source form and you need to compile it.
This isn't difficult! Before doing so, you need to have installed the g(un)zip program and a C compiler.

Installing sudo

Prefare the source download it from http://www.courtesan.com/sudo/download.html,

bash> uname -sr
SunOS  5.9
bash> wget ftp://ftp.sudo.ws/pub/sudo/sudo-1.6.9p5.tar.gz
bash> gunzip -dc sudo-1.6.9p56.tar.gz |tar xvf -
bash> cd sudo-1.6.9p5
bash> ./configure
bash> ./make
bash> ./make install

Add environment Parameter ( added in .profile User$)

bash> export PATH=$PATH:/usr/local/bin:/usr/local/sbin:/usr/ccs/bin
bash> export MANPATH=$MANPATH:/usr/man/:/usr/local/man

Added Sudoers

bash> visudo

find
# User privilege specification
root ALL=(ALL) ALL

Add user id to make him power like root

hendra  ALL=(ALL) NOPASSWD:ALL

The power of root

bash> sudo vi /etc/passwd

UPDATE
This post was old, so I will update and try on my Solaris 10 x86.
so enjoy this technically tutor.

First install your compiler, make, wget and don't forget with the dependencies, grab your packet from http://sunfreeware.com

uname -sr
SunOS 5.10
bash> gunzip libiconv-1.11-sol10-x86-local.gz 
bash> gunzip db-4.2.52.NC-sol10-intel-local.gz 
bash> gunzip gcc-3.4.6-sol10-x86-local.gz 
bash> gunzip libgcc-3.4.6-sol10-x86-local.gz 
bash> gunzip make-3.81-sol10-x86-local.gz 
bash> gunzip wget-1.11.4-sol10-x86-local.gz
bash> pkgadd -d libiconv-1.11-sol10-x86-local 
bash> pkgadd -d db-4.2.52.NC-sol10-intel-local 
bash> pkgadd -d libgcc-3.4.6-sol10-x86-local 
bash> pkgadd -d libgcc-3.4.6-sol10-x86-local 
bash> pkgadd -d make-3.81-sol10-x86-local 
bash> pkgadd -d wget-1.11.4-sol10-x86-local

Now install the sudo

bash> export PATH=$PATH:/usr/local/bin:/usr/local/sbin
bash> wget ftp://ftp.sudo.ws/pub/sudo/sudo-1.7.0.tar.gz
bash> gunzip sudo-1.7.0.tar.gz 
bash> tar -xvf sudo-1.7.0.tar 
bash> cd sudo-1.7.0
bash> ./configure 
bash> make
bash> make install

Last try to add anything user as you like

bash> visudo

and find code like here..
# User privilege specification
root ALL=(ALL) ALL

then add user id to make him power like root

hendra  ALL=(ALL) NOPASSWD:ALL

The power of root (part 2)

bash> id
uid=100(hendra) gid=101(jagoan)
bash> export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin
bash> sudo useradd -d /dev/null -s /bin/false tes

Done.

Printed from: http://sysinfo.bascomp.org/2007/09/installing-sudo-on-solaris/ .
© 2010.

5 Comments   »

RSS feed for comments on this post

Leave a Reply

  • Search