<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sys-Admin Information&#039;s &#187; Privileges</title>
	<atom:link href="http://sysinfo.bascomp.org/category/solaris/privileges/feed/" rel="self" type="application/rss+xml" />
	<link>http://sysinfo.bascomp.org</link>
	<description></description>
	<lastBuildDate>Fri, 23 Apr 2010 09:43:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Installing Sudo On Solaris (*update)</title>
		<link>http://sysinfo.bascomp.org/2007/09/installing-sudo-on-solaris/</link>
		<comments>http://sysinfo.bascomp.org/2007/09/installing-sudo-on-solaris/#comments</comments>
		<pubDate>Tue, 25 Sep 2007 06:44:13 +0000</pubDate>
		<dc:creator>Hendrawan</dc:creator>
				<category><![CDATA[Privileges]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Sudo]]></category>

		<guid isPermaLink="false">http://sysinfo.bascomp.org/2007/09/25/installing-sudo-on-solaris/</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>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<br />
Sudo is supplied in source form and you need to compile it.<br />
This isn't difficult! Before doing so, you need to have installed the g(un)zip program and a C compiler.</p>
<p><strong>Installing sudo</strong></p>
<p>Prefare the source download it from <a href="http://www.courtesan.com/sudo/download.html" target="_blank">http://www.courtesan.com/sudo/download.html</a>,</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #c20cb9; font-weight: bold;">uname</span> <span style="color: #660033;">-sr</span>
SunOS  <span style="color: #000000;">5.9</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>ftp.sudo.ws<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>sudo<span style="color: #000000; font-weight: bold;">/</span>sudo-1.6.9p5.tar.gz
<span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #c20cb9; font-weight: bold;">gunzip</span> <span style="color: #660033;">-dc</span> sudo-1.6.9p56.tar.gz <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">tar</span> xvf -
<span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #7a0874; font-weight: bold;">cd</span> sudo-1.6.9p5
<span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> .<span style="color: #000000; font-weight: bold;">/</span>configure
<span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> .<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> .<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p><strong>Add environment Parameter ( added in .profile User$)</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #007800;">$PATH</span>:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>ccs<span style="color: #000000; font-weight: bold;">/</span>bin
<span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">MANPATH</span>=<span style="color: #007800;">$MANPATH</span>:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>man<span style="color: #000000; font-weight: bold;">/</span>:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">man</span></pre></div></div>

<p><strong>Added Sudoers</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> visudo</pre></div></div>

<p>find<br />
# User privilege specification<br />
root    ALL=(ALL) ALL</p>
<p>Add user id to make him power like root</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">hendra  ALL=(ALL) NOPASSWD:ALL</pre></div></div>

<p><strong>The power of root</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">passwd</span></pre></div></div>

<p><strong>UPDATE</strong><br />
This post was old, so I will update and try on my Solaris 10 x86.<br />
so enjoy this technically tutor.</p>
<p><strong>First install your compiler, make, wget and don't forget with the dependencies, grab your packet from http://sunfreeware.com</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">uname</span> <span style="color: #660033;">-sr</span>
SunOS <span style="color: #000000;">5.10</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #c20cb9; font-weight: bold;">gunzip</span> libiconv-<span style="color: #000000;">1.11</span>-sol10-x86-local.gz 
<span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #c20cb9; font-weight: bold;">gunzip</span> db-4.2.52.NC-sol10-intel-local.gz 
<span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #c20cb9; font-weight: bold;">gunzip</span> gcc-3.4.6-sol10-x86-local.gz 
<span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #c20cb9; font-weight: bold;">gunzip</span> libgcc-3.4.6-sol10-x86-local.gz 
<span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #c20cb9; font-weight: bold;">gunzip</span> make-<span style="color: #000000;">3.81</span>-sol10-x86-local.gz 
<span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #c20cb9; font-weight: bold;">gunzip</span> wget-1.11.4-sol10-x86-local.gz
<span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> pkgadd <span style="color: #660033;">-d</span> libiconv-<span style="color: #000000;">1.11</span>-sol10-x86-local 
<span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> pkgadd <span style="color: #660033;">-d</span> db-4.2.52.NC-sol10-intel-local 
<span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> pkgadd <span style="color: #660033;">-d</span> libgcc-3.4.6-sol10-x86-local 
<span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> pkgadd <span style="color: #660033;">-d</span> libgcc-3.4.6-sol10-x86-local 
<span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> pkgadd <span style="color: #660033;">-d</span> make-<span style="color: #000000;">3.81</span>-sol10-x86-local 
<span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> pkgadd <span style="color: #660033;">-d</span> wget-1.11.4-sol10-x86-local</pre></div></div>

<p><strong>Now install the sudo</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #007800;">$PATH</span>:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>sbin
<span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>ftp.sudo.ws<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>sudo<span style="color: #000000; font-weight: bold;">/</span>sudo-1.7.0.tar.gz
<span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #c20cb9; font-weight: bold;">gunzip</span> sudo-1.7.0.tar.gz 
<span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xvf</span> sudo-1.7.0.tar 
<span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #7a0874; font-weight: bold;">cd</span> sudo-1.7.0
<span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> .<span style="color: #000000; font-weight: bold;">/</span>configure 
<span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p><strong>Last try to add anything user as you like</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> visudo</pre></div></div>

<p>and find code like here..<br />
# User privilege specification<br />
root    ALL=(ALL) ALL</p>
<p>then add user id to make him power like root</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">hendra  ALL=(ALL) NOPASSWD:ALL</pre></div></div>

<p><strong>The power of root (part 2)</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #c20cb9; font-weight: bold;">id</span>
<span style="color: #007800;">uid</span>=<span style="color: #000000;">100</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>hendra<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #007800;">gid</span>=<span style="color: #000000;">101</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>jagoan<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #007800;">$PATH</span>:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin
<span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #c20cb9; font-weight: bold;">sudo</span> useradd <span style="color: #660033;">-d</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">false</span> tes</pre></div></div>

<p>Done.</p>
]]></content:encoded>
			<wfw:commentRss>http://sysinfo.bascomp.org/2007/09/installing-sudo-on-solaris/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
