<?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>EZ Linux Admin &#187; Linux Security</title>
	<atom:link href="http://www.ezlinuxadmin.com/category/linux-security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ezlinuxadmin.com</link>
	<description>Making Linux Easier</description>
	<lastBuildDate>Fri, 03 Feb 2012 18:43:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>kill a linux process that won’t die</title>
		<link>http://www.ezlinuxadmin.com/2012/02/kill-a-linux-process-that-wont-die/</link>
		<comments>http://www.ezlinuxadmin.com/2012/02/kill-a-linux-process-that-wont-die/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 18:43:39 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Linux Commands]]></category>
		<category><![CDATA[Linux Operating Systems]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[Linux Tricks]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=561</guid>
		<description><![CDATA[kill -s 9 [PID] Also try it without the -s if it won&#8217;t go.]]></description>
			<content:encoded><![CDATA[<p>kill -s 9 [PID]</p>
<p>Also try it without the -s if it won&#8217;t go.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2012/02/kill-a-linux-process-that-wont-die/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>add a 404 page to each website on a cpanel server</title>
		<link>http://www.ezlinuxadmin.com/2011/12/404-page-website-cpanel-server/</link>
		<comments>http://www.ezlinuxadmin.com/2011/12/404-page-website-cpanel-server/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 07:58:59 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Cpanel and WHM]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Linux Software / Scripts]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=555</guid>
		<description><![CDATA[#!/usr/bin/perl # cPlicensing.net &#8211; scripts            Copyright(c) 2003 cPlicensing.net. #                                     All rights Reserved. # support@cPlicensing.net              http://cPlicensing.net # Version: 0.02 print &#8220;Starting Scan&#8230;\n&#8221;; while(@USERS=getpwent()){ if (-d &#8220;$USERS[7]/public_html&#8221;) { if (-f &#8220;$USERS[7]/public_html/404.shtml&#8221;) { print &#8220;$USERS[0] 404.shtml exists\n&#8221;; } else { print &#8220;$USERS[0] creating 404.shtml&#8230;&#8221;; open(FILE,&#8221;&#62;$USERS[7]/public_html/404.shtml&#8221;) or die &#8220;Unable to create file: $!&#8221;; close(FILE); chmod(0644, [...]]]></description>
			<content:encoded><![CDATA[<p>#!/usr/bin/perl<br />
# cPlicensing.net &#8211; scripts            Copyright(c) 2003 cPlicensing.net.<br />
#                                     All rights Reserved.<br />
# support@cPlicensing.net              http://cPlicensing.net<br />
# Version: 0.02</p>
<p>print &#8220;Starting Scan&#8230;\n&#8221;;</p>
<p>while(@USERS=getpwent()){<br />
if (-d &#8220;$USERS[7]/public_html&#8221;) {<br />
if (-f &#8220;$USERS[7]/public_html/404.shtml&#8221;) {<br />
print &#8220;$USERS[0] 404.shtml exists\n&#8221;;<br />
} else {<br />
print &#8220;$USERS[0] creating 404.shtml&#8230;&#8221;;<br />
open(FILE,&#8221;&gt;$USERS[7]/public_html/404.shtml&#8221;) or die &#8220;Unable to create file: $!&#8221;;<br />
close(FILE);<br />
chmod(0644, &#8220;$USERS[7]/public_html/404.shtml&#8221;) or die &#8220;Unable to chmod file: $!&#8221;;<br />
chown($USERS[2],$USERS[3],&#8221;$USERS[7]/public_html/404.shtml&#8221;) or die &#8220;Unable to chown file: $!&#8221;;<br />
print &#8220;done\n&#8221;;<br />
}<br />
}<br />
}<br />
if (-f &#8220;/root/cpanel3-skel/public_html/404.shtml&#8221;) {<br />
print &#8220;404.shtml file exists in skel dir\n&#8221;;<br />
} else {<br />
print &#8220;Creating 404.shtml file in skel dir&#8230;&#8221;;<br />
open(FILE,&#8221;&gt;/root/cpanel3-skel/public_html/404.shtml&#8221;) or die &#8220;Unable to create file: $!&#8221;;<br />
print &#8220;done\n&#8221;;<br />
}</p>
<p>print &#8220;Scan Complete!\n&#8221;;</p>
<p>#ChangeLog<br />
#Version :: YYYY.MM.DD :: Type :: Description<br />
#<br />
#0.2 :: 2003.11.06 :: Bug Fix :: 404.shtml was created in the root skel folder, changed to public_html</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2011/12/404-page-website-cpanel-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backup cleaner script for cpanel</title>
		<link>http://www.ezlinuxadmin.com/2011/12/backup-cleaner-script-for-cpanel/</link>
		<comments>http://www.ezlinuxadmin.com/2011/12/backup-cleaner-script-for-cpanel/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 07:53:50 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Cpanel and WHM]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[cleaner]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=551</guid>
		<description><![CDATA[#!/usr/bin/perl # cPlicensing.net &#8211; scripts             Copyright(c) 2003 cPlicensing.net. #                                       All rights Reserved. # support@cPlicensing.net               http://cPlicensing.net # Unauthorized copying is prohibited #Version: 0.01 use POSIX; $delete_old     = &#8217;1&#8242;; #0 or 1, set to 1 to remove old account backups if($ARGV[0] eq &#8220;-d&#8221;) { $delete_old = &#8217;1&#8242;; } $&#124;++; POSIX::nice(19); print &#8220;Reading Backup Config&#8230;&#8221;; open(CPBACK,&#8221;/etc/cpbackup.conf&#8221;) or [...]]]></description>
			<content:encoded><![CDATA[<p>#!/usr/bin/perl<br />
# cPlicensing.net &#8211; scripts             Copyright(c) 2003 cPlicensing.net.<br />
#                                       All rights Reserved.<br />
# support@cPlicensing.net               http://cPlicensing.net<br />
# Unauthorized copying is prohibited<br />
#Version: 0.01</p>
<p>use POSIX;</p>
<p>$delete_old     = &#8217;1&#8242;; #0 or 1, set to 1 to remove old account backups<br />
if($ARGV[0] eq &#8220;-d&#8221;) { $delete_old = &#8217;1&#8242;; }</p>
<p>$|++;<br />
POSIX::nice(19);</p>
<p>print &#8220;Reading Backup Config&#8230;&#8221;;<br />
open(CPBACK,&#8221;/etc/cpbackup.conf&#8221;) or die(&#8220;Failed, Does it exist and do you have access?\n&#8221;);<br />
while(&lt;CPBACK&gt;) {<br />
s/\n//g;<br />
my($name,$value) = split(/ /, $_);<br />
$CONF{$name} = $value;<br />
}<br />
close(CPBACK);<br />
print &#8220;Complete\n&#8221;;</p>
<p>if ($CONF{&#8216;BACKUPENABLE&#8217;} ne &#8220;yes&#8221;) {<br />
die &#8220;Backup Not Enabled\n&#8221;;<br />
}<br />
if (! -e $CONF{&#8216;BACKUPDIR&#8217;}){<br />
die &#8220;Backup Dir Doesnt Exist\n&#8221;;<br />
}</p>
<p>until (`ps ax` !~ m/cpbackup/) {<br />
print &#8220;Detected cpbackup process&#8230;Sleeping for 60 Seconds\n&#8221;;<br />
sleep(60);<br />
};</p>
<p>if ($CONF{&#8216;BACKUPMOUNT&#8217;} eq &#8220;yes&#8221;) {<br />
if(`mount` !~ m/$CONF{&#8216;BACKUPDIR&#8217;}/){<br />
system(&#8220;mount&#8221;,&#8221;$CONF{&#8216;BACKUPDIR&#8217;}&#8221;);<br />
}<br />
system(&#8220;mount&#8221;,&#8221;-o&#8221;,&#8221;remount,rw&#8221;,&#8221;$CONF{&#8216;BACKUPDIR&#8217;}&#8221;);<br />
}</p>
<p>cleandir(&#8220;$CONF{&#8216;BACKUPDIR&#8217;}/cpbackup/daily&#8221;);<br />
cleandir(&#8220;$CONF{&#8216;BACKUPDIR&#8217;}/cpbackup/weekly&#8221;);<br />
cleandir(&#8220;$CONF{&#8216;BACKUPDIR&#8217;}/cpbackup/monthly&#8221;);</p>
<p>if ($CONF{&#8216;BACKUPMOUNT&#8217;} eq &#8220;yes&#8221;) { system(&#8220;umount&#8221;,&#8221;$CONF{&#8216;BACKUPDIR&#8217;}&#8221;); }</p>
<p>sub cleandir {<br />
my($target) = @_;</p>
<p>opendir(DIRTYDIR,&#8221;$target&#8221;);<br />
@DIRTYDIR = readdir(DIRTYDIR);<br />
closedir(DIRTYDIR);</p>
<p>foreach(@DIRTYDIR) {<br />
next if /^\.\.?$|^files$|^dirs$/;<br />
if(-f &#8220;$target/$_&#8221;){<br />
$user = $_;<br />
$user =~ s/.tar.gz//;<br />
if(! -f &#8220;/var/cpanel/users/$user&#8221;){<br />
if($delete_old == 1){<br />
unlink(&#8220;$target/$_&#8221;);<br />
print &#8220;Deleted Old Backup&#8230; $target/$_\n&#8221;;<br />
} else {<br />
print &#8220;Detected Old Backup&#8230; $target/$_\n&#8221;;<br />
}<br />
}<br />
next;<br />
}<br />
if(-d &#8220;$target/$_&#8221;){<br />
if(! -f &#8220;/var/cpanel/users/$_&#8221;){<br />
if($delete_old == 1){<br />
system(&#8220;rm&#8221;,&#8221;-r&#8221;,&#8221;$target/$_&#8221;);<br />
#print &#8220;Directory Delete Not Supported, If you really want to remove dirs (incremental backups) you can edit this script and uncomment the line that looks like #system(\&#8221;rm\&#8221;,\&#8221;-r\&#8221;,\&#8221;$target/$_\&#8221;)\n&#8221;;<br />
} else {<br />
print &#8220;Detected Old Backup&#8230; $target/$_\n&#8221;;<br />
}<br />
}<br />
next;<br />
}<br />
}<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2011/12/backup-cleaner-script-for-cpanel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Manually changing an IP in Linux</title>
		<link>http://www.ezlinuxadmin.com/2011/12/manually-changing-an-ip-in-linux/</link>
		<comments>http://www.ezlinuxadmin.com/2011/12/manually-changing-an-ip-in-linux/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 00:01:52 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Cpanel and WHM]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux Drivers]]></category>
		<category><![CDATA[Linux Operating Systems]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[Ports]]></category>
		<category><![CDATA[ifcfg-eth0]]></category>
		<category><![CDATA[linux change ip]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=549</guid>
		<description><![CDATA[It&#8217;s pretty easy actually. Just go to this directory: /etc/sysconfig/network-scripts Then you will see a file for eachnetwork port, for example my server is: ifcfg-eth0 and ifcfg-eth1 I already have the ifcfg-eth0 set up from the install but I want to use the second one for back ups so I just opened the file and [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s pretty easy actually.</p>
<p>Just go to this directory:</p>
<p>/etc/sysconfig/network-scripts</p>
<p>Then you will see a file for eachnetwork port, for example my server is:</p>
<p>ifcfg-eth0</p>
<p>and</p>
<p>ifcfg-eth1</p>
<p>I already have the ifcfg-eth0 set up from the install but I want to use the second one for back ups so I just opened the file and added the IP to it. Then I made sure the rest of the setting smatched the first one other then the:</p>
<p>HWADDR=</p>
<p>That line is specific to the network port.</p>
<p>So that is how you configure a eth0 or eth1 port.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2011/12/manually-changing-an-ip-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The skinny on raid differances</title>
		<link>http://www.ezlinuxadmin.com/2011/11/the-skinny-on-raid-differances/</link>
		<comments>http://www.ezlinuxadmin.com/2011/11/the-skinny-on-raid-differances/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 07:28:50 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux Back Up]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[raid differances]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=545</guid>
		<description><![CDATA[We refer raid 5 but if you have remote back ups on the server then  raid 0 will get you the best performance between several hard drives. Keep in mind raid still can fail even with the same data going to several hard drives and this will slow your system down. Hardware raid is much [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ezlinuxadmin.com/wp-content/uploads/2011/11/raid-50.gif"><img class="alignnone size-full wp-image-546" title="raid-50" src="http://www.ezlinuxadmin.com/wp-content/uploads/2011/11/raid-50.gif" alt="" width="461" height="406" /></a></p>
<p>We refer raid 5 but if you have remote back ups on the server then  raid 0 will get you the best performance between several hard drives. Keep in mind raid still can fail even with the same data going to several hard drives and this will slow your system down.</p>
<p>Hardware raid is much faster as it doesn&#8217;t steal ram and cpu to be used.</p>
<p>Software should be avoided like the plague it will cause load issues 90% of the time.</p>
<p>A number of standard schemes have evolved which are referred to as levels. There were five RAID levels originally conceived, but many more variations have evolved, notably several nested levels and many non-standard levels (mostly proprietary). RAID levels and their associated data formats are standardised by SNIA in the Common RAID Disk Drive Format (DDF) standard.</p>
<p>Following is a brief textual summary of the most commonly used RAID levels.</p>
<p>RAID 0 (block-level striping without parity or mirroring) has no (or zero) redundancy. It provides improved performance and additional storage but no fault tolerance. Hence simple stripe sets are normally referred to as RAID 0. Any drive failure destroys the array, and the likelihood of failure increases with more drives in the array (at a minimum, catastrophic data loss is almost twice as likely compared to single drives without RAID). A single drive failure destroys the entire array because when data is written to a RAID 0 volume, the data is broken into fragments called blocks. The number of blocks is dictated by the stripe size, which is a configuration parameter of the array. The blocks are written to their respective drives simultaneously on the same sector. This allows smaller sections of the entire chunk of data to be read off the drive in parallel, increasing bandwidth. RAID 0 does not implement error checking, so any error is uncorrectable. More drives in the array means higher bandwidth, but greater risk of data loss.</p>
<p>In RAID 1 (mirroring without parity or striping), data is written identically to multiple drives, thereby producing a &#8220;mirrored set&#8221;; at least 2 drives are required to constitute such an array. While more constituent drives may be employed, many implementations deal with a maximum of only 2; of course, it might be possible to use such a limited level 1 RAID itself as a constituent of a level 1 RAID, effectively masking the limitation.[citation needed] The array continues to operate as long as at least one drive is functioning. With appropriate operating system support, there can be increased read performance, and only a minimal write performance reduction; implementing RAID 1 with a separate controller for each drive in order to perform simultaneous reads (and writes) is sometimes called multiplexing (or duplexing when there are only 2 drives).</p>
<p>In RAID 2 (bit-level striping with dedicated Hamming-code parity), all disk spindle rotation is synchronized, and data is striped such that each sequential bit is on a different drive. Hamming-code parity is calculated across corresponding bits and stored on at least one parity drive.</p>
<p>In RAID 3 (byte-level striping with dedicated parity), all disk spindle rotation is synchronized, and data is striped so each sequential byte is on a different drive. Parity is calculated across corresponding bytes and stored on a dedicated parity drive.</p>
<p>RAID 4 (block-level striping with dedicated parity) is identical to RAID 5 (see below), but confines all parity data to a single drive. In this setup, files may be distributed between multiple drives. Each drive operates independently, allowing I/O requests to be performed in parallel. However, the use of a dedicated parity drive could create a performance bottleneck; because the parity data must be written to a single, dedicated parity drive for each block of non-parity data, the overall write performance may depend a great deal on the performance of this parity drive.</p>
<p>RAID 5 (block-level striping with distributed parity) distributes parity along with the data and requires all drives but one to be present to operate; the array is not destroyed by a single drive failure. Upon drive failure, any subsequent reads can be calculated from the distributed parity such that the drive failure is masked from the end user. However, a single drive failure results in reduced performance of the entire array until the failed drive has been replaced and the associated data rebuilt. Additionally, there is the potentially disastrous RAID 5 write hole.</p>
<p>RAID 6 (block-level striping with double distributed parity) provides fault tolerance of two drive failures; the array continues to operate with up to two failed drives. This makes larger RAID groups more practical, especially for high-availability systems. This becomes increasingly important as large-capacity drives lengthen the time needed to recover from the failure of a single drive. Single-parity RAID levels are as vulnerable to data loss as a RAID 0 array until the failed drive is replaced and its data rebuilt; the larger the drive, the longer the rebuild takes. Double parity gives additional time to rebuild the array without the data being at risk if a single additional drive fails before the rebuild is complete.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2011/11/the-skinny-on-raid-differances/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tracking down the biggest folders</title>
		<link>http://www.ezlinuxadmin.com/2011/08/tracking-down-the-biggest-folders/</link>
		<comments>http://www.ezlinuxadmin.com/2011/08/tracking-down-the-biggest-folders/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 19:17:00 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Cheat Sheets]]></category>
		<category><![CDATA[Cpanel and WHM]]></category>
		<category><![CDATA[Linux Commands]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[finding a folder]]></category>
		<category><![CDATA[folder size]]></category>
		<category><![CDATA[folder size search]]></category>
		<category><![CDATA[list folder size]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=540</guid>
		<description><![CDATA[du -ax --max-depth 1 /var/cpanel &#124; sort -n &#124; tail This is a great command to simply find what folders are the biggest in a directory. You can replace the /var/cpanel with any folder and it will list everything in there and how big they are in order. Once you find the big folder then [...]]]></description>
			<content:encoded><![CDATA[<pre>du -ax --max-depth 1 /var/cpanel | sort -n | tail</pre>
<p>This is a great command to simply find what folders are the biggest in a directory. You can replace the /var/cpanel with any folder and it will list everything in there and how big they are in order.</p>
<p>Once you find the big folder then search inside of that to find the biggest folder in there and so on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2011/08/tracking-down-the-biggest-folders/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cleaning up /var</title>
		<link>http://www.ezlinuxadmin.com/2011/08/cleaning-up-var/</link>
		<comments>http://www.ezlinuxadmin.com/2011/08/cleaning-up-var/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 18:53:38 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Cheat Sheets]]></category>
		<category><![CDATA[Cpanel and WHM]]></category>
		<category><![CDATA[Linux Operating Systems]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[cleaning var partition]]></category>
		<category><![CDATA[moving data]]></category>
		<category><![CDATA[symlink]]></category>
		<category><![CDATA[var full]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=537</guid>
		<description><![CDATA[Cpanel and linux leaves a lot of log files in /var After several years these can add up, especially in the cpanel/bandwidth folder. So a couple quick folder moves and symlinks can clean things up. This is assuming you have a /backup partition and some room in it. Moving the log folder mv /var/log /backup/ [...]]]></description>
			<content:encoded><![CDATA[<p>Cpanel and linux leaves a lot of log files in /var<br />
After several years these can add up, especially in the cpanel/bandwidth folder. So a couple quick folder moves and symlinks can clean things up. This is assuming you have a /backup partition and some room in it.</p>
<p><strong>Moving the log folder</strong></p>
<p>mv /var/log /backup/<br />
ln -s /backup/log /var/log</p>
<p><strong>Moving the cpanel bandwidth folder</strong></p>
<p>mv /var/cpanel/bandwidth /backup/<br />
ln -s /backup/bandwidth /var/cpanel/bandwidth</p>
<p>Also just removing some of the log files in the log folder can help you for a quick fix.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2011/08/cleaning-up-var/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>setroubleshootd and SELinux is not considered compatible with cPanel</title>
		<link>http://www.ezlinuxadmin.com/2011/05/setroubleshootd-and-selinux-is-not-considered-compatible-with-cpanel/</link>
		<comments>http://www.ezlinuxadmin.com/2011/05/setroubleshootd-and-selinux-is-not-considered-compatible-with-cpanel/#comments</comments>
		<pubDate>Mon, 30 May 2011 20:55:44 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Cpanel and WHM]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[/usr/bin/python -E /usr/sbin/]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[SELinux]]></category>
		<category><![CDATA[setroubleshootd]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=520</guid>
		<description><![CDATA[The &#8220;setroubleshootd&#8221; process is included as part of SELinux. SELinux is not considered compatible with cPanel, and we recommend disabling it per our installation documentation: Disable SELinux security features For a fully successful installation you should disable SELinux. When installing a Red Hat or CentOS distribution, you will be able to use the graphical interface [...]]]></description>
			<content:encoded><![CDATA[<p>The &#8220;setroubleshootd&#8221; process is included as part of SELinux. SELinux is not considered compatible with cPanel, and we recommend disabling it per our installation documentation:</p>
<p><strong>Disable SELinux security features</strong></p>
<p>For a fully successful installation you should disable SELinux. When installing a Red Hat or CentOS distribution, you will be able to use the graphical interface to disable SELinux when configuring the operating system.</p>
<p>This can also be accomplished by editing /etc/selinux/config from the command line, and setting the SELINUX parameter to disabled with a text editor such as nano or vi. The file should resemble the following text:</p>
<p># This file controls the state of SELinux on the system.<br />
# SELINUX= can take one of these three values:<br />
# enforcing &#8211; SELinux security policy is enforced.<br />
# permissive &#8211; SELinux prints warnings instead of enforcing.<br />
# disabled &#8211; No SELinux policy is loaded.<br />
SELINUX=disabled<br />
# SELINUXTYPE= can take one of these two values:<br />
# targeted &#8211; Only targeted network daemons are protected.<br />
# strict &#8211; Full SELinux protection.<br />
SELINUXTYPE=targeted</p>
<p>Once you save the changes to the file above you will need to reboot the server for the changes to take effect.</p>
<p>PICK Important: SELinux must remain disabled in order for WHM and cPanel to run on your web server. Ensure that the pound sign (#) does not precede SELINUX=disabled. If # precedes this configuration option, the line will be ignored.</p>
<p>ALERT! Warning: Do not transfer the SELinux configuration file between computers as it may destroy the file’s integrity.</p>
<p><strong>ALERT! You will need to reboot the server for the changes to take effect.</strong></p>
<p><strong> For a quick fix that is not permanent:</strong></p>
<div>
<p>There is a bug with the new option in Centos 5 called setroubleshoot.</p>
<p>The bug spins the program over and over causing high memory and sometimes CPU use. Unfortunately there is no permanent fix yet, but if you see something like this high in your daily process log:</p>
<blockquote><p>/usr/bin/python -E /usr/sbin/setroubleshootd</p></blockquote>
<p>To fix for now you simply have to restart the process:</p>
<blockquote><p>/etc/init.d/setroubleshoot restart</p></blockquote>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2011/05/setroubleshootd-and-selinux-is-not-considered-compatible-with-cpanel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Steps to Secure SSH Server</title>
		<link>http://www.ezlinuxadmin.com/2011/05/steps-to-secure-ssh-server/</link>
		<comments>http://www.ezlinuxadmin.com/2011/05/steps-to-secure-ssh-server/#comments</comments>
		<pubDate>Thu, 19 May 2011 09:42:40 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[Secure SSH]]></category>
		<category><![CDATA[ssh server]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=517</guid>
		<description><![CDATA[SSH attacks are normally happened if you are running SSH on comman Port 22 . If you have simple or weak root password then chances of your server get compromised . We can secure SSH server with two methods : Method 1: A best option to secure your SSH is to run SSH on the [...]]]></description>
			<content:encoded><![CDATA[<p>SSH attacks are normally happened if you are running SSH on comman Port 22 . If you have simple or weak root password then chances of your server get compromised .</p>
<p>We can secure SSH server with two methods :</p>
<p>Method 1:</p>
<p>A best option to secure your SSH is to run SSH on the different port instead of default port 22 .</p>
<p>Disable Root Logins<br />
Disable password authentication<br />
Disable Port 22 and use any other port to run SSH (like Port 59122). Aslo block port 22 using firewall.</p>
<p>You have to take following steps before you harden the SSH, first make sure you create a user name and password. If you are running cpanel, then you want to add the username to cpanel wheel group.</p>
<p>use commaands as follows</p>
<p>#adduser &lt;username&gt; -G wheel</p>
<p>#passwd &lt;username&gt;</p>
<p>Once the user has been created and added to Wheel group, edit the ssh configuration file /etc/ssh/sshd_conf</p>
<p>Change the default port 22 to any port number, say 2199 and set the protocol to just Protocol 2 which is a more secure protocol</p>
<p>#vi /etc/ssh/sshd_config</p>
<p>Port 59122<br />
Protocol 2<br />
#ListenAddress 0.0.0.0<br />
#ListenAddress ::</p>
<p>#LoginGraceTime 2m<br />
IgnoreRhosts yes<br />
X11Forwarding no</p>
<p>Disable root login</p>
<p>Locate the line # PermitRootLogin yes in the configuration file and change it to no</p>
<p>PermitRootLogin no</p>
<p>save configuration and restart your SSH . Now you won&#8217;t be able to login as root and will be able to login only at Port 59122</p>
<p>method 2: SSH Public/Private Key Authentication</p>
<p>SSH with public key authentication the best proven method to safeguard your SSH server. You have to put the private key in your putty (ssh client) and put the public key on your server</p>
<p>PrivateKey -&gt; It should be Stored in Client and used by Putty</p>
<p>PublicKey -&gt; It should be Stored in Remote Server ( in /home/&lt;username&gt;/.ssh/authorized_keys file)</p>
<p>The required tools as</p>
<p>Putty (SSH Login client)<br />
PuttyGen (Putty Key Generator Tool to save Private key)</p>
<p>1 Enable the public key authentication you have to enable it in the SSH config file /etc/ssh/sshd_config. Look for the following lines and uncomment them</p>
<p>[HTML]RSAAuthentication yes<br />
PubkeyAuthentication yes<br />
AuthorizedKeysFile .ssh/authorized_keys<br />
[/HTML]</p>
<p>2<br />
we generate both public and private keys in the server.</p>
<p>[HTML][tux@localhost ~]$ ssh-keygen -t dsa<br />
Generating public/private dsa key pair.<br />
Enter file in which to save the key (/home/&lt;username&gt;/.ssh/id_dsa):<br />
Enter passphrase (empty for no passphrase):<br />
Enter same passphrase again:<br />
Your identification has been saved in /home/&lt;username&gt;/.ssh/id_dsa.<br />
Your public key has been saved in /home/&lt;username&gt;/.ssh/id_dsa.pub.<br />
The key fingerprint is:<br />
a9:22:30:c5:ed:df:2c:e7:7b:34:53:b4:82:bb:33:17 tux@localhost[/HTML]</p>
<p>id_dsa -&gt; private key stored at /home/&lt;username&gt;/.ssh/</p>
<p>id_dsa.pub -&gt; is the public key /home/&lt;username&gt;/.ssh/</p>
<p>3. copy Private Key to Putty (SSH client)</p>
<p>Here we need copy the private key from server to our putty in the form of .ppk file (putty private key file). private key must be stored in the client side and the public key in the server side</p>
<p>inside /home/&lt;username&gt;/.ssh/authorized_keys file</p>
<p>Open the file id_dsa and copy the contents of the file. On client side paste it into a notepad file (say privkey.txt). Make sure that there is no new line at the top or else you will get &#8220;invalid private key&#8221; from puttygen.</p>
<p>Start puttygen.exe &gt; &gt; Load Existing Private Key &gt; &gt; privkey.txt &gt;&gt; Save Private Key</p>
<p>Save the private key as privkey.ppk</p>
<p>4 Copying Public Key to Server</p>
<p>Create new file called authorized_keys inside .ssh folder within the users home directory as /home/&lt;username&gt;/.ssh/authorized_keys and store the public key there.<br />
OR rename the existing id_dsa.pub to authorized_keys as we wont be needing the ida_dsa.pub file.</p>
<p>mv /home/&lt;user&gt;/.ssh/ida_dsa.pub authorized_keys</p>
<p>To connect ssh use putty</p>
<p>Start Putty &gt; Enter servers IP address &gt; New Port, then load the private key SSH &gt; Auth &gt; Browse Private Key for Authentication</p>
<p>Now connect and enter the user name the putty would authenticate yourself with public key authentication.</p>
<p>In this way you can secure your SSH .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2011/05/steps-to-secure-ssh-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open DNS fix for CPanel</title>
		<link>http://www.ezlinuxadmin.com/2011/01/open-dns-fix-for-cpanel/</link>
		<comments>http://www.ezlinuxadmin.com/2011/01/open-dns-fix-for-cpanel/#comments</comments>
		<pubDate>Sat, 15 Jan 2011 19:25:00 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Cpanel and WHM]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[open dns]]></category>
		<category><![CDATA[secure dns]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=507</guid>
		<description><![CDATA[Open DNS gives a error and means that anyone can use your DNS resolvers. To lock it down you can add this. 1. Login to your server as root. 2. Wget and run the script as : Code: http://shashank.net/scripts/named.patch sh named.patch 3. It will provide you with an output like : Code: allow-recursion { 127.0.0.1; [...]]]></description>
			<content:encoded><![CDATA[<p>Open DNS gives a error and means that anyone can use your DNS resolvers. To lock it down you can add this.</p>
<p>1. Login to your server as root.</p>
<p>2. Wget and run the script as :</p>
<p>Code:</p>
<p>http://shashank.net/scripts/named.patch</p>
<p>sh named.patch</p>
<p>3. It will provide you with an output like :</p>
<p>Code:</p>
<p>allow-recursion {<br />
127.0.0.1;<br />
xxx.xxx.xxx.xxx;<br />
xxx.xxx.xxx.xxx;<br />
};</p>
<p>4. Copy and paste this code in the Options section of your named.conf. Something like :</p>
<p>Code:</p>
<p>options {<br />
options {<br />
directory &#8220;/var/named&#8221;;<br />
allow-recursion {<br />
127.0.0.1;<br />
xxx.xxx.xxx;<br />
&#8230;. &#8230;.<br />
&#8230;. &#8230;.<br />
};<br />
};</p>
<p>5. Save named.conf and restart the named service. All all zones to load and check dns report now. The open nameservers warning no longer shows up. Hope it works fine for you. Any additions, corrections welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2011/01/open-dns-fix-for-cpanel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

