<?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>Sun Solaris System Admin &#187; Solaris 8</title>
	<atom:link href="http://www.sunsolarisadmin.com/category/solaris-8/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sunsolarisadmin.com</link>
	<description>Sun Solaris HowTo's Tips Tricks Tutorials</description>
	<lastBuildDate>Wed, 16 Jun 2010 21:07:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
<image>
<link>http://www.sunsolarisadmin.com</link>
<url>http://www.sunsolarisadmin.com/wp-content/mbp-favicon/favicon.ico</url>
<title>Sun Solaris System Admin</title>
</image>
		<item>
		<title>PCP script to find open TCP ports and PIDs related in Solaris</title>
		<link>http://www.sunsolarisadmin.com/solaris-8/pcp-script-to-find-open-tcp-ports-and-pids-related-in-solaris/</link>
		<comments>http://www.sunsolarisadmin.com/solaris-8/pcp-script-to-find-open-tcp-ports-and-pids-related-in-solaris/#comments</comments>
		<pubDate>Tue, 12 May 2009 22:35:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Solaris 10]]></category>
		<category><![CDATA[Solaris 8]]></category>
		<category><![CDATA[Solaris 9]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[pcp]]></category>
		<category><![CDATA[PID]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[sun]]></category>
		<category><![CDATA[TCP port]]></category>

		<guid isPermaLink="false">http://www.sunsolarisadmin.com/?p=69</guid>
		<description><![CDATA[PCP is a very useful security and adminitration script that can help you quickly find Processes (PIDs) having particular TCP Port(s) open, TCP ports open by specific PIDs or even list all the TCP Ports open by all PIDs running on your system. The PCP script works on Solaris 10/9/8 and can be downloaded from [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense-->PCP is a very useful security and adminitration script that can help you quickly find Processes (PIDs) having particular TCP Port(s) open, TCP ports open by specific PIDs or even list all the TCP Ports open by all PIDs running on your system.</p>
<p><span id="more-69"></span><br />
The PCP script works on Solaris 10/9/8 and can be downloaded from <a title="PCP Script download" href="http://www.unix.ms/pcp/pcp.txt" target="_blank">here</a>. Simply save the pcp.txt file to your Solaris Server as a Shell scripts (say pcp.sh) and change permissions to execute.</p>
<blockquote><p><strong># chmod 755 pcp.sh</strong></p></blockquote>
<p><span style="text-decoration: underline;"><strong>PIDs for TCP Port</strong></span></p>
<p>Run PCP with <strong>&#8220;-p&#8221;</strong> option to show the PIDs of processes having a TCP port (say Port 22)</p>
<p><img class="alignnone size-full wp-image-70" title="pcp1" src="http://www.sunsolarisadmin.com/wp-content/uploads/2009/05/pcp1.png" alt="pcp1" width="471" height="194" /></p>
<p>For instance, to find PIDs opening TCP port 22.</p>
<p><span style="text-decoration: underline;"><strong>TCP Ports open by PIDs</strong></span></p>
<p>Run PCP with <strong>&#8220;-P&#8221;</strong> option to show the TCP ports open by specific PID</p>
<p>For instance, here I try to find the TCP ports open by PID 18805</p>
<p><img class="alignnone size-full wp-image-72" title="pcp3" src="http://www.sunsolarisadmin.com/wp-content/uploads/2009/05/pcp3.png" alt="pcp3" width="468" height="223" /></p>
<p><span style="text-decoration: underline;"><strong>All PIDs for all open TCP Ports</strong></span></p>
<p>Use the <strong>&#8220;-a&#8221;</strong> option to list all TCP ports open with all the PIDs</p>
<p><img class="alignnone size-full wp-image-71" title="pcp2" src="http://www.sunsolarisadmin.com/wp-content/uploads/2009/05/pcp2.png" alt="pcp2" width="464" height="458" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunsolarisadmin.com/solaris-8/pcp-script-to-find-open-tcp-ports-and-pids-related-in-solaris/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Control/Modify dhcpagent configuration in Sun Solaris</title>
		<link>http://www.sunsolarisadmin.com/solaris-8/controlmodify-dhcpagent-configuration-in-sun-solaris/</link>
		<comments>http://www.sunsolarisadmin.com/solaris-8/controlmodify-dhcpagent-configuration-in-sun-solaris/#comments</comments>
		<pubDate>Sat, 22 Mar 2008 19:39:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Solaris 10]]></category>
		<category><![CDATA[Solaris 8]]></category>
		<category><![CDATA[Solaris 9]]></category>
		<category><![CDATA[broadcast-address]]></category>
		<category><![CDATA[dhcp]]></category>
		<category><![CDATA[dhcpagent]]></category>
		<category><![CDATA[dnsdomain]]></category>
		<category><![CDATA[dnsserver]]></category>
		<category><![CDATA[hostname]]></category>
		<category><![CDATA[netmask]]></category>
		<category><![CDATA[router]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[sun]]></category>

		<guid isPermaLink="false">http://www.sunsolarisadmin.com/solaris-8/controlmodify-dhcpagent-configuration-in-sun-solaris/</guid>
		<description><![CDATA[Do you you DHCP to get the IP Address for your Solaris Server or workstation then its worth understanding what your DHCP Agent by default requests for from the DHCP server and help avoid certain network issues like &#8220;unknown&#8221; hostname issue as I&#8217;ve descrbed here. The DHCP Agent by default requests for the Subnet Mask [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense--><br />
Do you you DHCP to get the IP Address for your Solaris Server or workstation then its worth understanding what your DHCP Agent by default requests for from the DHCP server and help avoid certain network issues like &#8220;unknown&#8221; hostname issue as I&#8217;ve descrbed <a href="http://www.sunsolarisadmin.com/solaris-8/fix-no-hostname-when-using-dhcp-in-sun-solaris-8910/" title="Fix Unknown Hostname issue in Solaris DHCP" target="_blank">here</a>.</p>
<p>The DHCP Agent by default requests for the</p>
<blockquote><p><strong>Subnet Mask</strong></p>
<p><strong>Default Router</strong></p>
<p><strong>Hostname</strong></p>
<p><strong>DNS Domain</strong></p>
<p><strong>Broadcast Address</strong></p>
<p><strong>Encapsulated Vendor Option (vendor specific information as described in <a href="http://www.faqs.org/rfcs/rfc2132.html" title="RFC 2132" target="_blank">RFC 2132</a>)</strong></p></blockquote>
<p><span id="more-43"></span><br />
The DHCP Agent config file is</p>
<blockquote><p><strong>/etc/default/dhcpagent</strong></p></blockquote>
<p>In the file look for the line</p>
<blockquote><p><strong>PARAM_REQUEST_LIST=1,3,6,12,15,28,43</strong></p></blockquote>
<p>This is the line that defines what is being requested for from the DHCP Server. Here, each number stands for one of the above mentioned parameters where</p>
<blockquote><p><strong>1</strong> = subnet mask</p>
<p><strong>3</strong> = Default Router</p>
<p><strong>6</strong> = DNS Server</p>
<p><strong>12</strong> = hostname</p>
<p><strong>15</strong> = DNS Domain Name</p>
<p><strong>28</strong> = broadcast address</p>
<p><strong>43</strong> = Encapsulated Vendor options</p></blockquote>
<p>If you decide to not request for any of the above parameters then all you need to do is to remove the corresponding number from the <strong>PARAM_REQUEST_LIST</strong>. Let&#8217;s say you do not want to request for the hostname then simply remove the number &#8220;3&#8243; and the &#8220;,&#8221; that follows so it looks as follows</p>
<blockquote><p><strong>PARAM_REQUEST_LIST=1,6,12,15,28,43</strong></p></blockquote>
<p>Once done,save the file. The next time the system restarts the hostname is not requested for from the DHCP Server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunsolarisadmin.com/solaris-8/controlmodify-dhcpagent-configuration-in-sun-solaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix: No hostname when using DHCP in Sun Solaris 8/9/10</title>
		<link>http://www.sunsolarisadmin.com/solaris-8/fix-no-hostname-when-using-dhcp-in-sun-solaris-8910/</link>
		<comments>http://www.sunsolarisadmin.com/solaris-8/fix-no-hostname-when-using-dhcp-in-sun-solaris-8910/#comments</comments>
		<pubDate>Sat, 22 Mar 2008 19:15:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Solaris 10]]></category>
		<category><![CDATA[Solaris 8]]></category>
		<category><![CDATA[Solaris 9]]></category>
		<category><![CDATA[dhcp]]></category>
		<category><![CDATA[dhcpagent]]></category>
		<category><![CDATA[hostname]]></category>
		<category><![CDATA[hosts]]></category>
		<category><![CDATA[nodename]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[sun]]></category>

		<guid isPermaLink="false">http://www.sunsolarisadmin.com/solaris-8/fix-no-hostname-when-using-dhcp-in-sun-solaris-8910/</guid>
		<description><![CDATA[If you are using DHCP to receive IP Address for your Sun Solaris system, you may end up with no hostname assigned to the system. This can be confirmed when there is no hostname at the prompt or if the output for the command &#8220;hostname&#8221; is as follows: # hostname unknown or the /etc/hosts file [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense--><br />
If you are using DHCP to receive IP Address for your Sun Solaris system, you may end up with no hostname assigned to the system. This can be confirmed when there is no hostname at the prompt or if the output for the command &#8220;hostname&#8221; is as follows:</p>
<blockquote><p><strong># hostname<br />
</strong>unknown</p>
<p>or the /etc/hosts file has an entry as follows:</p>
<p><strong># cat /etc/hosts<br />
</strong>#<br />
# Internet host table<br />
#<br />
127.0.0.1       localhost<br />
192.168.0.3     unknown # Added by DHCP</p></blockquote>
<p><span id="more-42"></span><br />
This happens when the DHCP server doesn&#8217;t provide a hostname for your server. Most of the DHCP Servers or routers acting as a DHCP Server doesn&#8217;t provide a hostname and Solaris DHCP agent relies on the DHCP server for its hostname.</p>
<p>To fix this problem, edit the dhcpagent config and set it not to request a Hostname from the DHCP server and then add a hostname to the /etc/hosts &amp; /etc/nodename file.</p>
<p><u><strong>Edit DHCPAGENT config</strong></u></p>
<p><strong><em>[For Solaris 10, this is not required as setting the hostname in /etc/nodename overrides the hostname provided by the DHCP Server. Move onto the next step]</em></strong></p>
<p>Edit the dhcpagent config file /etc/default/dhcpagent with your favorite editor</p>
<blockquote><p><strong># vi /etc/default/dhcpagent</strong></p>
<p>and look for</p>
<p>PARAM_REQUEST_LIST=1,3,6,12,15,28,43</p>
<p>and remove the Parameter &#8220;12&#8243; from the above to look as follows:</p>
<p>PARAM_REQUEST_LIST=1,3,6,15,28,43</p>
<p>and save the file.</p></blockquote>
<p>Now, add the hostname to the /etc/nodename &amp; /etc/hosts as follows</p>
<blockquote><p><strong># vi /etc/nodename</strong></p></blockquote>
<p>and add the hostname you want it to have (solarisserver for me)</p>
<blockquote><p><strong># cat /etc/nodename</strong><br />
solarisserver</p></blockquote>
<p>and edit the /etc/hosts file</p>
<blockquote><p><strong># vi /etc/hosts</strong></p></blockquote>
<p>and add the line similar to the following</p>
<blockquote><p><strong>192.168.0.3     solarisserver loghost</strong></p></blockquote>
<p>Now,reboot the server and you should be all fine with hostname set for the system.</p>
<p><strong># init 6</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunsolarisadmin.com/solaris-8/fix-no-hostname-when-using-dhcp-in-sun-solaris-8910/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to add a Static Route (persistent) in Sun Solaris</title>
		<link>http://www.sunsolarisadmin.com/solaris-7/how-to-add-a-static-route-persistent-in-sun-solaris/</link>
		<comments>http://www.sunsolarisadmin.com/solaris-7/how-to-add-a-static-route-persistent-in-sun-solaris/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 19:41:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Solaris 10]]></category>
		<category><![CDATA[Solaris 7]]></category>
		<category><![CDATA[Solaris 8]]></category>
		<category><![CDATA[Solaris 9]]></category>
		<category><![CDATA[netstat]]></category>
		<category><![CDATA[route]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[static-route]]></category>

		<guid isPermaLink="false">http://www.sunsolarisadmin.com/solaris-7/how-to-add-a-static-route-persistent-in-sun-solaris/</guid>
		<description><![CDATA[To add a Static Route in Sun Solaris operating system, you can use the route command. This will dynamically update the Kernel IP Routing table. However, when a server is restarted, these routes will be lost. To prevent this from happening, add a startup script S76static-routes with all the route commands for the static route [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense--></p>
<p>To add a Static Route in Sun Solaris operating system, you can use the route command. This will dynamically update the Kernel IP Routing table. However, when a server is restarted, these routes will be lost. To prevent this from happening, add a startup script S76static-routes with all the route commands for the static route that needs to persist. This will ensure that the route gets added at boot time.</p>
<p><span id="more-33"></span></p>
<p>To use the <strong>route</strong> command,</p>
<p><strong>Syntax:</strong></p>
<blockquote><p><strong># route add [net|host] &lt;Addr&gt; netmask &lt;Mask&gt; [GatewayAddr|-interface ] &lt;metric&gt;</strong></p></blockquote>
<p><strong>Example:</strong></p>
<p>Add a network</p>
<blockquote><p><strong># route add net 10.10.10.0 netmask 255.255.255.0 192.168.1.1 1</strong></p></blockquote>
<p>same as</p>
<blockquote><p><strong># route add 10.10.10.0/24 192.168.1.1 1</strong></p></blockquote>
<p>Add a host</p>
<blockquote><p><strong># route add host 1.1.1.1 netmask 255.255.255.0 192.168.1.1 1</strong></p></blockquote>
<p>same as</p>
<blockquote><p><strong># route add 1.1.1.1/24 192.168.1.1 1</strong></p></blockquote>
<p>To route the traffic through an interface instead of an IP Gateway</p>
<blockquote><p><strong># route add 1.1.1.1/24 -interface hme0</strong></p></blockquote>
<p>To check that the roots are added to Kernel IP Routing table,</p>
<blockquote><p><strong># netstat -rn</strong></p>
<p>Routing Table: IPv4<br />
Destination           Gateway           Flags  Ref   Use   Interface<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8211; &#8212;&#8211; &#8212;&#8212; &#8212;&#8212;&#8212;<br />
192.168.1.0          192.168.1.1        U         1    273  hme0<br />
224.0.0.0            192.168.1.1         U         1      0   hme0<br />
default              192.168.1.1          UG        1    196</p></blockquote>
<p><strong><u>Static Routes at boot time</u></strong></p>
<p>To make the routes available at boot time so the next time when the server reboots, the routes are still available. Add a startup script named as</p>
<blockquote><p><strong>/etc/rc2.d/S76static-routes</strong></p></blockquote>
<p>and add the required route commands as above.</p>
<p>Change the permissions for the file so that the file is executable by root.</p>
<blockquote><p><strong># chmod 744 /etc/rc2.d/S76static-routes</strong></p></blockquote>
<p>This should help.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunsolarisadmin.com/solaris-7/how-to-add-a-static-route-persistent-in-sun-solaris/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How to disable IP Forwarding in Sun Solaris</title>
		<link>http://www.sunsolarisadmin.com/solaris-7/how-to-disable-ip-forwarding-in-sun-solaris/</link>
		<comments>http://www.sunsolarisadmin.com/solaris-7/how-to-disable-ip-forwarding-in-sun-solaris/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 19:36:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Solaris 10]]></category>
		<category><![CDATA[Solaris 7]]></category>
		<category><![CDATA[Solaris 8]]></category>
		<category><![CDATA[Solaris 9]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[forwarding]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[ndd]]></category>
		<category><![CDATA[packet]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[sun]]></category>

		<guid isPermaLink="false">http://www.sunsolarisadmin.com/solaris-7/how-to-disable-ip-forwarding-in-sun-solaris/</guid>
		<description><![CDATA[IP packet forwarding is the process of routing packets between network interfaces on one system. A packet arriving on one network interface and addressed to a host on a different network is forwarded to the appropriate interface. While this is a job for the network router, Servers with multiple interfaces connected to different network can [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense--></p>
<p>IP packet forwarding is the process of routing packets between network interfaces on one system. A packet arriving on one network interface and addressed to a host on a different network is forwarded to the appropriate interface. While this is a job for the network router, Servers with multiple interfaces connected to different network can perform this action as well. This behaviour as a router is a default in Sun Solaris Operating Systems.</p>
<p><span id="more-32"></span></p>
<p>If your Sun Solaris server has multiple interfaces and is not intended to route packets between the networks it is connected to, then it is advisable to disable this option. This can be a potential target for a malicious hacker as this can potentially allow the hacker access to the network at the other side.</p>
<p>To disable this packet forwarding in Solaris, simply create the file</p>
<p><strong>/etc/notrouter</strong></p>
<p>and reboot the server. However, if reboot is not an option at this time, then usee the NDD command to disble the option:</p>
<p>To display the current status</p>
<p><strong># ndd /dev/ip ip_forwarding<br />
1</strong></p>
<p><em>0 is Disabled<br />
1 is Enabled</em></p>
<p>To disable,</p>
<p><strong># ndd -set /dev/ip ip_forwarding 0</strong></p>
<p><strong>For IPv6</strong></p>
<p><strong># ndd -set /dev/ip6 ip6_forwarding 0</strong></p>
<p>This should disable. To confirm change,</p>
<p><strong><em># ndd /dev/ip ip_forwarding<br />
0</em></strong></p>
<p><strong><em># ndd /dev/ip6 ip6_forwarding<br />
0</em></strong></p>
<p>In Solaris 8 and later, IP forwarding can be enabled or disabled on a per interface basis. For example, if there are 3 hme NIC cards namely hme0,hme1,hme2 then assume, we allow IP Forwarding only from hme0 and disable on hme1 and hme2 then the following will help:</p>
<p><strong><em># ndd -set /dev/ip hme0:ip_forwarding 1<br />
# ndd -set /dev/ip hme1:ip_forwarding 0<br />
# ndd -set /dev/ip hme2:ip_forwarding 0</em></strong></p>
<p>This should help</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunsolarisadmin.com/solaris-7/how-to-disable-ip-forwarding-in-sun-solaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to recover/reset root password in Sun solaris (SPARC)</title>
		<link>http://www.sunsolarisadmin.com/general/how-to-recoverreset-root-password-in-sun-solaris-sparc/</link>
		<comments>http://www.sunsolarisadmin.com/general/how-to-recoverreset-root-password-in-sun-solaris-sparc/#comments</comments>
		<pubDate>Mon, 21 Jan 2008 17:42:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Solaris 10]]></category>
		<category><![CDATA[Solaris 7]]></category>
		<category><![CDATA[Solaris 8]]></category>
		<category><![CDATA[Solaris 9]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[recovery]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[sun]]></category>

		<guid isPermaLink="false">http://www.sunsolarisadmin.com/general/how-to-recoverreset-root-password-in-sun-solaris-sparc/</guid>
		<description><![CDATA[There is every little chance that one loses or rather forgets the root password of his Sun Solaris servers. In the event, this happens, there is a way out of it. Well the way and infact the only way is to reset the password as there is no way to recover it. Recovering/restting the password [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense--></p>
<p>There is every little chance that one loses or rather forgets the root password of his Sun Solaris servers. In the event, this happens, there is a way out of it. Well the way and infact the only way is to reset the password as there is no way to recover it. Recovering/restting the password involves booting the server in Single User mode and mounting the root file system.</p>
<p><span id="more-23"></span></p>
<p>Ofcourse, it is recommeded that the security for the physical access to the server is restricted so as to ensure that there is no unauthorized access and anyone who follows this routine is an authorized personnel.</p>
<p>Boot the server with a Sun Solaris Operating System CD (I&#8217;m using a Solaris 10 CD but doesn&#8217;t matter really) or a network boot with a JumpStart server from the OBP OK prompt.</p>
<blockquote><p><strong>OK boot cdrom -s</strong></p></blockquote>
<p>or</p>
<blockquote><p><strong>OK boot net -s</strong></p></blockquote>
<p>This will boot the server from the CD or Jumpstart server and launch a single user mode (No Password).</p>
<p>Mount the root file system (assume /dev/dsk/c0t0d0s0 here) onto /a</p>
<blockquote><p><strong>solaris# mount /dev/dsk/c0t0d0s0 /a</strong></p></blockquote>
<p>NOTE: /a is a temporary mount point that is available when you boot from CD or a JumpStart server</p>
<p>Now, with the root file system mounted on /a. All you need to do is to edit the shadow file and remove the encrypted password for root.</p>
<blockquote><p><strong>solaris# vi /a/etc/shadow</strong></p></blockquote>
<p>Now, exit the mounted filesystem, unmount the root filesystem and reboot the system to single-user mode booting of the disk.</p>
<blockquote><p><strong>solaris# cd /</strong></p>
<p><strong>solaris# umount /a</strong></p>
<p><strong>solaris# init s</strong></p></blockquote>
<p>This should boot of the disk and take you to the single-user mode. Press enter at the prompt to enter a password for root.</p>
<p>This should allow you to login to the system. Once in, set the password and change to multi-user mode.</p>
<p>NOTE: Single-User mode is only to ensure that the root user without password is not exposed to others if started in multi-user mode before being set with a new password.</p>
<blockquote><p><strong>solaris# passwd root</strong></p>
<p><strong>solaris# reboot</strong></p></blockquote>
<p>This should do. You should now be able to logon with the new password set for root</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunsolarisadmin.com/general/how-to-recoverreset-root-password-in-sun-solaris-sparc/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Install OpenSSH in Sun Solaris 9 (x86)</title>
		<link>http://www.sunsolarisadmin.com/solaris-8/how-to-install-openssh-in-sun-solaris-9-x86/</link>
		<comments>http://www.sunsolarisadmin.com/solaris-8/how-to-install-openssh-in-sun-solaris-9-x86/#comments</comments>
		<pubDate>Mon, 21 Jan 2008 13:01:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SSH]]></category>
		<category><![CDATA[Solaris 8]]></category>
		<category><![CDATA[Sun X86 platform]]></category>
		<category><![CDATA[keygen]]></category>
		<category><![CDATA[openssh]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[sshd]]></category>
		<category><![CDATA[sun]]></category>
		<category><![CDATA[x86]]></category>
		<category><![CDATA[zlib]]></category>

		<guid isPermaLink="false">http://www.sunsolarisadmin.com/solaris-8/how-to-install-openssh-in-sun-solaris-9-x86/</guid>
		<description><![CDATA[OpenSSH is a free opensource version of the SSH connectivity tools. OpenSSH encrypts all traffic (including passwords) to effectively eliminate eavesdropping, connection hijacking, and other attacks unlike Telnet,rlogin or ftp where the data is not encrypted and transmitted in plain text. Additionally, OpenSSH provides secure tunneling capabilities and several authentication methods, and supports all SSH [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense--></p>
<p>OpenSSH is a free opensource version of the SSH connectivity tools. OpenSSH encrypts all traffic (including passwords) to effectively eliminate eavesdropping, connection hijacking, and other attacks unlike Telnet,rlogin or ftp where the data is not encrypted and transmitted in plain text. Additionally, OpenSSH provides secure tunneling capabilities and several authentication methods, and supports all SSH protocol versions.</p>
<p><span id="more-18"></span></p>
<p>The easiest way to install OpenSSH in Sun Solaris is to use the pre-compiled packages from sunfreeware.</p>
<p>The following are the packages that are required to be installed for OpenSSH to work properly in Solaris 9:</p>
<blockquote><p>OpenSSL (Latest stable: openssl-0.9.8f)</p>
<p>ZLib (Latest stable: zlib-1.2.3)</p>
<p>GNU Compiler Collection (gcc Latest stable: libgcc-3.4.6)</p>
<p>TCPWrapper (Optional tcp_wrappers-7.6)</p>
<p>and OpenSSH itself (Latest Stable: openssh-4.7p1)</p></blockquote>
<p>To start of, download the packages from the following sunfreeware.com links Solaris 9 x86:</p>
<p><strong><u>gcc</u></strong></p>
<blockquote><p><strong><u><a href="ftp://ftp.sunfreeware.com/pub/freeware/intel/9/libgcc-3.4.6-sol9-x86-local.gz">ftp://ftp.sunfreeware.com/pub/freeware/intel/9/libgcc-3.4.6-sol9-x86-local.gz</a></u></strong></p></blockquote>
<p><strong><u>Zlib</u></strong></p>
<blockquote><p><strong><u><a href="ftp://ftp.sunfreeware.com/pub/freeware/intel/9/zlib-1.2.3-sol9-x86-local.gz">ftp://ftp.sunfreeware.com/pub/freeware/intel/9/zlib-1.2.3-sol9-x86-local.gz</a></u></strong></p></blockquote>
<p><strong><u>OpenSSL</u></strong></p>
<blockquote><p><strong><u><a href="ftp://ftp.sunfreeware.com/pub/freeware/intel/9/openssl-0.9.8f-sol9-x86-local.gz">ftp://ftp.sunfreeware.com/pub/freeware/intel/9/openssl-0.9.8f-sol9-x86-local.gz</a></u></strong></p></blockquote>
<p><strong><u>OpenSSH</u></strong></p>
<blockquote><p><a href="ftp://ftp.sunfreeware.com/pub/freeware/intel/9/openssh-4.7p1-sol9-x86-local.gz">ftp://ftp.sunfreeware.com/pub/freeware/intel/9/openssh-4.7p1-sol9-x86-local.gz</a></p></blockquote>
<p>Once done, upload the files onto the server so we can start to unzip the files and install.</p>
<p><strong><u>Unzip and install gcc</u></strong></p>
<blockquote><p>solaris9# gunzip libgcc-3.4.6-sol9-x86-local.gz</p>
<p>solaris9# pkgadd -d libgcc-3.4.6-sol9-x86-local</p>
<p>&#8230;<br />
&#8230;<br />
Installation of &lt;SMCgcc&gt; was successful.</p></blockquote>
<p><strong><u>Unzip and install zlib</u></strong></p>
<blockquote><p>solaris9# gunzip  zlib-1.2.3-sol9-x86-local.gz</p>
<p>solaris9# pkgadd -d zlib-1.2.3-sol9-x86-local</p>
<p>&#8230;<br />
&#8230;<br />
Installation of &lt;SMCzlib&gt; was successful.</p></blockquote>
<p><strong><u>Unzip and install OpenSSL</u></strong></p>
<blockquote><p>solaris9# gunzip openssl-0.9.8f-sol9-x86-local.gz</p>
<p>solaris9# pkgadd -d openssl-0.9.8f-sol9-x86-local<br />
&#8230;<br />
&#8230;<br />
Installation of &lt;SMCossl&gt; was successful.</p></blockquote>
<p><strong><u>Unzip and install OpenSSH</u></strong></p>
<blockquote><p>solaris9# gunzip openssh-4.7p1-sol9-x86-local.gz</p>
<p>solaris9# pkgadd -d openssh-4.7p1-sol9-x86-local<br />
&#8230;<br />
&#8230;<br />
Installation of &lt;SMCossl&gt; was successful.</p></blockquote>
<p>The packages are now installed.</p>
<p><strong><u>Create /var/empty directory</u></strong></p>
<blockquote><p>solaris9# mkdir /var/empty</p></blockquote>
<p><strong><u>Change directory ownership to Root user and sys group</u></strong></p>
<blockquote><p>solaris9# chown root:sys /var/empty</p></blockquote>
<p><strong><u>Change permissions</u></strong></p>
<blockquote><p>solaris9# chmod 755 /var/empty</p></blockquote>
<p><strong><u>Add sshd user &amp; group</u></strong></p>
<blockquote><p>solaris9# groupadd ssh</p>
<p>solaris9# # useradd -g sshd -c &#8216;sshd privsep&#8217; -d /var/empty -s /bin/false sshd</p></blockquote>
<p><strong><u>Edit the default /usr/local/sshd_config file and make the following changes:</u></strong></p>
<p>Replace the line</p>
<blockquote><p>Subsystem sftp /usr/libexec/sftp-server</p></blockquote>
<p>with</p>
<blockquote><p>Subsystem sftp /usr/local/libexec/sftp-server</p></blockquote>
<blockquote><p>Generate Keys for the server</p></blockquote>
<blockquote><p>solaris9# ssh-keygen -t rsa1 -f /usr/local/etc/ssh_host_key -N &#8220;&#8221;<br />
solaris9# ssh-keygen -t dsa -f /usr/local/etc/ssh_host_dsa_key -N &#8220;&#8221;<br />
solaris9# ssh-keygen -t rsa -f /usr/local/etc/ssh_host_rsa_key -N &#8220;&#8221;</p></blockquote>
<p><strong><u>sshd at Solaris startup</u></strong></p>
<p>Add a startup script <strong><em>/etc/init.d/sshd</em></strong> as follows to enable the OpenSSH server daemon &#8220;sshd&#8221; at the startup</p>
<blockquote><p>case &#8220;$1&#8243; in<br />
&#8216;start&#8217;)<br />
        if [ -x /usr/local/sbin/sshd ]; then<br />
                echo &#8220;Starting the secure shell daemon&#8221;<br />
                /usr/local/sbin/sshd &amp;<br />
        fi<br />
        ;;</p>
<p>&#8216;stop&#8217;)<br />
        echo &#8220;Stopping the secure shell daemon &#8221;<br />
        pkill -TERM sshd<br />
        ;;<br />
*)<br />
        echo &#8220;Usage: /etc/init.d/sshd { start | stop }&#8221;<br />
        ;;<br />
esac<br />
exit 0</p></blockquote>
<p><strong><u>Change the ownership &amp; permissions on the startup script</u></strong></p>
<blockquote><p>solaris9# chown root:sys /etc/init.d/sshd<br />
solaris9# chmod 555 /etc/init.d/sshd</p></blockquote>
<p><strong><u>Create a Symlink to the startup script at /etc/rc2/d/S98sshd</u></strong></p>
<blockquote><p># ln -s /etc/init.d/sshd /etc/rc2.d/S98sshd</p></blockquote>
<p>That is it. All done and ready to go. Try connecting to the server using a ssh client like PUTTY.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunsolarisadmin.com/solaris-8/how-to-install-openssh-in-sun-solaris-9-x86/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH access without password in Sun Solaris</title>
		<link>http://www.sunsolarisadmin.com/solaris-7/ssh-access-without-password-in-sun-solaris/</link>
		<comments>http://www.sunsolarisadmin.com/solaris-7/ssh-access-without-password-in-sun-solaris/#comments</comments>
		<pubDate>Fri, 11 Jan 2008 10:16:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SSH]]></category>
		<category><![CDATA[Solaris 10]]></category>
		<category><![CDATA[Solaris 7]]></category>
		<category><![CDATA[Solaris 8]]></category>
		<category><![CDATA[Solaris 9]]></category>
		<category><![CDATA[dsa]]></category>
		<category><![CDATA[openssh]]></category>
		<category><![CDATA[rsa]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[sun]]></category>

		<guid isPermaLink="false">http://www.sunsolarisadmin.com/solaris-7/ssh-access-without-password-in-sun-solaris/</guid>
		<description><![CDATA[A Trust relationship can be established for users on multiple servers running OpenSSH to allow a password free ssh session. This is sometime important when you want to run scripts or commands remotely. Most part of this article is common for most if not all of the UNIX/LINUX flavors except the following which steps to [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense-->A Trust relationship can be established for users on multiple servers running OpenSSH to allow a password free ssh session. This is sometime important when you want to run scripts or commands remotely.</p>
<p><span id="more-4"></span></p>
<p>Most part of this article is common for most if not all of the UNIX/LINUX flavors except the following which steps to uncomment a few lines from the ssh_config file in Solaris:</p>
<p> Uncomment the following lines from the /usr/local/etc/ssh_config file:</p>
<blockquote><p><strong> RSAAuthentication yes</strong></p>
<p><strong>IdentityFile ~/.ssh/id_rsa</strong></p></blockquote>
<p>Now, let&#8217;s assume ServerA and ServerB both run the ssh daemons.</p>
<p>To allow ServerA to SSH to ServerB without password, please try the following:</p>
<blockquote><p><strong># ssh-keygen -t rsa </strong></p></blockquote>
<p>Note: User here is root</p>
<p>This generates two files id_rsa.pub and id_rsa</p>
<p>Now, this needs to be copied to the authorized_keys file on ServerB</p>
<blockquote><p><strong><br />
# scp id_rsa.pub ServerB:~/.ssh/authorized_keys</strong></p></blockquote>
<p>Enter password when prompted.</p>
<p><span class="small"><span class="highlight">BEWARE: If the ServerB is already having a trust relationship with more that one hosts already then the above will wipe the contents and write this key alone. In which case, copy the file to the remote server as something like ServerA_rsa.pub and then append the contents to authorized_keys as follows. This will allow the existing authroized_keys from being wiped off.</span></span></p>
<blockquote><p><span class="small"><span class="highlight"><br />
</span><span class="highlight"># scp id_rsa.pub ServerB:~/.ssh/ServerA_rsa.pub<br />
# cat ServerA_rsa.pub &gt;&gt; authorized_keys</span></span></p></blockquote>
<p>Thats it. Test if you are able to do a ssh from ServerA without a password:</p>
<blockquote><p><strong># ssh serverB uname -a</strong></p></blockquote>
<p>This will run the command &#8220;<strong>uname -a</strong>&#8221; on ServerB and returns the result on ServerA.</p>
<p>The same procedure has to be followed in the reverse to allow ServerB to talk back to ServerA without any password.</p>
<p>And, if there is anyone other server to be added to the existing list follow the same procedure ensuring the key is appended to the remote servers authorized_keys file and not by overwriting it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunsolarisadmin.com/solaris-7/ssh-access-without-password-in-sun-solaris/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Disable remote logging in Syslog daemon</title>
		<link>http://www.sunsolarisadmin.com/solaris-7/disable-remote-logging-in-syslog-daemon/</link>
		<comments>http://www.sunsolarisadmin.com/solaris-7/disable-remote-logging-in-syslog-daemon/#comments</comments>
		<pubDate>Thu, 10 Jan 2008 22:35:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Solaris 10]]></category>
		<category><![CDATA[Solaris 7]]></category>
		<category><![CDATA[Solaris 8]]></category>
		<category><![CDATA[Solaris 9]]></category>
		<category><![CDATA[denial-of-service]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[svcadm]]></category>
		<category><![CDATA[syslog]]></category>

		<guid isPermaLink="false">http://www.sunsolarisadmin.com/solaris-7/disable-remote-logging-in-syslog-daemon/</guid>
		<description><![CDATA[Syslog daemon in Solaris by default is enabled for remote logging and will listen on UDP port 514 for syslog messages from remote systems. Unless, the server is acting as a remote logging server, this can be a Security issue as a malicious user can launch a Denial Of Service (DoS) attack on the server. To check if your [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense-->Syslog daemon in Solaris by default is enabled for remote logging and will listen on UDP port 514 for syslog messages from remote systems. Unless, the server is acting as a remote logging server, this can be a Security issue as a malicious user can launch a <strong>D</strong>enial <strong>O</strong>f <strong>S</strong>ervice (DoS) attack on the server.</p>
<p><span id="more-3"></span></p>
<p>To check if your syslog service is listening for remote logs,</p>
<blockquote><p># netstat -aP udp | grep syslog</p>
<p>*.syslog                            Idle</p></blockquote>
<p>This will show an output for syslog with status &#8220;idle&#8221;.</p>
<p>Unless a Server is as a Remote Central Logging server, it is recommended to disable Remote logging in Solaris.</p>
<p><strong><u><em>Solaris 8 &amp; Solaris 7</em></u></strong></p>
<p>In Solaris 8 and Solaris 7 edit the startup scripts to start the syslogd daemon in non-remote logging mode.</p>
<p>This can be done as follows:</p>
<p>Edit the /etc/init.d/syslog file using a editor like vi:</p>
<blockquote><p># vi /etc/init.d/syslog</p></blockquote>
<p>Replace the line,</p>
<blockquote><p>/usr/sbin/syslogd &gt;/dev/msglog 2&gt;&amp;1 &amp;</p></blockquote>
<p>with</p>
<blockquote><p>/usr/sbin/syslogd -t &gt;/dev/msglog 2&gt;&amp;1 &amp;</p></blockquote>
<p>NOTE: -t disables the Remote logging in syslogd</p>
<p>Save the file and restart the Sylogd daemon.</p>
<blockquote><p># /etc/init.d/syslog stop</p>
<p># /etc/init.d/syslog start</p></blockquote>
<p>To confirm, remote logging is disabled, try</p>
<blockquote><p># netstat -aP udp | grep syslog</p></blockquote>
<p>This should not show a line for syslog with status as &#8220;idle&#8221;.<br />
<strong><u><em>Solaris 9 </em></u></strong><br />
On Solaris 9, although the above procedure can work, this can be achieved by simply editing the /etc/default/syslogd using an editor like vi</p>
<blockquote><p># vi /etc/default/syslogd</p></blockquote>
<p>Change the line from</p>
<blockquote><p>#LOG_FROM_REMOTE=YES</p></blockquote>
<p>to</p>
<blockquote><p>LOG_FROM_REMOTE=NO</p></blockquote>
<p>Save the file and restart the Syslogd daemon</p>
<blockquote><p># /etc/init.d/syslog stop</p>
<p># /etc/init.d/syslog start</p></blockquote>
<p>Now,</p>
<blockquote><p>#netstat -aP|grep syslog</p></blockquote>
<p>should not show an entry for syslog with status &#8220;idle&#8221;<br />
<strong><u><em>Solaris 10</em></u></strong></p>
<p>In Solaris 10,</p>
<p>Repeat the above procedure to edit the /etc/default/syslogd and restart syslogd as follows:</p>
<blockquote><p># svcadm -v restart svc:/system/system-log</p>
<p>Action restart set for svc:/system/system-log:default</p></blockquote>
<p>This should help.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunsolarisadmin.com/solaris-7/disable-remote-logging-in-syslog-daemon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
