<?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>System Adm &#187; Linux</title>
	<atom:link href="http://www.system.adm.br/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.system.adm.br</link>
	<description>Some IT Tips (Linux, Unix, HP-UX, AIX, Solaris, etc).</description>
	<lastBuildDate>Wed, 19 May 2010 20:11:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Updating partition table in Linux</title>
		<link>http://www.system.adm.br/2010/03/updating-partition-table-in-linux/</link>
		<comments>http://www.system.adm.br/2010/03/updating-partition-table-in-linux/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 14:53:16 +0000</pubDate>
		<dc:creator>Lincoln Zuljewic Silva</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[disk]]></category>
		<category><![CDATA[hardware]]></category>

		<guid isPermaLink="false">http://www.system.adm.br/?p=232</guid>
		<description><![CDATA[When you use the &#34;fdisk&#34; to handle the partitions of a disk, depending on the disc, the &#34;fdisk&#34; will bring the following message: WARNING: Re-reading the partition table failed with error 22: Invalid argument. The kernel still uses the old table. The new table will be used at the next reboot. Syncing disks. No, you [...]]]></description>
			<content:encoded><![CDATA[<p>When you use the &quot;fdisk&quot; to handle the partitions of a disk, depending on the disc, the &quot;fdisk&quot; will bring the following message:</p>
<p><span style="font-size: 12px;"><code>WARNING: Re-reading the partition table failed with error 22: Invalid argument.<br />
	The kernel still uses the old table.<br />
	The new table will be used at the next reboot.<br />
	Syncing disks.</code></span></p>
<p>	No, you do not have to restart the server for the changes are applied, simply use the following command (example):<br />
	<span style="font-size: 12px;"><code>kpartx -a /dev/sda</code></span></p>
<p>	This will re-read the partition table on /dev/sda and create the mapping of the system partitions (/dev/sda1, /dev/sda2, etc).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.system.adm.br/2010/03/updating-partition-table-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Martian Friend</title>
		<link>http://www.system.adm.br/2009/09/martian-friend/</link>
		<comments>http://www.system.adm.br/2009/09/martian-friend/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 16:59:06 +0000</pubDate>
		<dc:creator>Lincoln Zuljewic Silva</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[network]]></category>

		<guid isPermaLink="false">http://www.system.adm.br/?p=165</guid>
		<description><![CDATA[You may find some weird messages indications in your syslog telling you something like &#8220;martian source&#8221; like the followings: When a host needs send a package to another host, it can define the route on the network or use the default route. Those &#8220;source routed packages&#8221; are identified in Linux as martian packages. You can [...]]]></description>
			<content:encoded><![CDATA[<p>You may find some weird messages indications in your syslog telling you something like &ldquo;martian source&rdquo; like the followings:</p>
<p>	When a host needs send a package to another host, it can define the route on the network or use the default route. Those &ldquo;source routed packages&rdquo; are identified in Linux as martian packages. You can configure your Linux log/do not log those packages:</p>
<p>	<span style="font-size: 12px;"><code># echo 0 &gt; /proc/sys/net/ipv4/conf/*/log_martians #do not log</code></span></p>
<p>	&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.system.adm.br/2009/09/martian-friend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resizing lvol in Red Hat AS 4</title>
		<link>http://www.system.adm.br/2009/08/resizing-lvol-in-red-hat-as-4/</link>
		<comments>http://www.system.adm.br/2009/08/resizing-lvol-in-red-hat-as-4/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 13:32:55 +0000</pubDate>
		<dc:creator>Lincoln Zuljewic Silva</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.system.adm.br/?p=141</guid>
		<description><![CDATA[As incredible as it seems, RHAS4 doesn&#39;t came with the resize2fs command (just like the others RH distributions). After some research, I found the tool that replace the resize2fs command and it&#39;s the ext2online, for example: # ext2online /dev/mapper/VG00-vl02 &#160;]]></description>
			<content:encoded><![CDATA[<p>As incredible as it seems, RHAS4 doesn&#39;t came with the resize2fs command (just like the others RH distributions). After some research, I found the tool that replace the resize2fs command and it&#39;s the ext2online, for example:</p>
<p>	<span style="font-size: 12px;"><code># ext2online /dev/mapper/VG00-vl02</code></span></p>
<p>	&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.system.adm.br/2009/08/resizing-lvol-in-red-hat-as-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rlogin access denied</title>
		<link>http://www.system.adm.br/2009/06/rlogin-access-denied/</link>
		<comments>http://www.system.adm.br/2009/06/rlogin-access-denied/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 13:54:48 +0000</pubDate>
		<dc:creator>Lincoln Zuljewic Silva</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.system.adm.br/?p=129</guid>
		<description><![CDATA[In some specific situations, you need use rlogin to remote access a server, but you can face the following error: clientServer:~ # rlogin rloginServer Password: Password: Login incorrect login: root Password: Login incorrect login: root Password: Login incorrect login: root Password: Login incorrect rlogin: connection closed. If you check the /var/log/secure log on the &#8220;rloginServer&#8221;, [...]]]></description>
			<content:encoded><![CDATA[<p>In some specific situations, you need use rlogin to remote access a server, but you can face the following error:</p>
<p>	<span style="font-size: 12px;"><code>clientServer:~ # rlogin rloginServer<br />
	Password:<br />
	Password:<br />
	Login incorrect</p>
<p>	login: root<br />
	Password:<br />
	Login incorrect</p>
<p>	login: root<br />
	Password:<br />
	Login incorrect</p>
<p>	login: root<br />
	Password:<br />
	Login incorrect</p>
<p>	rlogin: connection closed.</code></span></p>
<p>
	If you check the /var/log/secure log on the &ldquo;rloginServer&rdquo;, you will find the following messages:<br />
	<span style="font-size: 12px;"><code><br />
	Jun 15 10:44:41 rloginServer rlogind[16640]: pam_securetty(rlogin:auth): access denied: tty &#39;rlogin&#39; is not secure !<br />
	Jun 15 10:44:41 rloginServer rlogind[16640]: pam_rhosts_auth(rlogin:auth): denied to root@10.11.4.9 as root: access not allowed<br />
	Jun 15 10:44:47 rloginServer login: pam_securetty(remote:auth): access denied: tty &#39;pts/0&#39; is not secure !<br />
	Jun 15 10:44:51 rloginServer login: FAILED LOGIN 1 FROM 10.11.4.9 FOR root, Authentication failure<br />
	Jun 15 10:44:53 rloginServer login: pam_securetty(remote:auth): access denied: tty &#39;pts/0&#39; is not secure !<br />
	Jun 15 10:44:58 rloginServer login: FAILED LOGIN 2 FROM 10.11.4.9 FOR root, Authentication failure<br />
	Jun 15 10:44:58 rloginServer login: pam_unix(remote:auth): bad username []<br />
	Jun 15 10:44:58 rloginServer login: pam_succeed_if(remote:auth): error retrieving information about user<br />
	Jun 15 10:44:58 rloginServer login: FAILED LOGIN 3 FROM 10.11.4.9 FOR , User not known to the underlying authentication module<br />
	Jun 15 10:44:59 rloginServer login: pam_unix(remote:auth): bad username []<br />
	Jun 15 10:44:59 rloginServer login: pam_succeed_if(remote:auth): error retrieving information about user<br />
	Jun 15 10:44:59 rloginServer login: FAILED LOGIN SESSION FROM 10.11.4.9 FOR , User not known to the underlying authentication module</code></span></p>
<p>
	The problem here, is that &ldquo;rlogin&rdquo; is not a &ldquo;secure&rdquo; shell. To configure it, you should add &ldquo;rlogin&rdquo; (without the quotes) to /etc/securetty .</p>
<p>	After that, you will be able to access the rlogin server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.system.adm.br/2009/06/rlogin-access-denied/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting session timeout on Linux</title>
		<link>http://www.system.adm.br/2009/05/setting-session-timeout-on-linux/</link>
		<comments>http://www.system.adm.br/2009/05/setting-session-timeout-on-linux/#comments</comments>
		<pubDate>Wed, 27 May 2009 12:41:14 +0000</pubDate>
		<dc:creator>Lincoln Zuljewic Silva</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.system.adm.br/?p=116</guid>
		<description><![CDATA[To set an automatically shell timeout on Linux (that Will logoff that session after X seconds), you just need setup the following variable (put it in your /etc/profile): # echo &#8220;TMOUT=300; readonly TMOUT; export TMOUT&#8221; &#62;&#62; /etc/profile The &#8220;readonly&#8221; option will not allow an normal user change (ou unset) it.]]></description>
			<content:encoded><![CDATA[<p>To set an automatically shell timeout on Linux (that Will logoff that session after X seconds), you just need setup the following variable (put it in your /etc/profile):</p>
<p>	<span style="font-size: 12px;"><code># echo &ldquo;TMOUT=300; readonly TMOUT; export TMOUT&rdquo; &gt;&gt; /etc/profile</code></span></p>
<p>	The &ldquo;readonly&rdquo; option will not allow an normal user change (ou unset) it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.system.adm.br/2009/05/setting-session-timeout-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rotate log files in Linux</title>
		<link>http://www.system.adm.br/2009/05/rotate-log-files-in-linux/</link>
		<comments>http://www.system.adm.br/2009/05/rotate-log-files-in-linux/#comments</comments>
		<pubDate>Fri, 15 May 2009 21:31:43 +0000</pubDate>
		<dc:creator>Lincoln Zuljewic Silva</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.system.adm.br/?p=105</guid>
		<description><![CDATA[An easy way (shell script) to rotate log files in Linux can be: #!/bin/bash # Include the following line in crontab: #00 5 * * * /bin/rotate_logs.sh &#62; /dev/null 2&#62;&#38;1 # DATE=`date &#34;+%Y%m%d&#34;` cd /var/log/ for i in messages secure cron lastlog do cp ${i} ${i}.${DATE} &#62; ${i} gzip -9 ${i}.${DATE} done /etc/init.d/syslog restart If [...]]]></description>
			<content:encoded><![CDATA[<p>An easy way (shell script) to rotate log files in Linux can be:</p>
<p>	<span style="font-size: 12px;"><code>#!/bin/bash<br />
	# Include the following line in crontab:<br />
	#00 5 * * * /bin/rotate_logs.sh &gt; /dev/null 2&gt;&amp;1<br />
	#</p>
<p>	DATE=`date &quot;+%Y%m%d&quot;`<br />
	cd /var/log/</p>
<p>	for i in messages secure cron lastlog<br />
	do<br />
	cp ${i} ${i}.${DATE}<br />
	&gt; ${i}<br />
	gzip -9 ${i}.${DATE}<br />
	done</p>
<p>	/etc/init.d/syslog restart</code></span></p>
<p>	If you have any other log to rotate, you can change the line 8 and 10.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.system.adm.br/2009/05/rotate-log-files-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disable CTRL+C on Linux</title>
		<link>http://www.system.adm.br/2009/04/disable-ctrlc-on-linux/</link>
		<comments>http://www.system.adm.br/2009/04/disable-ctrlc-on-linux/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 18:25:39 +0000</pubDate>
		<dc:creator>Lincoln Zuljewic Silva</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.system.adm.br/2009/04/disable-ctrlc-on-linux/</guid>
		<description><![CDATA[To disable CTRL+C on Linux, you can use the following command: # stty intr undef &#160;]]></description>
			<content:encoded><![CDATA[<p>To disable CTRL+C on Linux, you can use the following command:</p>
<p>	<span style="font-size: 12px;"><code># stty intr undef</code></span></p>
<p>	&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.system.adm.br/2009/04/disable-ctrlc-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Renaming a network interface on Linux</title>
		<link>http://www.system.adm.br/2009/04/renaming-a-network-interface-on-linux/</link>
		<comments>http://www.system.adm.br/2009/04/renaming-a-network-interface-on-linux/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 19:29:09 +0000</pubDate>
		<dc:creator>Lincoln Zuljewic Silva</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.system.adm.br/?p=47</guid>
		<description><![CDATA[Sometimes, when you add/remove a network card in Linux, the system automatically change the name of the interfaces (for example your eth0 became eth1). Depending of the system, it can cause a big problem to you, so you can use the command nameif to rename it back (or just rename your interfaces): Create a file [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes, when you add/remove a network card in Linux, the system automatically change the name of the interfaces (for example your eth0 became eth1). Depending of the system, it can cause a big problem to you, so you can use the command nameif to rename it back (or just rename your interfaces):</p>
<p>
	Create a file named /etc/mactab with the interface names and its mac address:<br />
	<span style="font-size: 12px;"><code>eth0 00:0B:DB:D5:6E:DD<br />
	eth1 00:03:47:3b:ef:b9<br />
	eth2 00:0B:DB:D5:6E:DE<br />
	banana01 00:03:47:3B:EF:B8</code></span></p>
<p>	After that, you should run the command nameif (/sbin/nameif) to apply your new configuration.</p>
<p>	Note 01: you can rename your interfaces to whatever you want.<br />
	Note 02a: before run the nameif, you should stop the interfaces.<br />
	Note 02b: you can do an ifdown &lt;interface&gt;<br />
	Note 03: if you reboot the server, this configuration will be lost, so you can create a simple shell script to rename it automatically on boot:</p>
<p>	<span style="font-size: 12px;"><code>vi /etc/init.d/nameif<br />
	#!/bin/bash</p>
<p>	case &quot;$1&quot; in<br />
	start)<br />
	&nbsp;&nbsp; &nbsp;echo &quot;Renaming the network interfaces...&quot;<br />
	&nbsp;&nbsp; &nbsp;/sbin/nameif<br />
	;;</p>
<p>	stop)<br />
	&nbsp;&nbsp; &nbsp;echo &quot;Ok&quot;<br />
	;;<br />
	esac</p>
<p>	chmod 755 /etc/init.d/nameif<br />
	ln -s /etc/init.d/nameif /etc/rc3.d/S04nameif</code></span></p>
<p>
	I know that you can use udev to rename an interface, but I believe that nameif is simpler.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.system.adm.br/2009/04/renaming-a-network-interface-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using vi as crontab editor</title>
		<link>http://www.system.adm.br/2009/04/using-vi-as-crontab-editor/</link>
		<comments>http://www.system.adm.br/2009/04/using-vi-as-crontab-editor/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 12:37:00 +0000</pubDate>
		<dc:creator>Lincoln Zuljewic Silva</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[debian]]></category>

		<guid isPermaLink="false">http://www.system.adm.br/?p=42</guid>
		<description><![CDATA[The default Debian installation use a non-vi editor when you try to use crontab (ie: &#8220;crontab -e&#8221;). To change it to vi, you should do the following: # rm -f /etc/alternatives/editor ln -s /usr/bin/vi /etc/alternatives/editor &#160;]]></description>
			<content:encoded><![CDATA[<p>The default Debian installation use a non-vi editor when you try to use crontab (ie: &ldquo;crontab -e&rdquo;).</p>
<p>	To change it to vi, you should do the following:</p>
<p>	<span style="font-size: 12px;"><code># rm -f /etc/alternatives/editor ln -s /usr/bin/vi /etc/alternatives/editor</code></span></p>
<p>	&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.system.adm.br/2009/04/using-vi-as-crontab-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH Memory fault(coredump) in HP-UX</title>
		<link>http://www.system.adm.br/2009/04/ssh-memory-faultcoredump-from-hp-ux/</link>
		<comments>http://www.system.adm.br/2009/04/ssh-memory-faultcoredump-from-hp-ux/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 19:21:37 +0000</pubDate>
		<dc:creator>Lincoln Zuljewic Silva</dc:creator>
				<category><![CDATA[HP-UX]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.system.adm.br/?p=37</guid>
		<description><![CDATA[If you try to access from a HP-UX another machine that has a newer version of SSH running, you may get a &#8220;SSH Memory fault(coredump)&#8221; message like the following one: # ssh -v server Debian OpenSSH_3.5p1, SSH protocols 1.5/2.0, OpenSSL 0&#215;0090609f 16153: debug1: Reading configuration data /opt/ssh/etc/ssh_config16153: debug1: Rhosts Authentication disabled, originating port will not [...]]]></description>
			<content:encoded><![CDATA[<p>If you try to access from a HP-UX another machine that has a newer version of SSH running, you may get a &ldquo;SSH Memory fault(coredump)&rdquo; message like the following one:</p>
<p>	<span style="font-size: 12px;"><code># ssh -v server<br />
	Debian OpenSSH_3.5p1, SSH protocols 1.5/2.0, OpenSSL 0&times;0090609f 16153: <br />
	debug1: Reading configuration data /opt/ssh/etc/ssh_config16153: <br />
	debug1: Rhosts Authentication disabled, originating port will not be trusted.16153: <br />
	debug1: ssh_connect: needpriv 0 16153: <br />
	debug1: Connecting to serverDebian [10.0.0.1] port 22.16153: <br />
	debug1: Connection established.16153: debug1: identity file /.ssh/id_rsa type -116153: <br />
	debug1: identity file /.ssh/id_dsa type -116153: <br />
	debug1: Remote protocol version 1.99, remote software version OpenSSH_4.2-chrootssh16153: <br />
	debug1: match: OpenSSH_4.2-chrootssh pat OpenSSH* 16153: <br />
	debug1: Enabling compatibility mode for protocol 2.0 16153: debug1: Local version string SSH-2.0-OpenSSH_3.5p1 <br />
	Memory fault(coredump)</code></span></p>
<p>
	To solve it, you should create a empty file named<span style="font-size: 12px;"><code> /etc/krb5.con</code></span>f in HP-UX. After that, you will be able to use SSH</p>
<p>	&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.system.adm.br/2009/04/ssh-memory-faultcoredump-from-hp-ux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Forcing a user changing the password on Linux</title>
		<link>http://www.system.adm.br/2009/04/forcing-a-user-changing-the-password/</link>
		<comments>http://www.system.adm.br/2009/04/forcing-a-user-changing-the-password/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 11:52:44 +0000</pubDate>
		<dc:creator>Lincoln Zuljewic Silva</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.system.adm.br/?p=30</guid>
		<description><![CDATA[When creating a new user, you can use the following command to force a user changing its password on first logon: # chage -d 0 &#60;username&#62; Doing this, the user will receive the following message: Password change requested. Choose a new password. Old Password: &#160;]]></description>
			<content:encoded><![CDATA[<p>When creating a new user, you can use the following command to force a user changing its password on first logon:</p>
<p>	<span style="font-size: 12px;"><code># chage -d 0 &lt;username&gt;</code></span></p>
<p>	Doing this, the user will receive the following message:</p>
<p>	Password change requested. Choose a new password. Old Password:</p>
<p>	&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.system.adm.br/2009/04/forcing-a-user-changing-the-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Locking a Linux account</title>
		<link>http://www.system.adm.br/2009/04/locking-an-linux-account/</link>
		<comments>http://www.system.adm.br/2009/04/locking-an-linux-account/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 14:11:31 +0000</pubDate>
		<dc:creator>Lincoln Zuljewic Silva</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.system.adm.br/?p=23</guid>
		<description><![CDATA[Before you remove an account from a system, is a good idea lock it for one week to make sure that no one use it. To lock, you can use the follow command: # passwd -l username (where username is the login id). After that, if someone try to loginusing this account, the system will [...]]]></description>
			<content:encoded><![CDATA[<p>Before you remove an account from a system, is a good idea lock it for one week to make sure that no one use it.</p>
<p>	To lock, you can use the follow command:</p>
<p>	<span style="font-size: 12px;"><code># passwd -l username</code></span> (where username is the login id).</p>
<p>	After that, if someone try to loginusing this account, the system will return:</p>
<p>	<span style="font-size: 12px;"><code># su - foobar</code></span></p>
<p>This account is currently not available.</p>
<p>	&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.system.adm.br/2009/04/locking-an-linux-account/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stop/Start a Guest OS in Vmware Server 2.0</title>
		<link>http://www.system.adm.br/2009/04/stopstart-a-vm-in-vmware-server-20/</link>
		<comments>http://www.system.adm.br/2009/04/stopstart-a-vm-in-vmware-server-20/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 14:01:12 +0000</pubDate>
		<dc:creator>Lincoln Zuljewic Silva</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.system.adm.br/?p=17</guid>
		<description><![CDATA[The VMWare 2.0 has a command named &#8220;vmrun&#8221; that can control the state of the VMs. The syntax is: vmrun [AUTHENTICATION-FLAGS] COMMAND [PARAMETERS] To list all started VM: # vmrun -u root -h &#8216;https://192.168.0.14:8333/sdk&#8217; -p YOURPASSWORD list Total running VMs: 3 [standard] Apolo/Apolo.vmx [standard] Ares - NS01/Ares - NS01.vmx [standard] hades - NS02/hades - NS02.vmx [...]]]></description>
			<content:encoded><![CDATA[<p>The VMWare 2.0 has a command named &ldquo;vmrun&rdquo; that can control the state of the VMs. The syntax is:</p>
<p>	<span style="font-size: 12px;"><code>vmrun [AUTHENTICATION-FLAGS] COMMAND [PARAMETERS]</code></span></p>
<p>	To list all started VM:</p>
<p>	<span style="font-size: 12px;"><code># vmrun -u root -h &lsquo;https://192.168.0.14:8333/sdk&rsquo; -p YOURPASSWORD list <br />
	Total running VMs: 3<br />
	[standard] Apolo/Apolo.vmx<br />
	[standard] Ares - NS01/Ares - NS01.vmx<br />
	[standard] hades - NS02/hades - NS02.vmx</code></span></p>
<p>	To stop a VM:</p>
<p>	<span style="font-size: 12px;"><code># vmrun -u root -h &lsquo;https://192.168.0.14:8333/sdk&rsquo; -p YOURPASSWORD stop &ldquo;[standard] Apolo/Apolo.vmx&rdquo;</code></span></p>
<p>	To start a VM:</p>
<p>	<span style="font-size: 12px;"><code># vmrun -u root -h &lsquo;https://192.168.0.14:8333/sdk&rsquo; -p YOURPASSWORD start &ldquo;[standard] Apolo/Apolo.vmx&rdquo;</code></span></p>
<p>	&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.system.adm.br/2009/04/stopstart-a-vm-in-vmware-server-20/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing OpenSSH from source on SuSe 10</title>
		<link>http://www.system.adm.br/2009/04/installing-openssh-from-source-on-suse-10/</link>
		<comments>http://www.system.adm.br/2009/04/installing-openssh-from-source-on-suse-10/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 14:13:35 +0000</pubDate>
		<dc:creator>Lincoln Zuljewic Silva</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[openssh]]></category>
		<category><![CDATA[suse]]></category>

		<guid isPermaLink="false">http://www.system.adm.br/?p=3</guid>
		<description><![CDATA[The current version of my SuSe is: # cat /etc/SuSE-release SUSE Linux Enterprise Server 10 (i586) VERSION = 10 PATCHLEVEL = 1 1 &#8211; Download OpenSSH: # cd /usr/src # wget http://anga.funkfeuer.at/ftp/pub/OpenBSD/OpenSSH/portable/openssh-5.2p1.tar.gz 2 &#8211; Unpack it: # tar zxvf openssh-5.2p1.tar.gz 3 &#8211; Check if you have the necessary packages: automake-1.9.6-2.i586.rpm cpp-4.0.2_20050901-3.i586.rpm gcc-4.0.2_20050901-3.i586.rpm gcc-c++-4.0.2_20050901-3.i586.rpm glibc-2.3.5-40.i586.rpm glibc-devel-2.3.5-40.i586.rpm [...]]]></description>
			<content:encoded><![CDATA[<p>The current version of my SuSe is:<br />
	<span style="font-size: 12px;"><code># cat /etc/SuSE-release<br />
	SUSE Linux Enterprise Server 10 (i586) VERSION = 10 PATCHLEVEL = 1</code></span></p>
<p>	1 &#8211; Download OpenSSH:<br />
	<span style="font-size: 12px;"><code># cd /usr/src<br />
	# wget http://anga.funkfeuer.at/ftp/pub/OpenBSD/OpenSSH/portable/openssh-5.2p1.tar.gz</code></span></p>
<p>	2 &#8211; Unpack it:<br />
	<span style="font-size: 12px;"><code># tar zxvf openssh-5.2p1.tar.gz</code></span></p>
<p>	3 &#8211; Check if you have the necessary packages:<br />
	<span style="font-size: 12px;"><code>automake-1.9.6-2.i586.rpm<br />
	cpp-4.0.2_20050901-3.i586.rpm<br />
	gcc-4.0.2_20050901-3.i586.rpm<br />
	gcc-c++-4.0.2_20050901-3.i586.rpm<br />
	glibc-2.3.5-40.i586.rpm<br />
	glibc-devel-2.3.5-40.i586.rpm<br />
	libselinux-1.23.11-3.i586.rpm<br />
	libstdc++-4.0.2_20050901-3.i586.rpm<br />
	libstdc++-devel-4.0.2_20050901-3.i586.rpm<br />
	openssl-devel-0.9.8a-18.15.i586.rpm<br />
	pam-devel-0.99.6.3-28.8.i586.rpm<br />
	pam_ssh-1.91-19.2.i586.rpm<br />
	sudo-1.6.8p9-2.i586.rpm<br />
	tcpd-devel-7.6-731.2.i586.rpm<br />
	zlib-devel-1.2.3-3.i586.rpm</code></span></p>
<p>	You can check it by typing:<br />
	<span style="font-size: 12px;"><code># rpm -qa (example: &quot;rpm -qa |grep openssl-devel&quot;)</code></span></p>
<p>	4 &#8211; If there are some packeage missing, I advice you search it in www.filewatcher.com and install using:<br />
	<span style="font-size: 12px;"><code># rpm -ivh (example: &quot;rpm -ivh tcpd-devel-7.6-731.2.i586.rpm&quot;)</code></span></p>
<p>	5 &#8211; Run configure:<br />
	<span style="font-size: 12px;"><code># cd /usr/src/openssh-5.2p1<br />
	# ./configure --prefix=/opt/ssh2 --with-libs=-ldl --disable-suid-ssh --with-privsep-user=sshd -with-tcp-wrappers --with-pam</code></span></p>
<p>	After some time, you should see something like this:<br />
	<span style="font-size: 12px;"><code>OpenSSH has been configured with the following options:<br />
	User binaries: /opt/ssh2/bin<br />
	System binaries: /opt/ssh2/sbin<br />
	Configuration files: /opt/ssh2/etc<br />
	Askpass program: /opt/ssh2/libexec/ssh-askpass<br />
	Manual pages: /opt/ssh2/share/man/manX<br />
	PID file: /var/run<br />
	Privilege separation chroot path: /var/empty<br />
	sshd default user PATH: /usr/bin:/bin:/usr/sbin:/sbin:/opt/ssh2/bin<br />
	Manpage format: doc<br />
	PAM support: yes<br />
	OSF SIA support: no<br />
	KerberosV support: no<br />
	SELinux support: no<br />
	Smartcard support: no<br />
	S/KEY support: no <br />
	TCP Wrappers support: yes<br />
	MD5 password support: no<br />
	libedit support: no<br />
	Solaris process contract support: no <br />
	IP address in $DISPLAY hack: no<br />
	Translate v4 in v6 hack: yes<br />
	BSD Auth support: no<br />
	Random number source: OpenSSL internal ONLY<br />
	Host: i686-pc-linux-gnu<br />
	Compiler: gcc<br />
	Compiler flags: -g -O2 -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wno-pointer-sign -Wformat-security -fno-builtin-memset -std=gnu99 <br />
	Preprocessor flags:<br />
	Linker flags:<br />
	Libraries: -lresolv -lcrypto -lutil -lz -lnsl -ldl -lcrypt +for sshd: -lwrap -lpam</p>
<p>	PAM is enabled. You may need to install a PAM control file for sshd, otherwise password authentication may fail. Example PAM control files can be found in the contrib/ subdirectory</code></span></p>
<p>	6 &#8211; Install contrib scripts. Check into /usr/src/openssh-5.2p1/contrib some files that we can use to setup our server:<br />
	<span style="font-size: 12px;"><code># cp sshd.pam.generic /etc/pam.d/sshd<br />
	# cp rc.sshd /etc/init.d/sshd <br />
	# cp sysconfig.ssh /etc/sysconfig/ssh<br />
	# cp rc.config.sshd /etc/rc.d/sshd<br />
	# chmod 755 /etc/init.d/sshd /etc/rc.d/sshd<br />
	# ln -s /etc/init.d/sshd /etc/rc.d/rc3.d/S20-sshd</code></span></p>
<p>	7 &#8211; Configure some parameters. Edit the main SSHD configuration file<br />
	<span style="font-size: 12px;"><code># vi /opt/ssh2/etc/sshd_config<br />
	Ensure that some lines are uncommented: <br />
	Line 21: Protocol 2 -&gt; Enable just the protocol version 2 (more secure)<br />
	Line 41: PermitRootLogin no -&gt; Do not enable root login<br />
	Line 46: RSAAuthentication yes -&gt; enable authentication thru auth-keys<br />
	Line 47: PubkeyAuthentication yes -&gt; enable authentication thru auth-keys<br />
	Line 48: AuthorizedKeysFile .ssh/authorized_keys -&gt; enable authentication thru auth-keys (keys location - user&#39;s home)<br />
	Line 86: UsePAM yes -&gt; enable PAM authentication<br />
	Line 113: Subsystem sftp /opt/ssh2/libexec/sftp-server -&gt; enable the sftp subsystem (for secure file transfer - NOT SCP)</code></span></p>
<p>	8 &#8211; Start the server:<br />
	<span style="font-size: 12px;"><code># /etc/init.d/sshd start</code></span></p>
<p>	9 &#8211; Place a login test</p>
<p>	10 &#8211; Check in your /var/log/message. If you see the following message:<br />
	<span style="font-size: 12px;"><code>Apr 7 10:02:48 localhost sshd[8388]: pam_unix(sshd:setcred): Unknown option: `shadow&#39;<br />
	Apr 7 10:02:48 localhost sshd[8388]: pam_unix(sshd:setcred): Unknown option: `nodelay&#39;<br />
	Apr 7 10:02:48 localhost sshd[8390]: pam_unix(sshd:setcred): Unknown option: `shadow&#39;<br />
	Apr 7 10:02:48 localhost sshd[8390]: pam_unix(sshd:setcred): Unknown option: `nodelay&#39;</code></span></p>
<p>	Edit your /etc/pam.d/sshd and change the following lines:<br />
	<span style="font-size: 12px;"><code>auth required /lib/security/pam_unix.so shadow nodelay</code></span><br />
	to<br />
	<span style="font-size: 12px;"><code>auth required /lib/security/pam_unix.so</code></span></p>
<p>	and</p>
<p>	<span style="font-size: 12px;"><code>password required /lib/security/pam_unix.so shadow nullok use_authtok</code></span><br />
	to<br />
	<span style="font-size: 12px;"><code>password required /lib/security/pam_unix.so use_authtok</code></span></p>
<p>	Thats it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.system.adm.br/2009/04/installing-openssh-from-source-on-suse-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
