<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Lethe's Tuxforge</title>
	
	<link>http://blog.tuxforge.com</link>
	<description>Tips, tricks and solutions for Linux Engineers... and users.</description>
	<lastBuildDate>Mon, 09 Jan 2012 18:09:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Tuxforge" /><feedburner:info uri="tuxforge" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>Tuxforge</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>SELinux Restore Default File Context</title>
		<link>http://feedproxy.google.com/~r/Tuxforge/~3/ArSZCnNOcV8/</link>
		<comments>http://blog.tuxforge.com/selinux-restore-context/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 13:39:56 +0000</pubDate>
		<dc:creator>Lethe</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux Certifications]]></category>
		<category><![CDATA[Q&A]]></category>
		<category><![CDATA[restore selinux context]]></category>
		<category><![CDATA[rhcsaselinux]]></category>
		<category><![CDATA[selinux]]></category>
		<category><![CDATA[selinux context]]></category>
		<category><![CDATA[selinux red hat]]></category>
		<category><![CDATA[selinux restorecon]]></category>

		<guid isPermaLink="false">http://blog.tuxforge.com/?p=7718</guid>
		<description><![CDATA[ Q: I&#8217;ve accidentally modified the SELinux context for a file or directory and now my application is not working any more how canI restore the default context? A: As you probably know SELinux is enabled in Enforcing mode by default on RHEL and Fedora systems and while it helps keep your system secure, of course [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/DUXiDCY8zSjgqRnK6NrXrXUExLY/0/da"><img src="http://feedads.g.doubleclick.net/~a/DUXiDCY8zSjgqRnK6NrXrXUExLY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/DUXiDCY8zSjgqRnK6NrXrXUExLY/1/da"><img src="http://feedads.g.doubleclick.net/~a/DUXiDCY8zSjgqRnK6NrXrXUExLY/1/di" border="0" ismap="true"></img></a></p><!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><span><a href="http://blog.tuxforge.com/wp-content/uploads/2012/01/Selinux.jpg"  rel="lightbox[7718]" title="SElinux"><img class="alignleft size-thumbnail wp-image-7766" title="SElinux" src="http://blog.tuxforge.com/wp-content/uploads/2012/01/Selinux-150x150.jpg" alt="Selinux 150x150 SELinux Restore Default File Context"  /></a> </span><span style="color: #ff0000;">Q:</span> I&#8217;ve accidentally modified the <b>SELinux</b> context for a file or directory and now my application is not working any more how canI restore the default context?</p>
<p><strong><span style="color: #00ff00;">A:</span></strong> As you probably know <u>SELinux</u> is enabled in Enforcing mode by default on RHEL and Fedora systems and while it helps keep your system secure, of course it is not the panacea to all security risks just one the bricks for a better protection, sometimes it can get in the &#8220;middle&#8221; of normal operations.<span id="more-7718"></span></p>
<p>In a system protected by SELinux every file and/or directory has a default context assigned to it which is usually defined by the path under which the object is created and is defined under the <em>/etc/selinux/targeted/contexts/files</em> path in the <em>file_contexts </em>file, I encourage you to open up the file with your favorite editor and have a look at it.</p>
<p>If you changed the context of a file or directory with the <em>chcon </em>command and realize that this disrupted the normal operations of the system you can use the following basic command to restore the default SELinux context :</p>
<pre class="brush: bash; title: ; notranslate"> restorecon -v $FILENAME </pre>
<p>That&#8217;s is, SELinux will try to match the file path with he default context and will eventually assign it again to the file or directory restoring the original context and hopefully solving the malfunction of the system.</p>
<p>SELinux is a fascinating and really powerful tool which I encourage you to know and use, many administrators simply disable its control, for this reason I will write again about SELinux implementations and its troubleshooting.</p>
<p>Cheers Lethe.</p>
<h4>Incoming search terms:</h4><ul><li><a href="http://blog.tuxforge.com/selinux-restore-context/"  title="vnc logo">vnc logo</a></li><li><a href="http://blog.tuxforge.com/selinux-restore-context/"  title="redhat fedora logo">redhat fedora logo</a></li><li><a href="http://blog.tuxforge.com/selinux-restore-context/"  title="vmware logo">vmware logo</a></li><li><a href="http://blog.tuxforge.com/selinux-restore-context/"  title="centos6 logo">centos6 logo</a></li><li><a href="http://blog.tuxforge.com/selinux-restore-context/"  title="success images">success images</a></li><li><a href="http://blog.tuxforge.com/selinux-restore-context/"  title="linux dystrybution">linux dystrybution</a></li><li><a href="http://blog.tuxforge.com/selinux-restore-context/"  title="logo linux centos">logo linux centos</a></li><li><a href="http://blog.tuxforge.com/selinux-restore-context/"  title="finding a new job">finding a new job</a></li><li><a href="http://blog.tuxforge.com/selinux-restore-context/"  title="download redhat logo">download redhat logo</a></li><li><a href="http://blog.tuxforge.com/selinux-restore-context/"  title="Distributions de Linux">Distributions de Linux</a></li></ul><div class="shr-publisher-7718"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a href="http://blog.tuxforge.com/goto/http%3A%2F%2Fblog.tuxforge.com%2Fselinux-restore-context%2F' data-shr_title='SELinux+Restore+Default+File+Context'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Fselinux-restore-context%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Fselinux-restore-context%2F' data-shr_title='SELinux+Restore+Default+File+Context'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Fselinux-restore-context%2F' data-shr_title='SELinux+Restore+Default+File+Context'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://blog.tuxforge.com/rhce-scripting/" class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_ rel="bookmark" class="wherego_title">RHCE Practice Lab - Scripting</a></li><li>Powered by <a target="_blank" rel="nofollow" href="http://blog.tuxforge.com/goto/http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/" >Where did they go from here?</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Tuxforge/~4/ArSZCnNOcV8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.tuxforge.com/selinux-restore-context/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.tuxforge.com/selinux-restore-context/</feedburner:origLink></item>
		<item>
		<title>Configure Linux VNC Server</title>
		<link>http://feedproxy.google.com/~r/Tuxforge/~3/-g-VzHIlJrk/</link>
		<comments>http://blog.tuxforge.com/linux-configure-vnc-server/#comments</comments>
		<pubDate>Sun, 01 Jan 2012 12:30:19 +0000</pubDate>
		<dc:creator>Lethe</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux Certifications]]></category>
		<category><![CDATA[Pro Linux]]></category>
		<category><![CDATA[linux rhcsa]]></category>
		<category><![CDATA[linux vnc]]></category>
		<category><![CDATA[rhcsa linux]]></category>
		<category><![CDATA[rhcsa remote administration]]></category>
		<category><![CDATA[rhcsa vnc]]></category>
		<category><![CDATA[tigervnc]]></category>
		<category><![CDATA[vnc]]></category>
		<category><![CDATA[vnc linux]]></category>
		<category><![CDATA[vnc rhcsa]]></category>
		<category><![CDATA[vnc server]]></category>

		<guid isPermaLink="false">http://blog.tuxforge.com/?p=7736</guid>
		<description><![CDATA[ While most of the Linux servers I administer and run have no GUI installed sometimes it can be handy to administer a remote Linux workstation or server via a GUI, this is also an exam requirement for the the Red Hat Certified Systems Administration exam so let&#8217;s see how a VNC server is installed and [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/q-3oybP7qBSuQ7yGUiTUnxmdAf0/0/da"><img src="http://feedads.g.doubleclick.net/~a/q-3oybP7qBSuQ7yGUiTUnxmdAf0/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/q-3oybP7qBSuQ7yGUiTUnxmdAf0/1/da"><img src="http://feedads.g.doubleclick.net/~a/q-3oybP7qBSuQ7yGUiTUnxmdAf0/1/di" border="0" ismap="true"></img></a></p><!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="http://blog.tuxforge.com/wp-content/uploads/2012/01/vnc.png"  rel="lightbox[7736]" title="VNC Server"><img class="alignleft size-thumbnail wp-image-7747" title="VNC Server" src="http://blog.tuxforge.com/wp-content/uploads/2012/01/vnc-150x150.png" alt="vnc 150x150 Configure Linux VNC Server"  /></a> While most of the Linux servers I administer and run have no GUI installed sometimes it can be handy to administer a remote Linux workstation or server via a GUI, this is also an exam requirement for the the Red Hat Certified Systems Administration exam so let&#8217;s see how a <b>VNC server</b> is installed and configured under Linux.</p>
<h1>Install VNC Server</h1>
<p>The first step of setting up a <i>VNC Server</i> under Linux is of course that of installing the required packages, for RHEL and its rebuilt systems the process is pretty straightforward and quick and can be achieved with the following command :<span id="more-7736"></span></p>
<pre class="brush: bash; title: ; notranslate"> yum install tigervnc-server </pre>
<p>Once yum has done installing the required package, which has very few dependencies, you can proceed to the configuration of the various VNC Sessions.</p>
<h2>Configure VNC Server</h2>
<p>Once <u>VNC server</u> has been installed you need to configure the various sessions and the ports on which the VNC server will listen, the syntax of the needed command, in its simplest form, is as follows :</p>
<pre class="brush: bash; title: ; notranslate"> vncserver </pre>
<p>When launched without any argument the command will configure the required configuration files under the user&#8217;s home directory and will create a listener on the default port for VNC which is 5901, this is good as long as you need to configure only one VNC server but how to proceed in case you need to configure multiple VNC sessions for different users? The command to accomplish this is as follows :</p>
<pre class="brush: bash; title: ; notranslate"> vncserver :2 </pre>
<p>After asking you to input a session password, the above command will configure a listening VNC Server for the current user on port 5902 as specified by the argument <em>:2 </em>which can really be any other valid number relative to the 590<em>X </em>port.</p>
<h3>VNC Server change password</h3>
<p>As anticipated the <em>vncserver </em>command will configure a VNC session for any user and will require you to input a password to protect the session, if later on you need to change the password chosen you can easily do that with the following command :</p>
<pre class="brush: bash; title: ; notranslate"> vncpasswd </pre>
<p>Again the system will require you to input the password twice and will configure it for the session.</p>
<p>To test the configuration of the VNC server just configured you can use the default viewer that ships with Linux to open a connection like in the following picture  :</p>
<p><a href="http://blog.tuxforge.com/wp-content/uploads/2012/01/VNC-Connection.png"  rel="lightbox[7736]" title="VNC Connection"><img class="aligncenter size-thumbnail wp-image-7748" title="VNC Connection" src="http://blog.tuxforge.com/wp-content/uploads/2012/01/VNC-Connection-150x150.png" alt="VNC Connection 150x150 Configure Linux VNC Server"  /></a></p>
<p><a href="http://blog.tuxforge.com/wp-content/uploads/2012/01/VNC-Password.png"  rel="lightbox[7736]" title="VNC Password"><img class="aligncenter size-thumbnail wp-image-7749" title="VNC Password" src="http://blog.tuxforge.com/wp-content/uploads/2012/01/VNC-Password-150x150.png" alt="VNC Password 150x150 Configure Linux VNC Server"  /></a></p>
<p>That&#8217;s all for the VNC Server configuration under Linux, I hope you did find the post useful and will look forward your comments or questions in case you have any.</p>
<p>Cheers Lethe.</p>
<h4>Incoming search terms:</h4><ul><li><a href="http://blog.tuxforge.com/linux-configure-vnc-server/"  title="vncserver linux">vncserver linux</a></li><li><a href="http://blog.tuxforge.com/linux-configure-vnc-server/"  title="Certified RHEL">Certified RHEL</a></li><li><a href="http://blog.tuxforge.com/linux-configure-vnc-server/"  title="what is a distro">what is a distro</a></li><li><a href="http://blog.tuxforge.com/linux-configure-vnc-server/"  title="IMAGENES DE vnc">IMAGENES DE vnc</a></li><li><a href="http://blog.tuxforge.com/linux-configure-vnc-server/"  title="Vnc Server Linux">Vnc Server Linux</a></li><li><a href="http://blog.tuxforge.com/linux-configure-vnc-server/"  title="vnc configuration">vnc configuration</a></li><li><a href="http://blog.tuxforge.com/linux-configure-vnc-server/"  title="unable open connection libvirt management daemon">unable open connection libvirt management daemon</a></li><li><a href="http://blog.tuxforge.com/linux-configure-vnc-server/"  title="linux vnc server">linux vnc server</a></li><li><a href="http://blog.tuxforge.com/linux-configure-vnc-server/"  title="apache icons">apache icons</a></li><li><a href="http://blog.tuxforge.com/linux-configure-vnc-server/"  title="linux vnc">linux vnc</a></li></ul><div class="shr-publisher-7736"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Flinux-configure-vnc-server%2F' data-shr_title='Configure+Linux+VNC+Server'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Flinux-configure-vnc-server%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Flinux-configure-vnc-server%2F' data-shr_title='Configure+Linux+VNC+Server'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Flinux-configure-vnc-server%2F' data-shr_title='Configure+Linux+VNC+Server'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div id="wherego_related"> </div><img src="http://feeds.feedburner.com/~r/Tuxforge/~4/-g-VzHIlJrk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.tuxforge.com/linux-configure-vnc-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.tuxforge.com/linux-configure-vnc-server/</feedburner:origLink></item>
		<item>
		<title>Fedora 16 unable to start vsftpd</title>
		<link>http://feedproxy.google.com/~r/Tuxforge/~3/guctjk8z-no/</link>
		<comments>http://blog.tuxforge.com/fedora-16-vsftpd/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 06:31:23 +0000</pubDate>
		<dc:creator>Lethe</dc:creator>
				<category><![CDATA[Linux Certifications]]></category>
		<category><![CDATA[Linux How to]]></category>
		<category><![CDATA[Failed to issue method call: Unit vsftpd.service failed to load: No such file or directory. See system logs and 'systemctl status vsftpd.service' for details]]></category>
		<category><![CDATA[FC16 - missing /etc/rc.d/init.d/vsftpd - FedoraForum.org]]></category>
		<category><![CDATA[fedora 16 vsftpd]]></category>
		<category><![CDATA[fedora ftp]]></category>
		<category><![CDATA[fedora start vsftpd]]></category>
		<category><![CDATA[linux ftp]]></category>
		<category><![CDATA[Linux vsftpd]]></category>
		<category><![CDATA[vsftpd]]></category>

		<guid isPermaLink="false">http://blog.tuxforge.com/?p=7681</guid>
		<description><![CDATA[*EDIT* As the Fedora project released an updated vsftpd package which fixes the described problem the article has become obsolete, I leave it in place just as a reference. The default FTP server for the Fedora, and RHEL like distributions, is vsftpd which can be easily installed with the command : Vsftpd is a feature [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/zf4gZQRuvUtMuVj-0bOyf75dEYg/0/da"><img src="http://feedads.g.doubleclick.net/~a/zf4gZQRuvUtMuVj-0bOyf75dEYg/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/zf4gZQRuvUtMuVj-0bOyf75dEYg/1/da"><img src="http://feedads.g.doubleclick.net/~a/zf4gZQRuvUtMuVj-0bOyf75dEYg/1/di" border="0" ismap="true"></img></a></p><!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="http://blog.tuxforge.com/wp-content/uploads/2011/12/vsftpd.jpg"  rel="lightbox[7681]" title="Fedora 16 unable to start vsftpd"><img class="alignleft size-thumbnail wp-image-7682" src="http://blog.tuxforge.com/wp-content/uploads/2011/12/vsftpd-150x150.jpg" height="150" title="Fedora 16 unable to start vsftpd" alt="vsftpd 150x150 Fedora 16 unable to start vsftpd" /></a>*EDIT* As the Fedora project released an updated <b>vsftpd</b> package which fixes the described problem the article has become obsolete, I leave it in place just as a reference.</p>
<p>The default FTP server for the Fedora, and RHEL like distributions, is <i>vsftpd</i> which can be easily installed with the command :</p>
<pre class="brush: bash; title: ; notranslate"> yum install &lt;u&gt;vsftpd&lt;/u&gt; </pre>
<p>Vsftpd is a feature rich FTP server and up to today it served all my needs but the version that ships with Fedora 16 has still an unresolved <a target="_blank" rel="nofollow" href="http://blog.tuxforge.com/goto/https://bugzilla.redhat.com/show_bug.cgi?id=753365" rel="nofollow" >bug </a>that makes starting and stopping the service awkward and in any case not as described in the official Fedora documentation. <span id="more-7681"></span></p>
<h2>Fedora 16 &#8211; Start VSFTP</h2>
<p>According to the official documentation once you have the vsftp package installed you should start the service with the command :</p>
<pre class="brush: bash; title: ; notranslate"> systemctl start vsftpd.service </pre>
<p>When launching the command you will see a message like the following :</p>
<pre class="brush: bash; title: ; notranslate"> Failed to issue method call: Unit vsftpd.service failed to load:
No such file or directory. See system logs and 'systemctl status vsftpd.service'
for details. </pre>
<p>While a patch to this problem is already available in the  Fedora testing repository if you don&#8217;t feel like messing with test updates you can easily solve the problem starting the service with the command :</p>
<pre class="brush: bash; title: ; notranslate"> systemctl start vsftpd@vsftpd.service </pre>
<p>In case you want the service to automatically start you can use the command :</p>
<pre class="brush: bash; title: ; notranslate"> systemctl enable vsftpd@.service </pre>
<p>Until the patch is fully accepted and released in the stable repositories above solution should work without any problem.</p>
<p>I hope you did find the article useful and would appreciate if you could take a second to comment or share it.</p>
<p>Cheers Lethe.</p>
<h4>Incoming search terms:</h4><ul><li><a href="http://blog.tuxforge.com/fedora-16-vsftpd/"  title="success">success</a></li><li><a href="http://blog.tuxforge.com/fedora-16-vsftpd/"  title="fedora 16 vsftpd">fedora 16 vsftpd</a></li><li><a href="http://blog.tuxforge.com/fedora-16-vsftpd/"  title="red hat logo for resume">red hat logo for resume</a></li><li><a href="http://blog.tuxforge.com/fedora-16-vsftpd/"  title="red hat certified engineer logo">red hat certified engineer logo</a></li><li><a href="http://blog.tuxforge.com/fedora-16-vsftpd/"  title="vsftpd fedora 16">vsftpd fedora 16</a></li><li><a href="http://blog.tuxforge.com/fedora-16-vsftpd/"  title="fedora 16 ftp server">fedora 16 ftp server</a></li><li><a href="http://blog.tuxforge.com/fedora-16-vsftpd/"  title="linux distro logos">linux distro logos</a></li><li><a href="http://blog.tuxforge.com/fedora-16-vsftpd/"  title="no spam">no spam</a></li><li><a href="http://blog.tuxforge.com/fedora-16-vsftpd/"  title="linux admin">linux admin</a></li><li><a href="http://blog.tuxforge.com/fedora-16-vsftpd/"  title="logs and systemct">logs and systemct</a></li></ul><div class="shr-publisher-7681"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a href="http://blog.tuxforge.com/goto/http%3A%2F%2Fblog.tuxforge.com%2Ffedora-16-vsftpd%2F' data-shr_title='Fedora+16+unable+to+start+vsftpd'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Ffedora-16-vsftpd%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Ffedora-16-vsftpd%2F' data-shr_title='Fedora+16+unable+to+start+vsftpd'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Ffedora-16-vsftpd%2F' data-shr_title='Fedora+16+unable+to+start+vsftpd'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://blog.tuxforge.com/linux-configure-vnc-server/" class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_ rel="bookmark" class="wherego_title">Configure Linux VNC Server</a></li><li>Powered by <a target="_blank" rel="nofollow" href="http://blog.tuxforge.com/goto/http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/" >Where did they go from here?</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Tuxforge/~4/guctjk8z-no" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.tuxforge.com/fedora-16-vsftpd/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.tuxforge.com/fedora-16-vsftpd/</feedburner:origLink></item>
		<item>
		<title>Linux kill multiple process with a single command</title>
		<link>http://feedproxy.google.com/~r/Tuxforge/~3/FYQY56J0ZDE/</link>
		<comments>http://blog.tuxforge.com/linux-kill-multiple-process/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 10:55:28 +0000</pubDate>
		<dc:creator>Lethe</dc:creator>
				<category><![CDATA[Linux How to]]></category>
		<category><![CDATA[Pro Linux]]></category>
		<category><![CDATA[kill -9]]></category>
		<category><![CDATA[linux kill multiple processes]]></category>
		<category><![CDATA[linux kill process]]></category>
		<category><![CDATA[linux processes]]></category>
		<category><![CDATA[ps]]></category>
		<category><![CDATA[red hat processes]]></category>

		<guid isPermaLink="false">http://blog.tuxforge.com/?p=7669</guid>
		<description><![CDATA[ Sometimes it can be useful to kill multiple processes with a single command, while using a combination of ps and grep can help you hunt down the process you need and to kill it this is not the easiest or fastest  approach if you need to kill a large number of processes. Let&#8217;s see how [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/4PXKMCUVfxFu6RNV_YarnCk8PZs/0/da"><img src="http://feedads.g.doubleclick.net/~a/4PXKMCUVfxFu6RNV_YarnCk8PZs/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/4PXKMCUVfxFu6RNV_YarnCk8PZs/1/da"><img src="http://feedads.g.doubleclick.net/~a/4PXKMCUVfxFu6RNV_YarnCk8PZs/1/di" border="0" ismap="true"></img></a></p><!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="http://blog.tuxforge.com/wp-content/uploads/2011/11/processes.jpg"  rel="lightbox[7669]" title="Linux processes"><img class="alignleft size-thumbnail wp-image-7674" title="Linux processes" src="http://blog.tuxforge.com/wp-content/uploads/2011/11/processes-150x150.jpg" alt="processes 150x150 Linux kill multiple process with a single command" width="150" height="150" /></a> Sometimes it can be useful to kill multiple processes with a single command, while using a combination of ps and grep can help you hunt down the process you need and to kill it this is not the easiest or fastest  approach if you need to kill a large number of processes. Let&#8217;s see how to do this.</p>
<p>The first step would be getting a list of the interesting processes we need to kill, in this example I will use the NFS daemon, which can easily be accomplished with a command similar to the following :</p>
<pre class="brush: bash; title: ; notranslate"> ps -ef  | grep nfs </pre>
<p><span id="more-7669"></span></p>
<pre></pre>
<p>The command on my system produced the following output :</p>
<pre class="brush: bash; title: ; notranslate"> ps -ef | grep nfs
root      1873     2  0 08:50 ?        00:00:00 [nfsd4]
root      1874     2  0 08:50 ?        00:00:00 [nfsd4_callbacks]
root      1875     2  0 08:50 ?        00:00:00 [nfsd]
root      1876     2  0 08:50 ?        00:00:00 [nfsd]
root      1877     2  0 08:50 ?        00:00:00 [nfsd]
root      1878     2  0 08:50 ?        00:00:00 [nfsd]
root      1879     2  0 08:50 ?        00:00:00 [nfsd]
root      1880     2  0 08:50 ?        00:00:00 [nfsd]
root      1881     2  0 08:50 ?        00:00:00 [nfsd]
root      1882     2  0 08:50 ?        00:00:00 [nfsd]
root      4835  4554  0 18:43 pts/0    00:00:00 grep nfs
</pre>
<p>Ok we can see the full list of processes bound to NFS together with other information we actually don&#8217;t need, what is really interesting for us is PID of the process which is exposed in the second column of the output so let&#8217;s call awk to help us in the task :</p>
<pre class="brush: bash; title: ; notranslate"> ps -ef | grep nfs | awk '{print $2}' </pre>
<p>The above command will list all processes on the system bout to NFS but this time instead of printing everything  it will print on screen only the content of the second output column which again on my system looks like :</p>
<pre class="brush: bash; title: ; notranslate"> ps -ef | grep nfs | awk '{print $2}'
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
4871
</pre>
<p>Ok we&#8217;re almost there, now let&#8217;s put all together and let&#8217;s kill all the processes  with the command :</p>
<pre class="brush: bash; title: ; notranslate">  kill `ps -ef | grep nfs | awk '{print $2}'` </pre>
<p>That&#8217;s it all the processes that results from our expression will be killed with the single command, that is even easy to script when you often need to kill processes on a server (I keep a copy of it on one of my lab machines where I often run a script that launches 100+ instances of the same program and need to kill them all).</p>
<p>I hope you will find the article interesting and useful and would appreciate if you could take the time to retweet or share it.</p>
<p>Cheers Lethe.</p>
<h4>Incoming search terms:</h4><ul><li><a href="http://blog.tuxforge.com/linux-kill-multiple-process/"  title="complete linux distro logo">complete linux distro logo</a></li><li><a href="http://blog.tuxforge.com/linux-kill-multiple-process/"  title="exam bash">exam bash</a></li><li><a href="http://blog.tuxforge.com/linux-kill-multiple-process/"  title="how to kill multiple process in linux">how to kill multiple process in linux</a></li><li><a href="http://blog.tuxforge.com/linux-kill-multiple-process/"  title="linux kill multiple processes">linux kill multiple processes</a></li><li><a href="http://blog.tuxforge.com/linux-kill-multiple-process/"  title="kill the process">kill the process</a></li><li><a href="http://blog.tuxforge.com/linux-kill-multiple-process/"  title="vmware workstation icon">vmware workstation icon</a></li><li><a href="http://blog.tuxforge.com/linux-kill-multiple-process/"  title="kill multiple processes linux">kill multiple processes linux</a></li><li><a href="http://blog.tuxforge.com/linux-kill-multiple-process/"  title="linux kill -a">linux kill -a</a></li><li><a href="http://blog.tuxforge.com/linux-kill-multiple-process/"  title="original logo of redhat">original logo of redhat</a></li><li><a href="http://blog.tuxforge.com/linux-kill-multiple-process/"  title="kill nfsd4">kill nfsd4</a></li></ul><div class="shr-publisher-7669"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a href="http://blog.tuxforge.com/goto/http%3A%2F%2Fblog.tuxforge.com%2Flinux-kill-multiple-process%2F' data-shr_title='Linux+kill+multiple+process+with+a+single+command'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Flinux-kill-multiple-process%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Flinux-kill-multiple-process%2F' data-shr_title='Linux+kill+multiple+process+with+a+single+command'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Flinux-kill-multiple-process%2F' data-shr_title='Linux+kill+multiple+process+with+a+single+command'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://blog.tuxforge.com/how-to-shutdown-ubuntu-server/" class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_ rel="bookmark" class="wherego_title">How to shutdown Ubuntu Server</a></li><li>Powered by <a target="_blank" rel="nofollow" href="http://blog.tuxforge.com/goto/http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/" >Where did they go from here?</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Tuxforge/~4/FYQY56J0ZDE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.tuxforge.com/linux-kill-multiple-process/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.tuxforge.com/linux-kill-multiple-process/</feedburner:origLink></item>
		<item>
		<title>Linux change the speed and duplex settings of an Ethernet card | linux change duplex settings</title>
		<link>http://feedproxy.google.com/~r/Tuxforge/~3/XgVpz7cZLmI/</link>
		<comments>http://blog.tuxforge.com/linux-change-duplex/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 18:27:02 +0000</pubDate>
		<dc:creator>Lethe</dc:creator>
				<category><![CDATA[Linux How to]]></category>
		<category><![CDATA[Pro Linux]]></category>
		<category><![CDATA[change network duplex]]></category>
		<category><![CDATA[change speed settings]]></category>
		<category><![CDATA[duplex setting]]></category>
		<category><![CDATA[ethtool]]></category>
		<category><![CDATA[ethtool duplex]]></category>
		<category><![CDATA[linux change duplex]]></category>
		<category><![CDATA[linux change duplex settings]]></category>
		<category><![CDATA[linux change speed settings]]></category>
		<category><![CDATA[linux duplex]]></category>
		<category><![CDATA[linux duplex and speed settings]]></category>
		<category><![CDATA[linux duplex settings]]></category>
		<category><![CDATA[linux ethtool]]></category>

		<guid isPermaLink="false">http://blog.tuxforge.com/?p=7648</guid>
		<description><![CDATA[ Q: I need to change the speed and duplex settings for my network card, is this possible? A: Under Linux you can use the built-in tool ethtool to display and change the duplex settings for your network card under Linux, depending on the NIC installed on your system you could try to use the mii-tool [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/9a0FOs5wyKQipw-LWuibnlb9gy0/0/da"><img src="http://feedads.g.doubleclick.net/~a/9a0FOs5wyKQipw-LWuibnlb9gy0/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/9a0FOs5wyKQipw-LWuibnlb9gy0/1/da"><img src="http://feedads.g.doubleclick.net/~a/9a0FOs5wyKQipw-LWuibnlb9gy0/1/di" border="0" ismap="true"></img></a></p><!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><strong><span style="color: #ff0000"><a href="http://blog.tuxforge.com/wp-content/uploads/2011/11/Ethernet.jpg"  rel="lightbox[7648]" title="Linux change the speed and duplex settings of an Ethernet card"><img class="alignleft size-thumbnail wp-image-7649" src="http://blog.tuxforge.com/wp-content/uploads/2011/11/Ethernet-150x150.jpg" height="150" title="Linux change the speed and duplex settings of an Ethernet card" alt="Ethernet 150x150 Linux change the speed and duplex settings of an Ethernet card" /></a> Q:</span></strong> I need to change the speed and duplex settings for my network card, is this possible?</p>
<p><strong><span style="color: #00ff00">A:</span></strong> Under Linux you can use the built-in tool <strong>ethtool </strong>to display and change the duplex settings for your network card under Linux, depending on the NIC installed on your system you could try to use the mii-tool as well. In my experience ethtool works for most of the modern network cards so I will describe only the use of this tool<span id="more-7648"></span></p>
<h2>Install ethtool</h2>
<p>Depending on your system ethtool could be already present and so you  will be able to change duplex settings right away, in case it is not present you can easily install with the following command:</p>
<pre class="brush: bash; title: ; notranslate"> yum install ethtool </pre>
<p>Or if you are using Debian or Ubuntu with the command :</p>
<pre class="brush: bash; title: ; notranslate"> apt-get install ehtool </pre>
<h2>Get information of duplex settings for network card</h2>
<p>Once you have installed the tools of the trade is time to show test they are functioning, the syntax of the command is pretty straightforward all you have to do for a basic test is launch the command <strong>ethtool </strong>followed by the name of the interface for which we want to get information here&#8217;s output for my eth0 interface :</p>
<pre class="brush: bash; title: ; notranslate"> Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes:   10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes:  10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Speed: 10Mb/s
Duplex: Half
Port: MII
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000033 (51)
drv probe ifdown ifup
Link detected: no
</pre>
<p>In the above output you can see all important information about the network card, it is disconnected so your output could be slightly different, assuming that you need to configure you card to operate on full duplex at a speed of 100 Mbps you would use the following command :</p>
<pre class="brush: bash; title: ; notranslate"> ethtool -s eth0 speed 100 duplex full

ethtool -s eth0 speed 100 duplex half

ethtool -s eth0 speed 10 duplex full </pre>
<p>As you can see above I gave multiple examples on how to use ethtool to configure various duplex setting for the network card, be aware that changes made this way will not survive a reboot and so are a good way to test different settings.</p>
<h2>Make Duplex Settings change permanent</h2>
<p>Once you have configured your network card to the correct duplex settings you will want to make the changes permanent, to do so you will need to change the configuration file for your network card in our example the file will be <strong>/etc/sysconfig/network-scripts/ifcfg-eth0</strong> on a Red Hat based system and add the following text :</p>
<pre class="brush: bash; title: ; notranslate"> ETHTOOL_OPTS=&quot;speed 100 duplex full autoneg off&quot;

service networking restart </pre>
<p>The above will set the speed of the network card to 100 Mbps with full duplex enabled disabling auto negotiation, the last command is needed so that Linux will pick up the duplex changes, of course you could also reboot the server but I prefer to leave that to the Windows world <img src='http://blog.tuxforge.com/wp-includes/images/smilies/icon_smile.gif' alt="icon smile Linux change the speed and duplex settings of an Ethernet card" class='wp-smiley' title="Linux change the speed and duplex settings of an Ethernet card" /> </p>
<p>Under Debian/Ubuntu the needed steps are slightly different, in this case you will need to create a bash script and put something like the following code :</p>
<pre class="brush: bash; title: ; notranslate"> #!/bin/sh
 ETHTOOL=&quot;/usr/sbin/ethtool&quot;
 DEV=&quot;eth0&quot;
 SPEED=&quot;100 duplex full&quot;
 case &quot;$1&quot; in
 start)
 echo -n &quot;Setting eth0 speed 100 duplex full...&quot;;
 $ETHTOOL -s $DEV speed $SPEED;
 echo &quot; done.&quot;;;
 stop)
 ;;
 esac
 exit 0 </pre>
<p>Once saved the script make it executable and copy it under the <em>/etc/init.d/ </em>directory and finally add it to the startup sequence with the command :</p>
<pre class="brush: bash; title: ; notranslate"> update-rc.d &lt;your_script&gt; defaults </pre>
<p>You can try to restart the system to check the results of the new configuration.</p>
<p>That&#8217;s all you need to change duplex settings under Linux, ethtool is invaluable when testing and troubleshooting network related problems and I hope this post will help you as well.</p>
<p>In case you face any problem feel free to write me or leave a command and I will be more than glad to help you out.</p>
<p>Cheers Lethe.</p>
<h4>Incoming search terms:</h4><ul><li><a href="http://blog.tuxforge.com/linux-change-duplex/"  title="pictures of yum">pictures of yum</a></li><li><a href="http://blog.tuxforge.com/linux-change-duplex/"  title="Yum-yum">Yum-yum</a></li><li><a href="http://blog.tuxforge.com/linux-change-duplex/"  title="redhat certified engineer logo">redhat certified engineer logo</a></li><li><a href="http://blog.tuxforge.com/linux-change-duplex/"  title="logo distribution Linux">logo distribution Linux</a></li><li><a href="http://blog.tuxforge.com/linux-change-duplex/"  title="bash org logo">bash org logo</a></li><li><a href="http://blog.tuxforge.com/linux-change-duplex/"  title="WORKSTATION IMAGE">WORKSTATION IMAGE</a></li><li><a href="http://blog.tuxforge.com/linux-change-duplex/"  title="workstation ext:png">workstation ext:png</a></li><li><a href="http://blog.tuxforge.com/linux-change-duplex/"  title="linux bash logo">linux bash logo</a></li><li><a href="http://blog.tuxforge.com/linux-change-duplex/"  title="ethtool -t eth0 fail ubuntu">ethtool -t eth0 fail ubuntu</a></li><li><a href="http://blog.tuxforge.com/linux-change-duplex/"  title="in windows how we can see ethernet setting full duplex speed">in windows how we can see ethernet setting full duplex speed</a></li></ul><div class="shr-publisher-7648"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a href="http://blog.tuxforge.com/goto/http%3A%2F%2Fblog.tuxforge.com%2Flinux-change-duplex%2F' data-shr_title='Linux+change+the+speed+and+duplex+settings+of+an+Ethernet+card'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Flinux-change-duplex%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Flinux-change-duplex%2F' data-shr_title='Linux+change+the+speed+and+duplex+settings+of+an+Ethernet+card'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Flinux-change-duplex%2F' data-shr_title='Linux+change+the+speed+and+duplex+settings+of+an+Ethernet+card'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://blog.tuxforge.com/kvm-failed-to-start-domain/" class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_ rel="bookmark" class="wherego_title">KVM - Failed to start domain connection reset by peer | KVM Failed to start domain</a></li><li>Powered by <a target="_blank" rel="nofollow" href="http://blog.tuxforge.com/goto/http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/" >Where did they go from here?</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Tuxforge/~4/XgVpz7cZLmI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.tuxforge.com/linux-change-duplex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.tuxforge.com/linux-change-duplex/</feedburner:origLink></item>
		<item>
		<title>KVM - Failed to start domain connection reset by peer | KVM Failed to start domain</title>
		<link>http://feedproxy.google.com/~r/Tuxforge/~3/ViUasXInR2k/</link>
		<comments>http://blog.tuxforge.com/kvm-failed-to-start-domain/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 10:03:11 +0000</pubDate>
		<dc:creator>Lethe</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux How to]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[kvm]]></category>
		<category><![CDATA[kvm can't start domain]]></category>
		<category><![CDATA[kvm cannot start domain]]></category>
		<category><![CDATA[kvm connection reset by peer]]></category>
		<category><![CDATA[linux kvm]]></category>

		<guid isPermaLink="false">http://blog.tuxforge.com/?p=7632</guid>
		<description><![CDATA[ When using KVM trying to start a virtual machine you could get the error KVM Failed to start domain $DOMAIN. Let&#8217;s see what is causing this and how it can be resolved. KVM &#8211; Failed to start domain connection reset by peer When you shut down a KVM host what happens behind the curtains is [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/tO9Xrsn-JqnfINV1KcZcH34-6Pw/0/da"><img src="http://feedads.g.doubleclick.net/~a/tO9Xrsn-JqnfINV1KcZcH34-6Pw/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/tO9Xrsn-JqnfINV1KcZcH34-6Pw/1/da"><img src="http://feedads.g.doubleclick.net/~a/tO9Xrsn-JqnfINV1KcZcH34-6Pw/1/di" border="0" ismap="true"></img></a></p><!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="http://blog.tuxforge.com/wp-content/uploads/2011/10/kvmbanner-logo2.png"  rel="lightbox[7632]" title="KVM - Failed to start domain connection reset by peer"><img class="alignleft size-thumbnail wp-image-7635" src="http://blog.tuxforge.com/wp-content/uploads/2011/10/kvmbanner-logo2-150x93.png" height="93" title="KVM   Failed to start domain connection reset by peer" alt="kvmbanner logo2 150x93 KVM   Failed to start domain connection reset by peer" /></a> When using KVM trying to start a virtual machine you could get the error <strong>KVM Failed to start domain </strong>$DOMAIN. Let&#8217;s see what is causing this and how it can be resolved.</p>
<h2>KVM &#8211; Failed to start domain connection reset by peer</h2>
<p>When you shut down a KVM host what happens behind the curtains is that libvirt daemon will try to save the state of the running virtual machine, DOMAIN, so that the next recovery/power on will be faster but this can lead to the Failed to start domain connection reset by peer problem, I personally have noted this behavior on more conservative distributions (namely my Red Hat Enterprise Linux 6.1 laptop) and my Scientific Linux 6.1 boxes but not on my Fedora workstations but cannot give this for granted of course. <span id="more-7632"></span></p>
<p>The solution to the problem is easier than it seems and saved me lot of troubleshooting a few times already so if you are faced with the <strong>Failed to start domain connection reset by peer</strong> error try the following command which will reset the save state of the virtual machine and should bring back everything to normal :</p>
<pre class="brush: bash; title: ; notranslate"> virsh managedsave-remove $DOM </pre>
<p>Now try to launch the virtual machine once again and it should start without any problem.</p>
<p>I hope you will find the the post useful and as usual please feel free to leave a comment or write me.</p>
<p>Cheers Lethe.</p>
<h4>Incoming search terms:</h4><ul><li><a href="http://blog.tuxforge.com/kvm-failed-to-start-domain/"  title="chrome">chrome</a></li><li><a href="http://blog.tuxforge.com/kvm-failed-to-start-domain/"  title="kvm reset host">kvm reset host</a></li><li><a href="http://blog.tuxforge.com/kvm-failed-to-start-domain/"  title="managedsave-remove">managedsave-remove</a></li><li><a href="http://blog.tuxforge.com/kvm-failed-to-start-domain/"  title="kvm connection reset by peer">kvm connection reset by peer</a></li><li><a href="http://blog.tuxforge.com/kvm-failed-to-start-domain/"  title="vkvm connection reset">vkvm connection reset</a></li><li><a href="http://blog.tuxforge.com/kvm-failed-to-start-domain/"  title="connection reset by peer kvm">connection reset by peer kvm</a></li><li><a href="http://blog.tuxforge.com/kvm-failed-to-start-domain/"  title="virsh managedsave-remove">virsh managedsave-remove</a></li><li><a href="http://blog.tuxforge.com/kvm-failed-to-start-domain/"  title="connection reset vkvm">connection reset vkvm</a></li><li><a href="http://blog.tuxforge.com/kvm-failed-to-start-domain/"  title="kvm virtual machine fails to start">kvm virtual machine fails to start</a></li><li><a href="http://blog.tuxforge.com/kvm-failed-to-start-domain/"  title="red_receive: Connection reset by peer kvm">red_receive: Connection reset by peer kvm</a></li></ul><div class="shr-publisher-7632"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a href="http://blog.tuxforge.com/goto/http%3A%2F%2Fblog.tuxforge.com%2Fkvm-failed-to-start-domain%2F' data-shr_title='KVM+-+Failed+to+start+domain+connection+reset+by+peer'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Fkvm-failed-to-start-domain%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Fkvm-failed-to-start-domain%2F' data-shr_title='KVM+-+Failed+to+start+domain+connection+reset+by+peer'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Fkvm-failed-to-start-domain%2F' data-shr_title='KVM+-+Failed+to+start+domain+connection+reset+by+peer'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://blog.tuxforge.com/bash-script-to-create-users/" class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_ rel="bookmark" class="wherego_title">Bash script to create users</a></li><li>Powered by <a target="_blank" rel="nofollow" href="http://blog.tuxforge.com/goto/http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/" >Where did they go from here?</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Tuxforge/~4/ViUasXInR2k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.tuxforge.com/kvm-failed-to-start-domain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.tuxforge.com/kvm-failed-to-start-domain/</feedburner:origLink></item>
		<item>
		<title>Bash script to create users</title>
		<link>http://feedproxy.google.com/~r/Tuxforge/~3/uVpD3biBbnM/</link>
		<comments>http://blog.tuxforge.com/bash-script-to-create-users/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 17:26:19 +0000</pubDate>
		<dc:creator>Lethe</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Linux How to]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA["useradd script"]]></category>
		<category><![CDATA[bash script]]></category>
		<category><![CDATA[bash script users]]></category>
		<category><![CDATA[create multiple users]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[useradd]]></category>
		<category><![CDATA[useradd bash]]></category>

		<guid isPermaLink="false">http://blog.tuxforge.com/?p=3133</guid>
		<description><![CDATA[ Q: how can I create a script to create a number of users and assign them a standard password while forcing the user to change it at the first login? A:There are basically two approaches to the above problem, one is using the list of users directly into the script itself while the other is [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/3syuYP-MSxqev3UUBKTQzp_lKMo/0/da"><img src="http://feedads.g.doubleclick.net/~a/3syuYP-MSxqev3UUBKTQzp_lKMo/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/3syuYP-MSxqev3UUBKTQzp_lKMo/1/da"><img src="http://feedads.g.doubleclick.net/~a/3syuYP-MSxqev3UUBKTQzp_lKMo/1/di" border="0" ismap="true"></img></a></p><!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><span style="color: #ff0000;"><a href="http://blog.tuxforge.com/wp-content/uploads/2011/10/terminal.png"  rel="lightbox[3133]" title="Bash logo"><img class="alignleft size-full wp-image-3140" title="Bash logo" src="http://blog.tuxforge.com/wp-content/uploads/2011/10/terminal.png" alt="terminal Bash script to create users" width="128" height="128" /></a> Q:</span> how can I create a script to create a number of users and assign them a standard password while forcing the user to change it at the first login?</p>
<p><span style="color: #00ff00;">A:</span>There are basically two approaches to the above problem, one is using the list of users directly into the script itself while the other is using an external text file, let&#8217;s see both approaches. <span id="more-3133"></span></p>
<p>The first bash script will create users from a list &#8220;embedded&#8221; in the script itself, it has the advantage of being self contained so that you can just copy/paste it and change the list of users :</p>
<pre class="brush: bash; title: ; notranslate"> #!/bin/bash
USERS=(user1 user2 user3 user4 user5 user6 user7)

for U in &quot;${USERS[@]}&quot;; do

useradd -m $U

echo $U&quot;123&quot; | passwd --stdin &quot;$U&quot;

chage -d 0 $U

done
</pre>
<p>The above script will create all users defined with $USERS variable together with an home folder, assign a standard password of username123 and finally set the password policy so that the user will be forced to change it on the first login.</p>
<p>The second bash script uses the same code as the one just seen the main difference is that it reads the list of users from a file named &#8220;users.txt&#8221; which can eventually be changed to anything you like, the main advantage of this version of the script is that you can easily run it multiple times with a different list of users any time :</p>
<pre class="brush: bash; title: ; notranslate"> #!/bin/bash
 for U in `more users.txt`; do

useradd -m $U

echo $U&quot;123&quot; | passwd --stdin &quot;$U&quot;

chage -d 0 $U

done
 </pre>
<p>Of course there are endless alternative ways to accomplish the same with different syntax or solution and I would love to read your solution. I hope you will find the post useful and if so please take a minute to leave me a comment or retweet it.</p>
<p>Cheers Lethe.</p>
<h4>Incoming search terms:</h4><ul><li><a href="http://blog.tuxforge.com/bash-script-to-create-users/"  title="linux redhat logo">linux redhat logo</a></li><li><a href="http://blog.tuxforge.com/bash-script-to-create-users/"  title="ASSP">ASSP</a></li><li><a href="http://blog.tuxforge.com/bash-script-to-create-users/"  title="bash script to create users">bash script to create users</a></li><li><a href="http://blog.tuxforge.com/bash-script-to-create-users/"  title="distro">distro</a></li><li><a href="http://blog.tuxforge.com/bash-script-to-create-users/"  title="linux script for create users">linux script for create users</a></li><li><a href="http://blog.tuxforge.com/bash-script-to-create-users/"  title="force password change chage script bash">force password change chage script bash</a></li><li><a href="http://blog.tuxforge.com/bash-script-to-create-users/"  title="#!/bin/bash adduser users txt">#!/bin/bash adduser users txt</a></li><li><a href="http://blog.tuxforge.com/bash-script-to-create-users/"  title="for i in `more users txt `">for i in `more users txt `</a></li><li><a href="http://blog.tuxforge.com/bash-script-to-create-users/"  title="create users from list bash">create users from list bash</a></li><li><a href="http://blog.tuxforge.com/bash-script-to-create-users/"  title="how to create user in bash">how to create user in bash</a></li></ul><div class="shr-publisher-3133"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a href="http://blog.tuxforge.com/goto/http%3A%2F%2Fblog.tuxforge.com%2Fbash-script-to-create-users%2F' data-shr_title='Bash+script+to+create+users'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Fbash-script-to-create-users%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Fbash-script-to-create-users%2F' data-shr_title='Bash+script+to+create+users'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Fbash-script-to-create-users%2F' data-shr_title='Bash+script+to+create+users'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://blog.tuxforge.com/vmware-workstation-fedora-14/" class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_ rel="bookmark" class="wherego_title">VMware Workstation on Fedora 14 unable to build kernel module</a></li><li><a href="http://blog.tuxforge.com/kvm-failed-to-start-domain/"  rel="bookmark" class="wherego_title">KVM - Failed to start domain connection reset by peer | KVM Failed to start domain</a></li><li><a href="http://blog.tuxforge.com/rhce-scripting/"  rel="bookmark" class="wherego_title">RHCE Practice Lab - Scripting</a></li><li><a href="http://blog.tuxforge.com/linux-graphical-scp/"  rel="bookmark" class="wherego_title">Linux Graphical SCP</a></li><li>Powered by <a target="_blank" rel="nofollow" href="http://blog.tuxforge.com/goto/http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/" >Where did they go from here?</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Tuxforge/~4/uVpD3biBbnM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.tuxforge.com/bash-script-to-create-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.tuxforge.com/bash-script-to-create-users/</feedburner:origLink></item>
		<item>
		<title>Avoid duplicates in bash history | bash history duplicates</title>
		<link>http://feedproxy.google.com/~r/Tuxforge/~3/4TTSp1IIq4M/</link>
		<comments>http://blog.tuxforge.com/bash-history-duplicates/#comments</comments>
		<pubDate>Tue, 27 Sep 2011 12:47:08 +0000</pubDate>
		<dc:creator>Lethe</dc:creator>
				<category><![CDATA[Linux How to]]></category>
		<category><![CDATA[Pro Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[bash delete duplicates]]></category>
		<category><![CDATA[bash history]]></category>
		<category><![CDATA[bash history duplicates]]></category>
		<category><![CDATA[history duplicates]]></category>
		<category><![CDATA[istory duplicates]]></category>

		<guid isPermaLink="false">http://blog.tuxforge.com/?p=3110</guid>
		<description><![CDATA[ Sometimes when working, specially when writing and testing scripts, I have the need to work in the $SHELL and repeat the same commands over and over as a matter of fact if I check my $HISTORY for a command I find something like similar to : I guess you got an idea as this comes [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/06KPopbeDd-Tr0WNzduGMzKhR_s/0/da"><img src="http://feedads.g.doubleclick.net/~a/06KPopbeDd-Tr0WNzduGMzKhR_s/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/06KPopbeDd-Tr0WNzduGMzKhR_s/1/da"><img src="http://feedads.g.doubleclick.net/~a/06KPopbeDd-Tr0WNzduGMzKhR_s/1/di" border="0" ismap="true"></img></a></p><!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="http://blog.tuxforge.com/wp-content/uploads/2011/09/bash-logo-small.jpg"  rel="lightbox[3110]" title="Bash history duplicates"><img class="alignleft size-thumbnail wp-image-3113" title="Bash history duplicates" src="http://blog.tuxforge.com/wp-content/uploads/2011/09/bash-logo-small-150x150.jpg" alt="bash logo small 150x150 Avoid duplicates in bash history"  /></a> Sometimes when working, specially when writing and testing scripts, I have the need to work in the $SHELL and repeat the same commands over and over as a matter of fact if I check my $HISTORY for a command I find something like similar to :</p>
<p><span id="more-3110"></span></p>
<pre class="brush: bash; title: ; notranslate">  592  vim script.sh
593  chmod +x script.sh
594  ./script.sh
595  vim script.sh
596  ./script.sh
597  vim script.sh
598  ./script.sh
599  vim script.sh
600  ./script.sh
601  vim script.sh
602  ./script.sh
603  vim script.sh
604  ./script.sh
605  vim script.sh
606  ./script.sh
607  vim script.sh
608  ./script.sh
609  vim script.sh
610  ./script.sh
611  ./script.sh
</pre>
<p>I guess you got an idea as this comes from my work computer as I&#8217;m deep in some serious scripting these days, not very handy nor very elegant either as everytime I need to search for a command I used a while back I&#8217;m forced to grep through the results or use CTRL + r as I cannot force myself to use &#8220;!!&#8221; or something history command itself.</p>
<p>While looking for a solution for <b>bash history duplicates</b>  I came came across a section of the bash man page that described exactly what I was looking for.</p>
<p>Add the following line to your .bashrc file so that the $SHELL will not keep in history duplicates of the same command as I did above :</p>
<pre class="brush: bash; title: ; notranslate"> # User specific aliases and functions
export HISTCONTROL=erasedups:ignoredups </pre>
<p>So what this line does? Well ignoredups simply tells bash history to ignore duplicates, hence making $HISTORY &#8220;nicer&#8221;, while erasedups causes all previous lines matching the current line  to  be  removed from the history list before that line is saved. Actually there are many other switches and options that can be used but this is what I needed for my modest needs (even because 99% of the time I&#8217;m not working locally on my system <img src='http://blog.tuxforge.com/wp-includes/images/smilies/icon_smile.gif' alt="icon smile Avoid duplicates in bash history" class='wp-smiley' title="Avoid duplicates in bash history" /> )</p>
<p>Here&#8217;s en except from the bash man page describing the various switches you can use in your .bashrc file to configure the shell to your needs.</p>
<pre class="brush: bash; title: ; notranslate"> HISTCONTROL
A colon-separated list of values controlling  how  commands  are
saved  on  the  history  list.   If  the list of values includes
ignorespace, lines which begin with a space  character  are  not
saved  in  the history list.  A value of ignoredups causes lines
matching the previous history entry to not be saved.  A value of
ignoreboth is shorthand for ignorespace and ignoredups.  A value
of erasedups causes all previous lines matching the current line
to  be  removed from the history list before that line is saved.
Any value not in the above list is ignored.  If  HISTCONTROL  is
unset,  or does not include a valid value, all lines read by the
shell parser are saved on the history list, subject to the value
of  HISTIGNORE.  The second and subsequent lines of a multi-line
compound command are not tested, and are added  to  the  history
regardless of the value of HISTCONTROL.
</pre>
<p>Well I hope you will find this little trick useful, let me know your thoughts or if you have any question.</p>
<p>Cheers Lethe.</p>
<h4>Incoming search terms:</h4><ul><li><a href="http://blog.tuxforge.com/bash-history-duplicates/"  title="red hat linux">red hat linux</a></li><li><a href="http://blog.tuxforge.com/bash-history-duplicates/"  title="vmware workstation logo">vmware workstation logo</a></li><li><a href="http://blog.tuxforge.com/bash-history-duplicates/"  title="bash history duplicates">bash history duplicates</a></li><li><a href="http://blog.tuxforge.com/bash-history-duplicates/"  title="logo rhel">logo rhel</a></li><li><a href="http://blog.tuxforge.com/bash-history-duplicates/"  title="logo de bash">logo de bash</a></li><li><a href="http://blog.tuxforge.com/bash-history-duplicates/"  title="sh scripting logo">sh scripting logo</a></li><li><a href="http://blog.tuxforge.com/bash-history-duplicates/"  title="avoid repeats in bash history">avoid repeats in bash history</a></li><li><a href="http://blog.tuxforge.com/bash-history-duplicates/"  title="bash site logos">bash site logos</a></li><li><a href="http://blog.tuxforge.com/bash-history-duplicates/"  title="bash shell logo">bash shell logo</a></li><li><a href="http://blog.tuxforge.com/bash-history-duplicates/"  title="bash skip duplicates">bash skip duplicates</a></li></ul><div class="shr-publisher-3110"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Fbash-history-duplicates%2F' data-shr_title='Avoid+duplicates+in+bash+history'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Fbash-history-duplicates%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Fbash-history-duplicates%2F' data-shr_title='Avoid+duplicates+in+bash+history'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Fbash-history-duplicates%2F' data-shr_title='Avoid+duplicates+in+bash+history'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div id="wherego_related"> </div><img src="http://feeds.feedburner.com/~r/Tuxforge/~4/4TTSp1IIq4M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.tuxforge.com/bash-history-duplicates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.tuxforge.com/bash-history-duplicates/</feedburner:origLink></item>
		<item>
		<title>Linux FTP Server not working</title>
		<link>http://feedproxy.google.com/~r/Tuxforge/~3/XpMR8B8sbUY/</link>
		<comments>http://blog.tuxforge.com/linux-ftp-server-not-working/#comments</comments>
		<pubDate>Sun, 18 Sep 2011 18:13:45 +0000</pubDate>
		<dc:creator>Lethe</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux How to]]></category>
		<category><![CDATA[FTP iptables]]></category>
		<category><![CDATA[FTP linux not working]]></category>
		<category><![CDATA[ip_conntrack_ftp]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linux ftp]]></category>
		<category><![CDATA[Linux FTP Server]]></category>
		<category><![CDATA[linux ftp server not working]]></category>
		<category><![CDATA[Linux vsftpd]]></category>
		<category><![CDATA[vsftp not working]]></category>
		<category><![CDATA[vsftpd]]></category>

		<guid isPermaLink="false">http://blog.tuxforge.com/?p=3066</guid>
		<description><![CDATA[ Q: I&#8217;ve installed the FTP server package on my Linux  machine but when I try to connect to it via an FTP client the connection does not work. How can I solve this? A:  When opening a connection to an FTP server the client will actually open two connection to your server, one of the [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/26FgMH4pHKuL3yFh2Dby0njV27I/0/da"><img src="http://feedads.g.doubleclick.net/~a/26FgMH4pHKuL3yFh2Dby0njV27I/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/26FgMH4pHKuL3yFh2Dby0njV27I/1/da"><img src="http://feedads.g.doubleclick.net/~a/26FgMH4pHKuL3yFh2Dby0njV27I/1/di" border="0" ismap="true"></img></a></p><!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><span style="color: #ff0000"><strong><a href="http://blog.tuxforge.com/wp-content/uploads/2011/09/FTP.jpg"  rel="lightbox[3066]" title="Linux FTP Server not working"><img class="alignleft size-thumbnail wp-image-3093" src="http://blog.tuxforge.com/wp-content/uploads/2011/09/FTP-150x150.jpg" height="150" title="Linux FTP Server not working" alt="FTP 150x150 Linux FTP Server not working" /></a> Q: </strong><span style="color: #000000">I&#8217;ve installed the FTP server package on my Linux  machine but when I try to connect to it via an FTP client the connection does not work. How can I solve this? </span></span></p>
<p><span style="color: #00ff00"><strong>A:  </strong><span style="color: #000000">When opening a connection to an FTP server the client will actually open two connection to your server, one of the two is used for the &#8220;<em>data channel&#8221; </em>which need to be allowed on your firewall, assuming you are using the default Linux IP Tables firewall you will need to import the needed kernel modules otherwise the FTP server will not work. <span id="more-3066"></span></span></span></p>
<h2><span style="color: #000000"><strong>Linux FTP Server configuration </strong></span></h2>
<p><span style="color: #000000">The first step for your FTP Server configuration will be, of course, installing the FTP Server package in our example we are going to use vsFTP which is the default shipping with Red Hat based distributions :</span></p>
<pre class="brush: bash; title: ; notranslate"> yum install vsftpd </pre>
<p><span style="color: #000000">Once this is done you can proceed to configure your firewall to allow FTP connections to the server. Just as raw guideline you can use something similar to the following :</span></p>
<pre class="brush: bash; title: ; notranslate">iptables -I INPUT  1 -p tcp --dport 20:21 -j ACCEPT </pre>
<p>At this point you could think your FTP Server is working what is really missing, and more often than note cause of headaches when configuring a <i>Linux FTP server</i>, is importing the kernel modules needed by IP tables with the following command :</p>
<pre class="brush: bash; title: ; notranslate"> modprobe ip_conntrack_ftp </pre>
<p>Once you have done this you can test your FTP Server and you will be able to connect and use the FTP server without any problem.</p>
<h3>Automatically load the required Kernel modules</h3>
<p>Once you have tested your configuration you have to configure Linux so that the required kernel modules will be loaded at boot time, there are various approaches to do this but you can easily add the required modules to the /etc/.rc.local file with a syntax similar to the following :</p>
<pre class="brush: bash; title: ; notranslate"> # File: /etc/rc.local

# Module to track the state of connections
modprobe ip_conntrack

# Load the iptables active FTP module, requires ip_conntrack
modprobe ip_conntrack_ftp
</pre>
<p>As I&#8217;ve said there are other approaches to reach the same goal, this is something I love about the Linux world, so feel free to use the one you think more appropriate or that is easier for you.</p>
<p>I hope you did find the article informative and useful if so please support me sharing it via twitter or the +1 Button or leaving a comment below.</p>
<p>Cheers Lethe.</p>
<h4>Incoming search terms:</h4><ul><li><a href="http://blog.tuxforge.com/linux-ftp-server-not-working/"  title="logo of red hat">logo of red hat</a></li><li><a href="http://blog.tuxforge.com/linux-ftp-server-not-working/"  title="linux ftp not working">linux ftp not working</a></li><li><a href="http://blog.tuxforge.com/linux-ftp-server-not-working/"  title="tuxforge ftp">tuxforge ftp</a></li><li><a href="http://blog.tuxforge.com/linux-ftp-server-not-working/"  title="ftp not working in linux server">ftp not working in linux server</a></li><li><a href="http://blog.tuxforge.com/linux-ftp-server-not-working/"  title="ftp not accepted on this linux server">ftp not accepted on this linux server</a></li><li><a href="http://blog.tuxforge.com/linux-ftp-server-not-working/"  title="ftp is not configured in linux">ftp is not configured in linux</a></li><li><a href="http://blog.tuxforge.com/linux-ftp-server-not-working/"  title="linux ftp server open connections">linux ftp server open connections</a></li><li><a href="http://blog.tuxforge.com/linux-ftp-server-not-working/"  title="linux ftp server configurations blogs">linux ftp server configurations blogs</a></li><li><a href="http://blog.tuxforge.com/linux-ftp-server-not-working/"  title="linux ftp server and client configuration blogs">linux ftp server and client configuration blogs</a></li><li><a href="http://blog.tuxforge.com/linux-ftp-server-not-working/"  title="linux ftp server">linux ftp server</a></li></ul><div class="shr-publisher-3066"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a target="_blank" rel="nofollow" href="http://blog.tuxforge.com/goto/http%3A%2F%2Fblog.tuxforge.com%2Flinux-ftp-server-not-working%2F' data-shr_title='Linux+FTP+Server+not+working'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Flinux-ftp-server-not-working%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Flinux-ftp-server-not-working%2F' data-shr_title='Linux+FTP+Server+not+working'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Flinux-ftp-server-not-working%2F' data-shr_title='Linux+FTP+Server+not+working'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/" class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_>Where did they go from here?</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Tuxforge/~4/XpMR8B8sbUY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.tuxforge.com/linux-ftp-server-not-working/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.tuxforge.com/linux-ftp-server-not-working/</feedburner:origLink></item>
		<item>
		<title>Virtmanager connect to remote Xen | Unable to open a connection to the libvirt management daemon virtmanager</title>
		<link>http://feedproxy.google.com/~r/Tuxforge/~3/TGqoELqcsNU/</link>
		<comments>http://blog.tuxforge.com/virt-manager-cant-connect-to-remote-xen-host/#comments</comments>
		<pubDate>Fri, 16 Sep 2011 07:38:14 +0000</pubDate>
		<dc:creator>Lethe</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Pro Linux]]></category>
		<category><![CDATA[Virtualization]]></category>

		<guid isPermaLink="false">http://blog.tuxforge.com/?p=3029</guid>
		<description><![CDATA[ In my work and in my studies I&#8217;m more often than not using virtualization to get the job done, most of them time I&#8217;m using VMware or KVM together with virtmanager, the latter specifically for preparing to update my RHCE, but my new job requires me to spend a great deal of time dealing with [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/EZiG_gmvUgvlE9yjGJoRmZRgNow/0/da"><img src="http://feedads.g.doubleclick.net/~a/EZiG_gmvUgvlE9yjGJoRmZRgNow/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/EZiG_gmvUgvlE9yjGJoRmZRgNow/1/da"><img src="http://feedads.g.doubleclick.net/~a/EZiG_gmvUgvlE9yjGJoRmZRgNow/1/di" border="0" ismap="true"></img></a></p><!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="http://blog.tuxforge.com/wp-content/uploads/2011/09/kvmbanner-logo2.png"  rel="lightbox[3029]" title="Virtmanager connect to remote Xen"><img class="alignleft size-thumbnail wp-image-3059" title="Virtmanager connect to remote Xen" src="http://blog.tuxforge.com/wp-content/uploads/2011/09/kvmbanner-logo2-150x93.png" alt="kvmbanner logo2 150x93 Virtmanager connect to remote Xen" width="150" height="93" /></a> In my work and in my studies I&#8217;m more often than not using virtualization to get the job done, most of them time I&#8217;m using VMware or KVM together with virtmanager, the latter specifically for preparing to update my RHCE, but my new job requires me to spend a great deal of time dealing with Novell SuSe Enterprise Linux which includes and uses the Xen hypervisor with which I&#8217;m not that familiar as I&#8217;ve dealt both with Xen and Citrix Xen server in the past but always preferred other types of solutions.<span id="more-3029"></span></p>
<h2></h2>
<h2>Unable to open a connection to the libvirt management daemon virtmanager</h2>
<p>Yesterday afternoon I was dealing with a test Xen installation that we are using in a lab for quick deployment of new Linux machines in the customer&#8217;s environment and after I installed Xen on the server I went to my laptop and fired up <strong>virtmanager</strong>  and tried to connect to the machine but all I could get back was the following error message :</p>
<pre class="brush: bash; title: ; notranslate"> &lt;em&gt;Unable to open a connection to the libvirt management daemon.

Libvirt URI is: xen+ssh://root@foobar/

Verify that:
 - The 'libvirtd' daemon has been started

Unable to open connection to hypervisor URI 'xen+ssh://root@server/':
 server closed connection
None

Maybe you need to install ssh-askpass in order to authenticate. </pre>
<p></em></pre>
<p>As it often happens it was not immediately obvious what the problem was specially if you think that I've used the same computer to connect to lot of KVM installations remotely without any problem, first thing I've checked were the firewall configuration, if the libvirtd was actually running and even restarted it but nothing nothing seemed to work.</p>
<p>I really started to feel frustrated and for the sake of being quick and get the job done I thought I would just give up the commodity of the GUI and would just revert to the command line, being the purist I am I even prefer this solution, and launched <em><em>virsh </em></em>and surprise surprise it has shown me what the real problem was with this easy to understand error message :</p>
<pre class="brush: bash; title: ; notranslate">virsh # connect xen+ssh://root@server/
bash: nc: command not found</pre>
<p>The nc command of the above error is part of the netcat package which can be installed under Red Hat and its clones with :</p>
<pre class="brush: bash; title: ; notranslate"> yum install nc </pre>
<p>And in the case you are using SuSe, like I am at the moment, you can install the required package with :</p>
<pre class="brush: bash; title: ; notranslate"> zypper install netcat-openbsd </pre>
<p>Once you have installed the required package on the <strong><em>SERVER</em><strong></strong></strong> virtmanager will connect to your Xen without any problem.</p>
<p>Hope you did find the article useful, if so please take the time to leave a comment or to retweet it, I will appreciate it and if you have any question and/or problems<br />
just let me know.</p>
<p>Cheers Lethe.</p>
<h4>Incoming search terms:</h4><ul><li><a href="http://blog.tuxforge.com/virt-manager-cant-connect-to-remote-xen-host/"  title="Unable to open a connection to the libvirt management daemon">Unable to open a connection to the libvirt management daemon</a></li><li><a href="http://blog.tuxforge.com/virt-manager-cant-connect-to-remote-xen-host/"  title=""></a></li><li><a href="http://blog.tuxforge.com/virt-manager-cant-connect-to-remote-xen-host/"  title="Unable to open a connection to the Xen hypervisor/daemon">Unable to open a connection to the Xen hypervisor/daemon</a></li><li><a href="http://blog.tuxforge.com/virt-manager-cant-connect-to-remote-xen-host/"  title="virt-manager unable to open a connection to the libvirt management daemon">virt-manager unable to open a connection to the libvirt management daemon</a></li><li><a href="http://blog.tuxforge.com/virt-manager-cant-connect-to-remote-xen-host/"  title="unable to open a connection to the libvirt management">unable to open a connection to the libvirt management</a></li><li><a href="http://blog.tuxforge.com/virt-manager-cant-connect-to-remote-xen-host/"  title="virt-manager unable to open connection xen">virt-manager unable to open connection xen</a></li><li><a href="http://blog.tuxforge.com/virt-manager-cant-connect-to-remote-xen-host/"  title="virt-manager remote xen">virt-manager remote xen</a></li><li><a href="http://blog.tuxforge.com/virt-manager-cant-connect-to-remote-xen-host/"  title="problem connect to server xen manager">problem connect to server xen manager</a></li><li><a href="http://blog.tuxforge.com/virt-manager-cant-connect-to-remote-xen-host/"  title="unable to open a connection to the libvirt management daemon xen">unable to open a connection to the libvirt management daemon xen</a></li><li><a href="http://blog.tuxforge.com/virt-manager-cant-connect-to-remote-xen-host/"  title="daemon ">daemon </a></li></ul><div class="shr-publisher-3029"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a href="http://blog.tuxforge.com/goto/http%3A%2F%2Fblog.tuxforge.com%2Fvirt-manager-cant-connect-to-remote-xen-host%2F' data-shr_title='Virtmanager+connect+to+remote+Xen'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Fvirt-manager-cant-connect-to-remote-xen-host%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Fvirt-manager-cant-connect-to-remote-xen-host%2F' data-shr_title='Virtmanager+connect+to+remote+Xen'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fblog.tuxforge.com%2Fvirt-manager-cant-connect-to-remote-xen-host%2F' data-shr_title='Virtmanager+connect+to+remote+Xen'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://blog.tuxforge.com/red-hat-certified-system-administrator-rhcsa/" class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_ rel="bookmark" class="wherego_title">Red Hat Certified System Administrator (RHCSA)</a></li><li><a href="http://blog.tuxforge.com/ubuntu-server-remote-administration/"  rel="bookmark" class="wherego_title">Ubuntu Server remote administration</a></li><li>Powered by <a target="_blank" rel="nofollow" href="http://blog.tuxforge.com/goto/http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/" >Where did they go from here?</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Tuxforge/~4/TGqoELqcsNU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.tuxforge.com/virt-manager-cant-connect-to-remote-xen-host/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.tuxforge.com/virt-manager-cant-connect-to-remote-xen-host/</feedburner:origLink></item>
	</channel>
</rss>

