<?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 7</title>
	<atom:link href="http://www.sunsolarisadmin.com/category/solaris-7/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>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>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>
