<?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/tag/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>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>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>Adding new users to Xmail SMTP server</title>
		<link>http://www.system.adm.br/2009/04/adding-new-users-to-xmail-smtp-server/</link>
		<comments>http://www.system.adm.br/2009/04/adding-new-users-to-xmail-smtp-server/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 18:29:56 +0000</pubDate>
		<dc:creator>Lincoln Zuljewic Silva</dc:creator>
				<category><![CDATA[E-Mail server]]></category>
		<category><![CDATA[e-mail]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[xmail]]></category>

		<guid isPermaLink="false">http://www.system.adm.br/?p=9</guid>
		<description><![CDATA[There are three different ways to add an user on XMail: - Using &#8220;telnet localhost 6017&#8221; - Using XMailAdmin (a Windows client) - Using phpxmail (a php script that run in the browser &#160;&#160;&#160; &#8211; need apache and PHP in some server that can access the XMail server). The most important thing is configure a [...]]]></description>
			<content:encoded><![CDATA[<p>There are three different ways to add an user on XMail:<br />
	- Using &ldquo;telnet localhost 6017&rdquo;<br />
	- Using XMailAdmin (a Windows client)<br />
	- Using phpxmail (a php script that run in the browser<br />
	&nbsp;&nbsp;&nbsp; &#8211; need apache and PHP in some server that can access the XMail server).</p>
<p>	The most important thing is configure a user/passwd as XMail administrator:<br />
	- <span style="font-size: 12px;"><code># /var/MailRoot/bin/XMCrypt SOME_PASSWORD</code></span><br />
	- Edit the /var/MailRoot/ctrlaccounts.tab and add the following line:<br />
	&nbsp;&nbsp;&nbsp; <code>&quot;USERNAME&quot;&lt;TAB&gt;&quot;string returned from XMCrypt command&quot;</code><br />
	&nbsp;&nbsp; &nbsp;Note: SOME_PASSWORD is the desired password for the administrator user, USERNAME is the desired user and &lt;TAB&gt; means a TAB.</p>
<p>	Assuming that you have apache, php and phpxmail installed, access it thru http://YOUR_SERVER/phpxmail/ and fill the following data:<br />
	- Server hostname: XMail server hostname<br />
	- Server ip address: XMail server IP address<br />
	- Server port: XMail CTRL service port (usually 6017)<br />
	- CTRL account: the user created above<br />
	- CTRL password: the password defined above Once you are now able to login on that XMail CTRL console, go to &ldquo;server domains&rdquo;, click on the domain you wish to add the user and &ldquo;new user&rdquo;.</p>
<p>	&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.system.adm.br/2009/04/adding-new-users-to-xmail-smtp-server/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>
