Friday 2 May 2014

How to setup sudo on Oracle Solaris 10

sudo program executes a command with super user privileges with out login with super user. su command do the same but requires to login with super user. In this article i will describe to install and configure sudo packages on Oracle Solaris 10.

You need to have following packages to properly install sudo program. I assumed fresh Oracle Solaris 10 installed which don't have following packages installed.

4. SMCsudo

You can get stable (or latest) releases of these packages from thiswebsite. you can use pkginfo command to check if these packages are already installed on your system.

pkginfo SMClinconv

You can install the above packages by transferring these packages to Solaris system and then switch to root user.

su - root
gunzip libiconv-1.9.2-sol10-x86-local.gz
pkgadd -d libiconv-1.9.2-sol10-x86-local

gunzip libgcc-3.4.6-sol10-x86-local.gz
pkgadd -d libgcc-3.4.6-sol10-x86-local

gunzip libintl-3.4.0-sol10-x86-local.gz
pkgadd -d libintl-3.4.0-sol10-x86-local

gunzip sudo-1.8.3p2-sol10-x86-local.gz
pkgadd -d sudo-1.8.3p2-sol10-x86-local

respond with "add" and "y" to questions asked by pkgadd program.

Now you can create symbolic link for sudo program
ln -s /usr/local/etc/sudoers /etc/sudoersln -s /usr/local/bin/sudo /bin/sudoln -s /usr/local/bin/sudoedit /bin/sudoedit
Now last thing is to add privileged users to /etc/sudoersThis file has 0440 privileged so you need make is writable to add users.chmod 0777 /etc/sudoersvi /etc/sudoers#### User privilege specification##root ALL=(ALL) ALLoracle ALL=(ALL) ALL
now save and change file privileges to 0440 by using following commandchmod 0440 /etc/sudoersNow exit from root and verify command by following method/bin/sudo -u root /usr/sbin/ping localhostIf everything is write you will see response
localhost is aliveif some library missing error you can see which library is missing by usingfollowing command with root userldd /bin/sudoyou will see some (file not found) errors. note library name and download thepackages and use the above method to install missing packages. Installation and Configuration of sudo program completes.

No comments:

Post a Comment