<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6265021962954177019</id><updated>2012-02-15T23:48:13.388-08:00</updated><category term='VB Script'/><category term='apache'/><category term='Mail'/><category term='UNIX'/><category term='GPU'/><category term='Network'/><category term='Mobile'/><category term='Fedora'/><category term='DNS'/><category term='MediaPlayer'/><category term='Mysql'/><category term='Perl'/><category term='Windows'/><category term='Security'/><category term='Tru64'/><category term='Online Books'/><category term='Dotnet'/><category term='Supercomputing'/><category term='Web'/><category term='NetBackup'/><category term='Tesla'/><category term='Chrome'/><category term='Linux'/><category term='Shell Scripts'/><category term='Orkut'/><category term='HP-UX'/><category term='Laptop'/><category term='Hacking'/><category term='CGI'/><category term='Storage'/><category term='Awk'/><category term='solaris'/><title type='text'>AdminBytes.com</title><subtitle type='html'>&lt;br&gt;&lt;br&gt;
My Xperience as SysAdmin</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.adminbytes.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default'/><link rel='alternate' type='text/html' href='http://www.adminbytes.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default?start-index=26&amp;max-results=25'/><author><name>Jubith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>121</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6265021962954177019.post-3065339683903253141</id><published>2011-07-08T00:20:00.001-07:00</published><updated>2011-07-08T00:21:32.832-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Perl'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Listing the zombie processes in linux</title><content type='html'>&lt;b&gt;# ps aux |perl -ne '{print if ((split(/\s+/))[7] =~ /Z/)}'&lt;/b&gt;&lt;br /&gt;abcuser   6005  0.0  0.0     0    0 pts/6    ZN   Jun07   0:00 [gcc] &lt;defunct&gt;&lt;br /&gt;abcuser   7565  0.0  0.0     0    0 pts/6    ZN   Jun07   0:00 [csh] &lt;defunct&gt;&lt;br /&gt;abcuser   7728  0.0  0.0     0    0 pts/222  ZN   Jun01   0:00 [gcc] &lt;defunct&gt;&lt;br /&gt;root      9902  0.0  0.0     0    0 ?        Z    Apr09   0:00 [sudo] &lt;defunct&gt;&lt;br /&gt;user1  13420  0.0  0.0     0    0 pts/202  Z+   Jul06   0:00 [grep] &lt;defunct&gt;&lt;br /&gt;15800    16275  0.0  0.0     0    0 pts/133  ZN+  12:45   0:00 [csh] &lt;defunct&gt;&lt;br /&gt;15800    16315  0.0  0.0     0    0 pts/43   ZN+  12:46   0:00 [csh] &lt;defunct&gt;&lt;br /&gt;abcuser  19479  0.0  0.0     0    0 pts/6    ZN   Jun07   0:00 [gcc] &lt;defunct&gt;&lt;br /&gt;abcuser  20173  0.0  0.0     0    0 pts/177  Z    May24   0:00 [mgdiff] &lt;defunct&gt;&lt;br /&gt;user6    20808  0.0  0.0     0    0 ?        Z    May22   0:00 [sh] &lt;defunct&gt;&lt;br /&gt;abcuser  21001  0.0  0.0     0    0 pts/6    ZN   Jun07   0:00 [gcc] &lt;defunct&gt;&lt;br /&gt;abcuser  21639  0.0  0.0     0    0 pts/222  ZN   Jun01   0:00 [csh] &lt;defunct&gt;&lt;br /&gt;&lt;output truncated&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6265021962954177019-3065339683903253141?l=www.adminbytes.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.adminbytes.com/feeds/3065339683903253141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6265021962954177019&amp;postID=3065339683903253141' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/3065339683903253141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/3065339683903253141'/><link rel='alternate' type='text/html' href='http://www.adminbytes.com/2011/07/listing-zombie-processes-in-linux.html' title='Listing the zombie processes in linux'/><author><name>Jubith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6265021962954177019.post-1919846113296327099</id><published>2011-06-03T12:19:00.000-07:00</published><updated>2011-06-03T12:20:07.748-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Perl'/><title type='text'>Adding shortcut in vim to compile perl script</title><content type='html'>Enter the below line in .vimrc file&lt;br /&gt;map &amp;lt;f5&amp;gt; :w&amp;lt;cr&amp;gt;:!perl %&amp;lt;cr&amp;gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6265021962954177019-1919846113296327099?l=www.adminbytes.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.adminbytes.com/feeds/1919846113296327099/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6265021962954177019&amp;postID=1919846113296327099' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/1919846113296327099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/1919846113296327099'/><link rel='alternate' type='text/html' href='http://www.adminbytes.com/2011/06/adding-shortcut-in-vim-to-compile-perl.html' title='Adding shortcut in vim to compile perl script'/><author><name>Jubith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6265021962954177019.post-4677899318658161593</id><published>2010-12-07T05:06:00.000-08:00</published><updated>2010-12-07T05:06:30.994-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Network'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>netstat quick reference</title><content type='html'>&lt;div style="font-family: Calibri; font-size: 11.0pt; margin: 0in;"&gt;&lt;b&gt;&lt;u&gt;Display all LISTENING tcp ports&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="font-family: Calibri; font-size: 11.0pt; margin: 0in;"&gt;&lt;b&gt;# Netstat -ntlp&lt;/b&gt;&lt;/div&gt;&lt;div style="font-family: Calibri; font-size: 11.0pt; margin: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Calibri; font-size: 11.0pt; margin: 0in;"&gt;&lt;b&gt;&lt;u&gt;To swtich the name resolution off use&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="font-family: Calibri; font-size: 11.0pt; margin: 0in;"&gt;&lt;b&gt;# netstat -tlp &lt;/b&gt;&lt;/div&gt;&lt;div style="font-family: Calibri; font-size: 11.0pt; margin: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Calibri; font-size: 11.0pt; margin: 0in;"&gt;&lt;b&gt;&lt;u&gt;Display all LISTENING udp ports&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="font-family: Calibri; font-size: 11.0pt; margin: 0in;"&gt;&lt;b&gt;# netstat -ulp&lt;/b&gt;&lt;/div&gt;&lt;div style="font-family: Calibri; font-size: 11.0pt; margin: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Calibri; font-size: 11.0pt; margin: 0in;"&gt;&lt;b&gt;&lt;u&gt;To see established tcp connections&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="font-family: Calibri; font-size: 11.0pt; margin: 0in;"&gt;&lt;b&gt;# netstat -tp&lt;/b&gt;&lt;/div&gt;&lt;div style="font-family: Calibri; font-size: 11.0pt; margin: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Calibri; font-size: 11.0pt; margin: 0in;"&gt;&lt;b&gt;&lt;u&gt;To find out who has connected through ssh&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="font-family: Calibri; font-size: 11.0pt; margin: 0in;"&gt;&lt;b&gt;# netstat -ntp|grep :22&lt;/b&gt;&lt;/div&gt;&lt;div style="font-family: Calibri; font-size: 11.0pt; margin: 0in;"&gt;or&lt;/div&gt;&lt;div style="font-family: Calibri; font-size: 11.0pt; margin: 0in;"&gt;&lt;b&gt;# netstat -tp|grep :ssh&lt;/b&gt;&lt;/div&gt;&lt;div style="font-family: Calibri; font-size: 11.0pt; margin: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Calibri; font-size: 11.0pt; margin: 0in;"&gt;&lt;span style="font-weight: bold; text-decoration: underline;"&gt;Displaying the routing table&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Calibri; margin: 0in;"&gt;#&amp;nbsp;&lt;span style="font-weight: bold;"&gt;netstat -r&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Calibri; margin: 0in;"&gt;&lt;span style="font-weight: bold;"&gt;or&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Calibri; margin: 0in;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;#&amp;nbsp;&lt;span style="font-weight: bold;"&gt;netstat -rn&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6265021962954177019-4677899318658161593?l=www.adminbytes.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.adminbytes.com/feeds/4677899318658161593/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6265021962954177019&amp;postID=4677899318658161593' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/4677899318658161593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/4677899318658161593'/><link rel='alternate' type='text/html' href='http://www.adminbytes.com/2010/12/netstat-quick-reference.html' title='netstat quick reference'/><author><name>Jubith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6265021962954177019.post-4331603295328690051</id><published>2010-12-07T04:52:00.000-08:00</published><updated>2010-12-07T04:52:06.394-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Adding IPv6 in linux (RHEL)</title><content type='html'>Open /etc/sysconfig/network file, enter:&lt;br /&gt;&lt;b&gt;# vi /etc/sysconfig/network&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Append following line:&lt;br /&gt;&lt;i&gt;NETWORKING_IPV6=yes&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Open /etc/sysconfig/network-scripts/ifcfg-eth0 (1st network config file)&lt;br /&gt;&lt;b&gt;# vi /etc/sysconfig/network-scripts/ifcfg-eth0&lt;/b&gt;&lt;br /&gt;Append following config directives for IPv6:&lt;br /&gt;&lt;i&gt;IPV6INIT=yes&lt;/i&gt;&lt;br /&gt;&lt;i&gt;IPV6ADDR=&lt;/i&gt;&lt;ipv6-ip-address&gt;&lt;i&gt;&lt;span style="background: #EEEEEE;"&gt;&amp;lt;IPv6-IP-Address&amp;gt;&lt;/span&gt;&lt;br /&gt;IPV6_DEFAULTGW=&lt;/i&gt;&lt;ipv6-ip-gateway-address&gt;&lt;span style="background: #EEEEEE;"&gt;&lt;i&gt;&amp;lt;IPv6-IP-Gateway-Address&amp;gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is a sample file with mix of IPv4 and IPv6 assigned to eth0:&lt;br /&gt;&lt;i&gt; DEVICE=eth0&lt;br /&gt;BOOTPROTO=static&lt;br /&gt;ONBOOT=yes&lt;br /&gt;HWADDR=00:30:48:33:bc:33&lt;br /&gt;IPADDR=202.54.1.5&lt;br /&gt;GATEWAY=202.54.1.3&lt;br /&gt;NETMASK=255.255.255.248&lt;br /&gt;IPV6INIT=yes&lt;br /&gt;IPV6ADDR=2607:f0d0:1002:0011:0000:0000:0000:0002&lt;br /&gt;IPV6_DEFAULTGW=2607:f0d0:1002:0011:0000:0000:0000:0001&lt;/i&gt; &lt;br /&gt;&lt;br /&gt;Where,&lt;br /&gt;• NETWORKING_IPV6=yes|no&amp;nbsp;- Enable or disable global IPv6 initialization.&lt;br /&gt;• IPV6INIT=yes&amp;nbsp;- Enable or disable IPv6 configuration for all interfaces.&lt;br /&gt;• IPV6ADDR=2607:f0d0:1002:0011:0000:0000:0000:0002&amp;nbsp;- Specify a primary static IPv6 address here.&lt;br /&gt;• IPV6_DEFAULTGW=2607:f0d0:1002:0011:0000:0000:0000:0001&amp;nbsp;- Add a default route through specified gateway.&lt;br /&gt;&lt;br /&gt;&lt;/ipv6-ip-gateway-address&gt;&lt;/ipv6-ip-address&gt;&lt;br /&gt;&lt;ipv6-ip-address&gt;&lt;ipv6-ip-gateway-address&gt;Save and close the file. Restart networking:&lt;br /&gt;&lt;b&gt; # service network restart&lt;/b&gt;&lt;br /&gt;&lt;/ipv6-ip-gateway-address&gt;&lt;/ipv6-ip-address&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6265021962954177019-4331603295328690051?l=www.adminbytes.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.adminbytes.com/feeds/4331603295328690051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6265021962954177019&amp;postID=4331603295328690051' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/4331603295328690051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/4331603295328690051'/><link rel='alternate' type='text/html' href='http://www.adminbytes.com/2010/12/adding-ipv6-in-linux-rhel.html' title='Adding IPv6 in linux (RHEL)'/><author><name>Jubith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6265021962954177019.post-9214859121748431773</id><published>2010-12-06T10:03:00.000-08:00</published><updated>2010-12-06T22:54:15.988-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>useful rpm commands and examples</title><content type='html'>&lt;b&gt;#rpm -qa&lt;/b&gt;&lt;br /&gt;Dumps all installed packages&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#rpm -qi httpd&lt;/b&gt;&lt;br /&gt;Dumps information about httpd package&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#rpm -qf /usr/bin/httpd &lt;/b&gt;&lt;br /&gt;Dumps package membership info for file httpd&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#rpm -qpi &amp;lt;url&amp;gt;&lt;/b&gt;&lt;br /&gt;Shows package info prior to installation&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#rpm -Va&lt;/b&gt;&lt;br /&gt;Verifies all packages on the system ,returning info only if there are any discrepencies from the original installation&lt;br /&gt;&lt;br /&gt;Verfy httpd package for any discrepencies&lt;br /&gt;&lt;b&gt;#rpm -Vf /usr/bin/httpd&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;SM5 .... T /usr/bin/httpd&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;u&gt;Abbreviations &amp;nbsp;(SM5)&lt;/u&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;S&amp;nbsp;&lt;/b&gt;(file size), &lt;b&gt;M &lt;/b&gt;(mode or permissions), &lt;b&gt;5&lt;/b&gt; (MD5), &lt;b&gt;T&lt;/b&gt; (mod time)&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-style: normal;"&gt;&lt;b&gt;#rpm -Vp &amp;lt;url&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-style: normal;"&gt;Verify the remote package in the internet&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Installation&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;rpm -ivh &amp;nbsp;&amp;lt;rpm filename&amp;gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Does not override previous package&lt;/li&gt;&lt;li&gt;use this method to install a new version of the kernel&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;b&gt;Upgrade (installs or overrides existing package)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;#rpm -Uvh &amp;nbsp;&amp;lt;package name&amp;gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Freshen (updates an existing package)&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Note: Will not install the package ,if it doesn't exist locally&lt;/div&gt;&lt;div&gt;&lt;b&gt;#rpm -Fvh *.rpm &amp;nbsp;&lt;/b&gt;&lt;i&gt;- Freshens the current version of a package&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Package Removal&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;#rpm -evh *.rpm &lt;/b&gt;- removes a package&lt;/div&gt;&lt;div&gt;Note : &amp;nbsp;Removal process considers dependendies &amp;nbsp;and will complain if the removal will break one or more packages.To get around this,use&amp;nbsp;&lt;/div&gt;&lt;div&gt;#&lt;b&gt;rpm -ev --nodeps *.rpm&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6265021962954177019-9214859121748431773?l=www.adminbytes.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.adminbytes.com/feeds/9214859121748431773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6265021962954177019&amp;postID=9214859121748431773' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/9214859121748431773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/9214859121748431773'/><link rel='alternate' type='text/html' href='http://www.adminbytes.com/2010/12/useful-rpm-commands-and-examples.html' title='useful rpm commands and examples'/><author><name>Jubith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6265021962954177019.post-2662342443308029670</id><published>2010-12-05T00:22:00.000-08:00</published><updated>2010-12-05T00:22:28.779-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Making a file read-only in linux</title><content type='html'>&lt;b&gt;#chattr +i file1&lt;/b&gt;&lt;br /&gt;This makes the file read only even for the root user&lt;br /&gt;&lt;br /&gt;To remove this read only protection&lt;br /&gt;&lt;b&gt;#chattr -i file1&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;To see the set of extended attributes to a file &lt;br /&gt;&lt;b&gt;#lsattr file1&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6265021962954177019-2662342443308029670?l=www.adminbytes.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.adminbytes.com/feeds/2662342443308029670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6265021962954177019&amp;postID=2662342443308029670' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/2662342443308029670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/2662342443308029670'/><link rel='alternate' type='text/html' href='http://www.adminbytes.com/2010/12/making-file-read-only-in-linux.html' title='Making a file read-only in linux'/><author><name>Jubith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6265021962954177019.post-2881632209219851103</id><published>2010-11-13T02:15:00.000-08:00</published><updated>2010-11-13T02:17:40.170-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Iptables quick reference and examples</title><content type='html'>Enabling the host to accept all incoming connections to port 80&lt;br /&gt;&lt;i&gt;&lt;b&gt;#iptables -A INPUT -p tcp -s 0/0 --dport 80 -j ACCEPT&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Deleting rule 11 from input chain&lt;br /&gt;&lt;b&gt;&lt;i&gt;#iptables -D INPUT 11&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Removing all the rules in iptables&lt;br /&gt;&lt;b&gt;&lt;i&gt;#iptables --flush&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Saving iptables configuration to a file&lt;br /&gt;&lt;b&gt;&lt;i&gt;#iptables-save &amp;gt; /var/iptables-`date +"%F"`&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Restoring iptable configurations from a backup file&lt;br /&gt;&lt;b&gt;&lt;i&gt;#iptables-restore /var/iptables-2010-11-06&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Inserting rule no 11 in RH-Firewall-1-INPUT chain&lt;br /&gt;&lt;b&gt;&lt;i&gt;#iptables -I RH-Firewall-1-INPUT 11  -p tcp -s 0/0 --dport 80 -j ACCEPT&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Disabling pinging from a particular host&lt;br /&gt;&lt;b&gt;&lt;i&gt;#iptables -I INPUT 1 -p icmp --icmp-type echo-request -s 192.168.1.235 -d 0/0 -j REJECT&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Dropping all ping requests&lt;br /&gt;&lt;b&gt;&lt;i&gt;#iptables -I INPUT 1 -p icmp --icmp-type echo-request -s 192.168.1.235 -d 0/0 -j DROP&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;finding out icmp types available&lt;br /&gt;&lt;b&gt;&lt;i&gt;#iptables -p icmp -h&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;blocking traffic to a particular port&lt;br /&gt;&lt;b&gt;&lt;i&gt;#iptables -A OUTPUT -p tcp -s 0/0 -d 0/0 --dport 3389 -j DROP&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Listing the FORWARD table&lt;br /&gt;&lt;b&gt;&lt;i&gt;#iptables -L FORWARD&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Creating a new Chain &lt;br /&gt;&lt;b&gt;&lt;i&gt;#iptables -N APACHE-WEB&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;Adding the newly created chain to INPUT chain&lt;br /&gt;&lt;b&gt;&lt;i&gt;#iptables -A INPUT -p tcp --dport http:https -j APACHE-WEB&lt;/i&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6265021962954177019-2881632209219851103?l=www.adminbytes.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.adminbytes.com/feeds/2881632209219851103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6265021962954177019&amp;postID=2881632209219851103' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/2881632209219851103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/2881632209219851103'/><link rel='alternate' type='text/html' href='http://www.adminbytes.com/2010/11/iptables-quick-reference-and-examples.html' title='Iptables quick reference and examples'/><author><name>Jubith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6265021962954177019.post-4528668586191864639</id><published>2010-11-13T02:12:00.000-08:00</published><updated>2010-12-06T08:07:06.391-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Perl'/><title type='text'>Useful Perl command line examples</title><content type='html'>Replacing the contents of all the files in a directory&lt;br /&gt;&lt;b&gt;#perl -pi -e 's/design/dezine/g' *&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Retrieving columns using perl&lt;br /&gt;&lt;b&gt;#cat /etc/passwd | perl -e 'while(&amp;lt;&amp;gt;){split /:/;print $_[0],"\n"}'&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Note: $_[0] refers to the first column&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Retrieving columns with specific matches&lt;br /&gt;&lt;b&gt;#cat /etc/passwd | perl -e 'while(&amp;lt;&amp;gt;){split /:/;print if ($_[0] =~ /mail/)}'&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Adding all the values of a particular column&lt;br /&gt;&lt;b&gt;#cat /etc/passwd |perl -e 'while(&amp;lt;&amp;gt;){split /:/;$sum += $_[2]} print $sum'&lt;/b&gt;&lt;br /&gt;Above, Adding all data in third column&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6265021962954177019-4528668586191864639?l=www.adminbytes.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.adminbytes.com/feeds/4528668586191864639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6265021962954177019&amp;postID=4528668586191864639' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/4528668586191864639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/4528668586191864639'/><link rel='alternate' type='text/html' href='http://www.adminbytes.com/2010/11/useful-perl-command-line-examples.html' title='Useful Perl command line examples'/><author><name>Jubith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6265021962954177019.post-7904744341166638665</id><published>2010-09-28T01:54:00.000-07:00</published><updated>2010-09-28T02:32:10.442-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mysql'/><title type='text'>Mysql DB Backups</title><content type='html'>&lt;div&gt;&lt;b&gt;&lt;u&gt;Backing up all the databases&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;mysqldump --user &lt;i&gt;mysql&lt;/i&gt; --password=&lt;i&gt;mysqlpassword&lt;/i&gt; &amp;nbsp;--all-databases &amp;gt; &lt;i&gt;/destinationdir/sql.dump_`date +%d-%T`&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Backing individual databases and tables&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;mysqldump --user &lt;i&gt;mysql&lt;/i&gt; --password=&lt;i&gt;mysqlpassword&lt;/i&gt; --databases &lt;i&gt;DB1 DB2&lt;/i&gt; --tables &lt;i&gt;tbl_testdb&lt;/i&gt; &amp;gt; &lt;i&gt;/destinationdir/sql.dump&lt;/i&gt;_`date +%d-%T`&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Restoring from mysql database&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;mysql -u root -p&lt;i&gt;mysqlpassword&lt;/i&gt; &amp;lt; &amp;nbsp;&lt;i&gt;dumpfile.sql&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6265021962954177019-7904744341166638665?l=www.adminbytes.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.adminbytes.com/feeds/7904744341166638665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6265021962954177019&amp;postID=7904744341166638665' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/7904744341166638665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/7904744341166638665'/><link rel='alternate' type='text/html' href='http://www.adminbytes.com/2010/09/mysql-db-backups.html' title='Mysql DB Backups'/><author><name>Jubith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6265021962954177019.post-8973256503796452647</id><published>2010-08-12T23:08:00.001-07:00</published><updated>2010-08-12T23:09:37.985-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Perl'/><title type='text'>Finding out the path of installed perl module</title><content type='html'>&lt;b&gt;#perldoc perllocal&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;This comamnd will list the all the installed perl modules in the following format&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; Wed Jun 30 00:37:22 2010: "Module" GD::Text&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; \uffff\uffff &amp;nbsp; "installed into: /usr/lib/perl5/site_perl/5.8.5"&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; \uffff\uffff &amp;nbsp; "LINKTYPE: dynamic"&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; \uffff\uffff &amp;nbsp; "VERSION: 0.86"&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; \uffff\uffff &amp;nbsp; "EXE_FILES: "&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6265021962954177019-8973256503796452647?l=www.adminbytes.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.adminbytes.com/feeds/8973256503796452647/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6265021962954177019&amp;postID=8973256503796452647' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/8973256503796452647'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/8973256503796452647'/><link rel='alternate' type='text/html' href='http://www.adminbytes.com/2010/08/finding-out-path-of-installed-perl_12.html' title='Finding out the path of installed perl module'/><author><name>Jubith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6265021962954177019.post-180669336928150702</id><published>2010-07-18T23:24:00.000-07:00</published><updated>2010-07-18T23:26:03.141-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>refused connect from xx ip   to procedure ypproc_match - (x-domain,byname;-1) error</title><content type='html'>&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;div&gt;The messages log file was getting filled with following error messages&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Jul 19 09:57:06 nsserver1 ypserv[6761]: refused connect from 10.25.10.214:33666 to procedure ypproc_match (adminbytes.COM,shadow.byname;-1)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Jul 19 09:54:10 nsserver1 ypserv[6761]: refused connect from 10.25.10.224:42658 to procedure ypproc_match (adminbyts.COM,shadow.byname;-1)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I was able to fix this by updating the /etc/ypserv.conf&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Changed the security column from port to none&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;i&gt;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: * &amp;nbsp; &amp;nbsp; &amp;nbsp; : shadow.byname &amp;nbsp; &lt;b&gt;&amp;nbsp;: none&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;i&gt;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: * &amp;nbsp; &amp;nbsp; &amp;nbsp; : passwd.adjunct.byname : &lt;b&gt;none&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;Earlier it was&amp;nbsp;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;i&gt;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: * &amp;nbsp; &amp;nbsp; &amp;nbsp; : shadow.byname &amp;nbsp; &amp;nbsp;: port&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;i&gt;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: * &amp;nbsp; &amp;nbsp; &amp;nbsp; : passwd.adjunct.byname : port&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6265021962954177019-180669336928150702?l=www.adminbytes.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.adminbytes.com/feeds/180669336928150702/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6265021962954177019&amp;postID=180669336928150702' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/180669336928150702'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/180669336928150702'/><link rel='alternate' type='text/html' href='http://www.adminbytes.com/2010/07/refused-connect-from-soem-ip-to.html' title='refused connect from xx ip   to procedure ypproc_match - (x-domain,byname;-1) error'/><author><name>Jubith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6265021962954177019.post-3876059157429788382</id><published>2010-07-15T01:31:00.000-07:00</published><updated>2010-07-15T01:31:12.715-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><title type='text'>Listing all apache modules using PHP</title><content type='html'>&lt;br /&gt;Here is way to list all apache modules using using PHP&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;&amp;lt;?PHP&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;print_r(apache_get_modules());&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;?&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I tried httpd -l ,but it shows only those modules which have been compiled with httpd binary.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #666666; font-family: Verdana; font-size: 12px; line-height: 17px;"&gt;&lt;strong style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;#apachectl -t -D DUMP_MODULES &amp;nbsp;-&amp;gt; was not much useful for me&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6265021962954177019-3876059157429788382?l=www.adminbytes.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.adminbytes.com/feeds/3876059157429788382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6265021962954177019&amp;postID=3876059157429788382' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/3876059157429788382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/3876059157429788382'/><link rel='alternate' type='text/html' href='http://www.adminbytes.com/2010/07/listing-all-apache-modules-using-php.html' title='Listing all apache modules using PHP'/><author><name>Jubith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6265021962954177019.post-627732220526764593</id><published>2010-07-07T05:25:00.000-07:00</published><updated>2010-07-07T09:33:45.132-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><title type='text'>Creating your own certificates for apache using Windows CA</title><content type='html'>&lt;table bgcolor="#b3b3b3"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td bgcolor="#e6e6e6" width="100%"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;This article details how to use your own certificate with apache rather than using self generated ones or the the one issued &amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;by CA like verisign,geotrust etc..&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;If you use improper Certificates or self signed certificates ,you get the following message in your browser (IE)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_wUOTQeUVGG0/TDRx0Lovm_I/AAAAAAAABG4/hyXHw8AFfCU/s1600/httpserror.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="256" src="http://2.bp.blogspot.com/_wUOTQeUVGG0/TDRx0Lovm_I/AAAAAAAABG4/hyXHw8AFfCU/s640/httpserror.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;If you dont know how to enable https please go through the below link.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;a href="http://wiki.centos.org/HowTos/Https"&gt;http://wiki.centos.org/HowTos/Https&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;This article describes how you can issue certificate using Windows certificate Authority server for your apache webserver &amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;running on linux.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;span class="Apple-style-span" style="background-color: #eeeeee;"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;At Linux/Unix &amp;nbsp;webserver &amp;nbsp; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;1) Generate a new private key&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;# &lt;i&gt;&lt;b&gt;openssl genrsa 1024 &amp;gt; server.key&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;2) Create a Certificate Request&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;#&lt;/span&gt;&lt;i&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt; openssl req -new -key ./server.key &amp;gt; request.csr&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;Provide the details.Provide the hostname correctly.These informations will be incorporated into your certificate&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;3) Copy the contents of request.csr&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;# &lt;i&gt;&lt;b&gt;cat request.csr&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;Select all the contents of the file request.csr&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;span class="Apple-style-span" style="color: #cc0000;"&gt;Note : &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;span class="Apple-style-span" style="color: #cc0000;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;span class="Apple-style-span" style="color: #cc0000;"&gt;Make sure you include ALL the text including —-BEGIN CERTIFICATE REQUEST—- and —-END CERTIFICATE REQUEST—-&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;span class="Apple-style-span" style="background-color: #eeeeee;"&gt;At Windows 2003 Certificate Authority &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;1) Navigate to http://yourCAservername/certsrv and login if prompted&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;2) Choose Request a Certificate&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;3) Click "advanced certificate request"&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;4) Choose Submit a certificate request by using a base-64-encoded CMC or PKCS #10 file, or submit a &amp;nbsp; &amp;nbsp; &amp;nbsp; renewal request&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;by using a base-64-encoded PKCS #7 file&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;5) In the Saved Request edit box - use control+v to paste the contents of the request.csr file&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;6) Underneath Certificate Template select Web Server and click the Submit button&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;span class="Apple-style-span" style="color: #e06666;"&gt; &lt;span class="Apple-style-span" style="color: #cc0000;"&gt;Note:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;span class="Apple-style-span" style="color: #cc0000;"&gt;If you have sufficient privileges on on the &amp;nbsp;CA, it will be automatically issued to you.Otherwise you &amp;nbsp;need&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;span class="Apple-style-span" style="color: #cc0000;"&gt;to contact the administrator of the CA server&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;7) Choose "Download Certifcate link"&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;8) In the dialog box , save the file as server.crt &amp;nbsp;(by default extension will be .cer file)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;9) copy the file server.crt to your linux webserver (using ftp , winscp or any other means )&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;span class="Apple-style-span" style="background-color: #eeeeee;"&gt;Back to Linux Webserver (hosting apache) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;4) copy the server.crt file to the location /etc/httpd/conf/ssl.crt/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;5) copy the server.key file to the location /etc/httpd/conf/ssl.key/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;5) Edit the ssl.conf file&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;# &lt;i&gt;&lt;b&gt;vi &amp;nbsp;/etc/httpd/conf.d/ssl.conf&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;under the virtual host section (the one using port 443 or which ever secure host you need certificate to be issued),&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;Edit the values for &lt;b&gt;SSLCertificateFile&lt;/b&gt; and &lt;b&gt;SSLCertificateKeyFile&lt;/b&gt; as mentioned below&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;span class="Apple-style-span" style="color: #741b47;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;span class="Apple-style-span" style="color: #741b47;"&gt;SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;span class="Apple-style-span" style="color: #741b47;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;span class="Apple-style-span" style="color: #741b47;"&gt;SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;6) Once this is done , restart the webserver&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;# &lt;b&gt;&lt;i&gt;/etc/init.d/httd restart&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;httpd daemon restarts successfully ,if it does not find any discrepencies on the certificates issued&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;Now open the link in the browser, You wont see the error "website security certificate error".&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_wUOTQeUVGG0/TDRxbRpSwNI/AAAAAAAABGw/j5xsJF0QMpo/s1600/secure.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="128" src="http://2.bp.blogspot.com/_wUOTQeUVGG0/TDRxbRpSwNI/AAAAAAAABGw/j5xsJF0QMpo/s640/secure.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;You will notice the website verified message when you click the "lock" symbol&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div style="text-align: left;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;Related links &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;/b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href="http://www.yatblog.com/2007/02/27/how-to-create-a-ssl-certificate/"&gt;http://www.yatblog.com/2007/02/27/how-to-create-a-ssl-certificate/&lt;/a&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div style="text-align: left;"&gt;&amp;nbsp;&lt;a href="http://www.rtfm-ed.co.uk/2005/01/13/creating-your-own-certificates-for-the-mui/"&gt;http://www.rtfm-ed.co.uk/2005/01/13/creating-your-own-certificates-for-the-mui/&lt;/a&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;div style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6265021962954177019-627732220526764593?l=www.adminbytes.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.adminbytes.com/feeds/627732220526764593/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6265021962954177019&amp;postID=627732220526764593' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/627732220526764593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/627732220526764593'/><link rel='alternate' type='text/html' href='http://www.adminbytes.com/2010/07/creating-your-own-certificates-for.html' title='Creating your own certificates for apache using Windows CA'/><author><name>Jubith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_wUOTQeUVGG0/TDRx0Lovm_I/AAAAAAAABG4/hyXHw8AFfCU/s72-c/httpserror.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6265021962954177019.post-4477088662473413199</id><published>2010-07-05T10:57:00.000-07:00</published><updated>2010-07-05T10:57:17.673-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Mysql'/><title type='text'>MySQL Root password recovery</title><content type='html'>&lt;table bgcolor="#b3b3b3"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td bgcolor="#e6e6e6" width="100%"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;a href="http://www.linuxquestions.org/linux/answers/Security/MySQL_root_password_recovey"&gt;http://www.linuxquestions.org/linux/answers/Security/MySQL_root_password_recovey&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6265021962954177019-4477088662473413199?l=www.adminbytes.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.adminbytes.com/feeds/4477088662473413199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6265021962954177019&amp;postID=4477088662473413199' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/4477088662473413199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/4477088662473413199'/><link rel='alternate' type='text/html' href='http://www.adminbytes.com/2010/07/mysql-root-password-recovery.html' title='MySQL Root password recovery'/><author><name>Jubith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6265021962954177019.post-6863819343034730922</id><published>2010-07-04T11:15:00.000-07:00</published><updated>2010-07-06T08:10:11.571-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><title type='text'>Creating Virtual hosts in Apache</title><content type='html'>Virtual hosts helps the webserver to host multiple websites on a single webserver.You can have website1.com and website2.com to point to the same webserver.&lt;br /&gt;&lt;br /&gt;Apache supports creating virtual hosts in two ways&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;1) Name based virtual host&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;2) IP Based virtual host&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Name Based Virtual Hosting&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;This method allows Virtual hosts to be created using a single IP address.All the websites on a webserver can share a single IP address.THis method is quite handy ,when IP addresses are limited and are a costly affair.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;First &amp;nbsp;you need to have DNS entries pointing to this host machine.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Just a alias/CNAME to the &amp;nbsp;host IP address in DNS will do.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;DNS Entries should be something like mentioned below.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;i&gt;webhost&amp;nbsp;&lt;/i&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;i&gt; &lt;/i&gt;&lt;/span&gt;&lt;i&gt;A &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;i&gt; &lt;/i&gt;&lt;/span&gt;&lt;i&gt;10.10.100.201 &amp;nbsp; &amp;nbsp; ; Physical webhost for virtual hosts&lt;/i&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;i&gt;website1&lt;/i&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;i&gt; &lt;/i&gt;&lt;/span&gt;&lt;i&gt;CNAME&lt;/i&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;i&gt; &lt;/i&gt;&lt;/span&gt;&lt;i&gt;webhost &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/i&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;i&gt;website2&lt;/i&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;i&gt; &lt;/i&gt;&lt;/span&gt;&lt;i&gt;CNAME&lt;/i&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;i&gt; &lt;/i&gt;&lt;/span&gt;&lt;i&gt;webhost&lt;/i&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;Then ,add the following entries in httpd.conf file&lt;br /&gt;#----------------------&lt;br /&gt;&lt;br /&gt;&lt;i&gt;NameVirtualHost *:80&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&amp;lt;VirtualHost *:80&amp;gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;ServerName website1&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;DocumentRoot "/var/webapps/website1/html"&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;ErrorLog logs/website1_error_log&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;lt;/VirtualHost&amp;gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;lt;VirtualHost *:80&amp;gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;ServerName website2&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;DocumentRoot "/var/webapps/website2/html"&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;ErrorLog logs/website2_error_log&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;lt;/VirtualHost&amp;gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;#-----------------------&lt;br /&gt;&lt;br /&gt;You can use most of the HTTP directives that are used in httpd.conf&lt;br /&gt;&lt;br /&gt;Once the httpd.conf file is updated restart httpd daemon&lt;br /&gt;&lt;i&gt;/etc/init.d/httpd restart&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: #134f5c;"&gt;&lt;i&gt;Disadvantage of Name based Virtual Hosting&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;1)They do not properly support secure websites (HTTPS&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;2) If the Domain Name System is malfunctioning, it is harder to use a name-based virtually-hosted website&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;3) They will not work with browsers that do not send the hostname as part of requests&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;4) Improperly configured file permissions with shared file systems might give other (compromised) users or processes system-wide access to these files.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;IP Based Virtual Hosting&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;IP based virtual hosting method requires that all the websites should have an IP address to identify them.&lt;br /&gt;IP based virtual hosting overcomes limitations of Name based Virtual hosting.&lt;br /&gt;&lt;br /&gt;To add IP based, you need to have DNS entries for each website to point to the corresponding IP address.&lt;br /&gt;You also need to have multiple IP addresses on the host machine either by using multiple NIC cards or creating virtual IP addresses.&lt;br /&gt;&lt;br /&gt;Refer the below link for creating virtual IPs&lt;br /&gt;&lt;a href="http://wiki.centos.org/TipsAndTricks/VirtualIPAddresses?highlight=(virtual)|(IP))"&gt;http://wiki.centos.org/TipsAndTricks/VirtualIPAddresses?highlight=(virtual)|(IP))&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Once virtual IP addresses are created , add the following entries in httpd.conf. I am taking&amp;nbsp;172.16.212.233 and&amp;nbsp;172.16.212.233 as virtual IPs&lt;br /&gt;--------------------------------&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&amp;lt;VirtualHost 172.16.212.233:80&amp;gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; ServerName website1&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; DocumentRoot "/var/webapps/website1/html"&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; ErrorLog logs/websote1_error_log&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;lt;/VirtualHost&amp;gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;lt;VirtualHost 172.16.212.234&amp;gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; ServerName website2&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; DocumentRoot "/var/webapps/website2/html"&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; ErrorLog logs/website2_error_log&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;lt;/VirtualHost&amp;gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------&lt;br /&gt;&lt;br /&gt;You would have noticed the entry&lt;i&gt; &amp;lt;VirtualHost 172.16.212.233:80&amp;gt;&lt;/i&gt;&lt;br /&gt;I have mentioned port 80 as there is SSL website running for the same IP address on &amp;nbsp;port 443.&lt;br /&gt;&lt;br /&gt;You need to restart httpd daemon for the changes to take effect.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6265021962954177019-6863819343034730922?l=www.adminbytes.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.adminbytes.com/feeds/6863819343034730922/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6265021962954177019&amp;postID=6863819343034730922' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/6863819343034730922'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/6863819343034730922'/><link rel='alternate' type='text/html' href='http://www.adminbytes.com/2010/07/creating-virtual-hosts-in-apache.html' title='Creating Virtual hosts in Apache'/><author><name>Jubith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6265021962954177019.post-8182782797028178550</id><published>2010-06-30T22:26:00.001-07:00</published><updated>2010-06-30T22:26:57.613-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='Perl'/><title type='text'>Obtain specific user, group, and process information using Perl functions</title><content type='html'>&lt;table border=1 cellspacing=1 cellpadding=5 width=100% bordercolor=gray&gt;  &lt;tr bgcolor="#96CDCD"&gt;   &lt;td width="20%" valign=top&gt;   &lt;p align=center&gt;&lt;b&gt;&lt;u&gt;&lt;font color="#000000" size="+1"&gt;Function&lt;/font&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td width="30%" valign=top&gt;   &lt;p align=center&gt;&lt;b&gt;&lt;u&gt;&lt;font color="#000000" size="+1"&gt;Explanation&lt;/font&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td width="50%" valign=top&gt;   &lt;p align=center&gt;&lt;b&gt;&lt;u&gt;&lt;font color="#000000" size="+1"&gt;Example&lt;/font&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td width="20%" valign=top&gt;&lt;span class="code"&gt;getpwnam($name)&lt;/span&gt;&lt;/td&gt;   &lt;td width="30%" valign=top&gt;   &lt;p&gt;This  function returns the password file entry for the user &lt;i&gt;$name&lt;/i&gt;.&lt;/p&gt;   &lt;p&gt;&lt;i&gt;Use this function to retrieve information about a  user, given the user's login name on the system.&lt;/i&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td width="50%" valign=top&gt;&lt;span class="code"&gt;Code:&lt;br&gt; #!/usr/bin/perl&lt;br&gt;   &lt;br&gt; # get user info&lt;br&gt; ($name, $pass, $uid, $gid, $quota, $comment, $gcos, $dir, $shell, $expire) = getpwnam('victor');&lt;br&gt; print &amp;quot;Name: $name \nUID: $uid \nShell: $shell\n&amp;quot;;&lt;br&gt;   &lt;br&gt; Output:&lt;br&gt; Name: victor&lt;br&gt; UID: 1000&lt;br&gt; Shell: /bin/bash&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td width="20%" valign=top&gt;&lt;span class="code"&gt;getpwuid($id)&lt;/span&gt;&lt;/td&gt;   &lt;td width="30%" valign=top&gt;   &lt;p&gt;This  function returns the password file entry for the user ID &lt;i&gt;$id&lt;/i&gt;.&lt;/p&gt;   &lt;p&gt;&lt;i&gt;Use this function to retrieve information about a  user, given the user ID.&lt;/i&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td width="50%" valign=top&gt;&lt;span class="code"&gt;Code:&lt;br&gt; #!/usr/bin/perl&lt;br&gt;   &lt;br&gt; # get user info&lt;br&gt; ($name, $pass, $uid, $gid, $quota, $comment, $gcos, $dir, $shell, $expire) = getpwuid(1000);&lt;br&gt; print &amp;quot;Name: $name \nUID: $uid \nShell: $shell\n&amp;quot;;&lt;br&gt;   &lt;br&gt; Output:&lt;br&gt; Name: victor&lt;br&gt; UID: 1000&lt;br&gt; Shell: /bin/bash&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td width="20%" valign=top&gt;&lt;span class="code"&gt;getpwent()&lt;/span&gt;&lt;/td&gt;   &lt;td width="30%" valign=top&gt;   &lt;p&gt;This  function returns the next available line from the system password file. &lt;/p&gt;   &lt;p&gt;&lt;i&gt;Use this function in a loop to process the system  password file line by line.&lt;/i&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td width="50%" valign=top&gt;&lt;span class="code"&gt;Code:&lt;br&gt; #!/usr/bin/perl&lt;br&gt;   &lt;br&gt; # get user info&lt;br&gt; while (($name, $pass, $uid, $gid, $quota, $comment, $gcos, $dir, $shell, $expire) = getpwent()) {&lt;br&gt;        print &amp;quot;$name \t $uid \t $dir\n&amp;quot;;&lt;br&gt; }&lt;br&gt;   &lt;br&gt; Output:&lt;br&gt; root     0       /root&lt;br&gt; bin      1       /bin&lt;br&gt; daemon   2       /sbin&lt;br&gt;adm      3       /var/log&lt;br&gt;lp       4       /var/spool/lpd&lt;br&gt; sync     5       /sbin&lt;br&gt; shutdown         6       /sbin&lt;br&gt; halt     7       /sbin&lt;br&gt; mail     8       /&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td width="20%" valign=top&gt;&lt;span class="code"&gt;getgrnam($name)&lt;/span&gt;&lt;/td&gt;   &lt;td width="30%" valign=top&gt;   &lt;p&gt;This  function returns the group file entry (including the member list) for the  group &lt;i&gt;$name&lt;/i&gt;.&lt;/p&gt;   &lt;p&gt;&lt;i&gt;Use this function to retrieve information about a  user, given the group name. &lt;/i&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td width="50%" valign=top&gt;&lt;span class="code"&gt;Code:&lt;br&gt; #!/usr/bin/perl&lt;br&gt;   &lt;br&gt; # get group info&lt;br&gt; ($name, $passwd, $gid, $members) = getgrnam('wheel');&lt;br&gt; print &amp;quot;$name \t $gid \t $members\n&amp;quot;;&lt;br&gt;   &lt;br&gt; Output:&lt;br&gt; wheel    10      root&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td width="20%" valign=top&gt;&lt;span class="code"&gt;getgrgid($id)&lt;/span&gt;&lt;/td&gt;   &lt;td width="30%" valign=top&gt;   &lt;p&gt;This  function returns the group file entry (including the member list) for the  group ID &lt;i&gt;$id&lt;/i&gt;.&lt;/p&gt;   &lt;p&gt;&lt;i&gt;Use this function to retrieve information about a  group, given the group ID. &lt;/i&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td width="50%" valign=top&gt;&lt;span class="code"&gt;Code:&lt;br&gt; #!/usr/bin/perl&lt;br&gt;   &lt;br&gt; # get group info&lt;br&gt; ($name, $passwd, $gid, $members) = getgrgid(1);&lt;br&gt; print &amp;quot;$name \t $gid \t $members\n&amp;quot;;&lt;br&gt;   &lt;br&gt; Output:&lt;br&gt; bin      1       root bin daemon&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td width="20%" valign=top&gt;&lt;span class="code"&gt;getgrent()&lt;/span&gt;&lt;/td&gt;   &lt;td width="30%" valign=top&gt;   &lt;p&gt;This  function returns the next available line from the system group file. &lt;/p&gt;   &lt;p&gt;&lt;i&gt;Use this function in a loop to process the system's  groups one after another.&lt;/i&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td width="50%" valign=top&gt;&lt;span class="code"&gt;Code:&lt;br&gt; #!/usr/bin/perl&lt;br&gt;   &lt;br&gt; # get group info&lt;br&gt; while (($name, $passwd, $gid, $members)  = getgrent()) {&lt;br&gt;        print &amp;quot;$name \t $gid \t $members\n&amp;quot;;&lt;br&gt; }&lt;br&gt;   &lt;br&gt; Output:&lt;br&gt; root     0       root&lt;br&gt; bin      1       root bin daemon&lt;br&gt; daemon   2       root bin daemon&lt;br&gt; sys      3       root bin adm&lt;br&gt;adm      4       root adm daemon&lt;br&gt;tty      5&lt;br&gt; disk     6       root adm&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td width="20%" valign=top&gt;&lt;span class="code"&gt;getlogin()&lt;/span&gt;&lt;/td&gt;   &lt;td width="30%" valign=top&gt;   &lt;p&gt;This  function returns the name of the currently logged-in user.&lt;/p&gt;   &lt;p&gt;&lt;i&gt;Use this function to identify which user is  currently logged in and/or which user the script is currently running as.&lt;/i&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td width="50%" valign=top&gt;&lt;span class="code"&gt;Code:&lt;br&gt; #!/usr/bin/perl&lt;br&gt;   &lt;br&gt; # get logged-in user name&lt;br&gt; print &amp;quot;Current user is &amp;quot; . getlogin();&lt;br&gt;   &lt;br&gt; Output:&lt;br&gt; Current user is joe&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td width="20%" valign=top&gt;&lt;span class="code"&gt;getpgrp($id)&lt;/span&gt;&lt;/td&gt;   &lt;td width="30%" valign=top&gt;   &lt;p&gt;This  function returns the process group for the PID &lt;i&gt;$id&lt;/i&gt;. When the PID is 0, it returns the  process group for the current process.&lt;/p&gt;   &lt;p&gt;&lt;i&gt;Use this function to obtain the current process ID.&lt;/i&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td width="50%" valign=top&gt;&lt;span class="code"&gt;Code:&lt;br&gt; #!/usr/bin/perl&lt;br&gt;   &lt;br&gt; # get current process ID&lt;br&gt; print &amp;quot;Current PID is &amp;quot; . getpgrp(0);&lt;br&gt;   &lt;br&gt; Output:&lt;br&gt; Current PID is 403&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td width="20%" valign=top&gt;&lt;span class="code"&gt;getppid()&lt;/span&gt;&lt;/td&gt;   &lt;td width="30%" valign=top&gt;   &lt;p&gt;This  function returns the ID for the parent of the currently-executing process.&lt;/p&gt;   &lt;p&gt;&lt;i&gt;Use this function to obtain the current process's  parent ID (for interactive scripts, this is usually the PID of the  controlling terminal).&lt;/i&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td width="50%" valign=top&gt;&lt;span class="code"&gt;Code:&lt;br&gt; #!/usr/bin/perl&lt;br&gt;   &lt;br&gt; # get parent process ID&lt;br&gt; print &amp;quot;Current process' parent PID is &amp;quot; . getppid();&lt;br&gt;   &lt;br&gt; Output:&lt;br&gt; Current process' parent PID is 111&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt; &lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6265021962954177019-8182782797028178550?l=www.adminbytes.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.adminbytes.com/feeds/8182782797028178550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6265021962954177019&amp;postID=8182782797028178550' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/8182782797028178550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/8182782797028178550'/><link rel='alternate' type='text/html' href='http://www.adminbytes.com/2010/06/obtain-specific-user-group-and-process.html' title='Obtain specific user, group, and process information using Perl functions'/><author><name>Jubith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6265021962954177019.post-6579662238893553762</id><published>2010-06-17T22:57:00.000-07:00</published><updated>2010-06-17T22:57:47.232-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><title type='text'>Configuring new directory for CGI scripts in apache</title><content type='html'>&lt;table width=100% bgcolor="#b3b3b3"&gt;&lt;tr&gt;&lt;td bgcolor="#e6e6e6" width=100%&gt;&lt;br /&gt;&lt;br /&gt;Add the following entries in httpd.conf&lt;br /&gt;&lt;br /&gt;ScriptAlias /scripts/ "/var/scripts/"&lt;br /&gt;&lt;br /&gt;&lt;directory "/var/scripts/"&gt;&lt;br /&gt;Options +ExecCGI&lt;br /&gt;AddHandler cgi-script cgi pl&lt;br /&gt;AllowOverride all&lt;br /&gt;Options None&lt;br /&gt;Order allow,deny&lt;br /&gt;Allow from all&lt;br /&gt;&lt;/Directory&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6265021962954177019-6579662238893553762?l=www.adminbytes.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.adminbytes.com/feeds/6579662238893553762/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6265021962954177019&amp;postID=6579662238893553762' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/6579662238893553762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/6579662238893553762'/><link rel='alternate' type='text/html' href='http://www.adminbytes.com/2010/06/add-following-entries-in-httpd.html' title='Configuring new directory for CGI scripts in apache'/><author><name>Jubith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6265021962954177019.post-8081093032205567993</id><published>2010-06-02T00:24:00.000-07:00</published><updated>2010-06-02T00:24:08.568-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Network'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Setting up SSL port forwarding in LINUX</title><content type='html'>&lt;table width=100% bgcolor="#b3b3b3"&gt;&lt;tr&gt;&lt;td bgcolor="#e6e6e6" width=100%&gt; &lt;br /&gt;&lt;br /&gt;# iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to 8443&lt;br /&gt;# service iptables save&lt;br /&gt;  Saving firewall rules to /etc/sysconfig/iptables:          [  OK  ]&lt;br /&gt;&lt;br /&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6265021962954177019-8081093032205567993?l=www.adminbytes.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.adminbytes.com/feeds/8081093032205567993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6265021962954177019&amp;postID=8081093032205567993' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/8081093032205567993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/8081093032205567993'/><link rel='alternate' type='text/html' href='http://www.adminbytes.com/2010/06/setting-up-ssl-port-forwarding-in-linux.html' title='Setting up SSL port forwarding in LINUX'/><author><name>Jubith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6265021962954177019.post-8062100668093171579</id><published>2010-04-26T00:40:00.001-07:00</published><updated>2010-04-26T00:43:22.780-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Shell Scripts'/><title type='text'>Using SQL in Shell script</title><content type='html'>&lt;table width=100% bgcolor="#b3b3b3"&gt;&lt;tr&gt;&lt;td bgcolor="#e6e6e6" width=100%&gt;&lt;br /&gt;&lt;br /&gt;mysql -h &lt;i&gt;host_name&lt;/i&gt; -u username  --password=&lt;i&gt;password&lt;/i&gt; &amp;lt;&amp;lt;EOF &lt;br /&gt;&lt;br /&gt;use &lt;i&gt;database_name&lt;/i&gt; ;&lt;br /&gt;insert into test(name,place) values('admin','india');&lt;br /&gt;select * from test;&lt;br /&gt;EOF&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6265021962954177019-8062100668093171579?l=www.adminbytes.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.adminbytes.com/feeds/8062100668093171579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6265021962954177019&amp;postID=8062100668093171579' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/8062100668093171579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/8062100668093171579'/><link rel='alternate' type='text/html' href='http://www.adminbytes.com/2010/04/using-sql-in-shell-script.html' title='Using SQL in Shell script'/><author><name>Jubith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6265021962954177019.post-1854608945378553502</id><published>2010-04-21T05:07:00.001-07:00</published><updated>2010-04-21T05:07:04.595-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Perl'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Inplace edit for multiple files</title><content type='html'>&lt;table width=100% bgcolor="#b3b3b3"&gt;&lt;tr&gt;&lt;td bgcolor="#e6e6e6" width=100%&gt;&lt;br /&gt;Inplace edit for multiple files&lt;br /&gt;perl -pi -e 's/http/https/g' *&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6265021962954177019-1854608945378553502?l=www.adminbytes.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.adminbytes.com/feeds/1854608945378553502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6265021962954177019&amp;postID=1854608945378553502' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/1854608945378553502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/1854608945378553502'/><link rel='alternate' type='text/html' href='http://www.adminbytes.com/2010/04/inplace-edit-for-multiple-files.html' title='Inplace edit for multiple files'/><author><name>Jubith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6265021962954177019.post-8925919399315983649</id><published>2010-04-19T23:13:00.000-07:00</published><updated>2010-04-19T23:15:16.418-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Perl'/><category scheme='http://www.blogger.com/atom/ns#' term='CGI'/><title type='text'>Using Sessions Variables in CGI page</title><content type='html'>&lt;table width=100% bgcolor="#b3b3b3"&gt;&lt;tr&gt;&lt;td bgcolor="#e6e6e6" width=100%&gt;&lt;br /&gt;First include the following module&lt;br /&gt;&lt;br /&gt;#-----------------------Webpage 1 ----------------&lt;br /&gt;use CGI::Session&lt;br /&gt;#Creating a session and initialising a session&lt;br /&gt;my $session   = new CGI::Session();&lt;br /&gt;my $CGISESSID = $session-&gt;id();&lt;br /&gt;$session-&gt;param( "ses_username", $LDAPUser );&lt;br /&gt;$session-&gt;flush();&lt;br /&gt;#-------------------------------------------------&lt;br /&gt;&lt;br /&gt;Now lets see how to read this session variales from page 2&lt;br /&gt;First You need to pass the session id through query string or hidden values&lt;br /&gt;&lt;br /&gt;#-----------------------Webpage 1 ----------------&lt;br /&gt;Use CGI::Session;&lt;br /&gt;my $sesid   = $query-&gt;param("ses_id");&lt;br /&gt;my $session = CGI::Session-&gt;load($sesid);&lt;br /&gt;my $user    = $session-&gt;param("ses_username");&lt;br /&gt;#-------------------------------------------------&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6265021962954177019-8925919399315983649?l=www.adminbytes.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.adminbytes.com/feeds/8925919399315983649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6265021962954177019&amp;postID=8925919399315983649' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/8925919399315983649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/8925919399315983649'/><link rel='alternate' type='text/html' href='http://www.adminbytes.com/2010/04/using-sessions-variables-in-cgi-page.html' title='Using Sessions Variables in CGI page'/><author><name>Jubith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6265021962954177019.post-5897190645127917530</id><published>2010-04-10T04:33:00.000-07:00</published><updated>2010-04-10T04:37:25.138-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Perl'/><title type='text'>Perl script for displaying files more than N days old</title><content type='html'>&lt;table width=100% bgcolor="#b3b3b3"&gt;&lt;tr&gt;&lt;td bgcolor="#e6e6e6" width=100%&gt;&lt;br /&gt;&lt;pre&gt;my $DIR='/home/files/';&lt;br /&gt;my $mtimesec;&lt;br /&gt;my $MAXDAYS=2;&lt;br /&gt;my $maxdays=60*60*24*$MAXDAYS;&lt;br /&gt;opendir(DIR,$DIR)|| die "$!";&lt;br /&gt;while ( my $filename = readdir(DIR)) {&lt;br /&gt; if(-f $DIR.'/'.$filename) {&lt;br /&gt;  $mtimesec=(stat($filename))[9];&lt;br /&gt;  if((time-$mtimesec) &gt; $maxdays) {&lt;br /&gt;      print "$filename\n";&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6265021962954177019-5897190645127917530?l=www.adminbytes.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.adminbytes.com/feeds/5897190645127917530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6265021962954177019&amp;postID=5897190645127917530' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/5897190645127917530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/5897190645127917530'/><link rel='alternate' type='text/html' href='http://www.adminbytes.com/2010/04/displaying-files-more-n-days-old-perl.html' title='Perl script for displaying files more than N days old'/><author><name>Jubith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6265021962954177019.post-959613409837368132</id><published>2010-04-10T02:41:00.000-07:00</published><updated>2010-04-10T02:41:46.111-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Managing Hard disk settings in Linux</title><content type='html'>&lt;table width=100% bgcolor="#b3b3b3"&gt;&lt;tr&gt;&lt;td bgcolor="#e6e6e6" width=100%&gt;&lt;br /&gt;Displaying Harddisk parameters&lt;br /&gt;#hdparm -I /dev/sda&lt;br /&gt;&lt;br /&gt;Setting Harddisk parameters&lt;br /&gt;#hdparm -W 1 /dev/sda&lt;br /&gt;&lt;br /&gt;Retaining the settings across soft reboot&lt;br /&gt;#hdparm -K 1 /dev/sda&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6265021962954177019-959613409837368132?l=www.adminbytes.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.adminbytes.com/feeds/959613409837368132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6265021962954177019&amp;postID=959613409837368132' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/959613409837368132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/959613409837368132'/><link rel='alternate' type='text/html' href='http://www.adminbytes.com/2010/04/displaying-hard-disk-settings-in-linux.html' title='Managing Hard disk settings in Linux'/><author><name>Jubith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6265021962954177019.post-420783826496406049</id><published>2010-03-23T23:14:00.000-07:00</published><updated>2010-03-23T23:14:58.634-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Checking Disk utilisation in Linux</title><content type='html'>&lt;table width=100% bgcolor="#b3b3b3"&gt;&lt;tr&gt;&lt;td bgcolor="#e6e6e6" width=100%&gt;&lt;br /&gt;&lt;b&gt;# iostat -d -x 1&lt;/b&gt;&lt;br /&gt;Linux 2.6.29.4 (l-sim-02-120)   03/23/2010&lt;br /&gt;&lt;br /&gt;Device:    rrqm/s wrqm/s   r/s   w/s  rsec/s  wsec/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %util&lt;br /&gt;hda          0.13  17.93  0.19  3.78   14.61  173.74     7.31    86.87    47.44     0.37   92.98   3.45   1.37&lt;br /&gt;hda1         0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00    14.37     0.00    8.93   8.40   0.00&lt;br /&gt;hda2         0.12   0.33  0.04  0.00    1.30    2.68     0.65     1.34    89.87     0.01  158.33   8.17   0.04&lt;br /&gt;hda3         0.00  17.60  0.15  3.77   13.31  171.06     6.65    85.53    46.97     0.36   92.24   3.46   1.36&lt;br /&gt;&lt;br /&gt;Device:    rrqm/s wrqm/s   r/s   w/s  rsec/s  wsec/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %util&lt;br /&gt;hda          0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00&lt;br /&gt;hda1         0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00&lt;br /&gt;hda2         0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00&lt;br /&gt;hda3         0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6265021962954177019-420783826496406049?l=www.adminbytes.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.adminbytes.com/feeds/420783826496406049/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6265021962954177019&amp;postID=420783826496406049' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/420783826496406049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/420783826496406049'/><link rel='alternate' type='text/html' href='http://www.adminbytes.com/2010/03/checking-disk-utilisation-in-linux.html' title='Checking Disk utilisation in Linux'/><author><name>Jubith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6265021962954177019.post-841156569315735299</id><published>2010-03-23T23:12:00.001-07:00</published><updated>2010-03-23T23:12:33.694-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Running a command from history in LINUX</title><content type='html'>&lt;table width=100% bgcolor="#b3b3b3"&gt;&lt;tr&gt;&lt;td bgcolor="#e6e6e6" width=100%&gt;&lt;br /&gt;host1#history&lt;br /&gt;     1  22:03   cd /home/tools&lt;br /&gt;     2  22:03   cd /home/cpu&lt;br /&gt;     3  22:06   env|grep -i path|grep -v something&lt;br /&gt;     &lt;br /&gt;&lt;br /&gt;To run 3rd command again from history ,use&lt;br /&gt;&lt;br /&gt;host1# !3&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6265021962954177019-841156569315735299?l=www.adminbytes.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.adminbytes.com/feeds/841156569315735299/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6265021962954177019&amp;postID=841156569315735299' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/841156569315735299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6265021962954177019/posts/default/841156569315735299'/><link rel='alternate' type='text/html' href='http://www.adminbytes.com/2010/03/running-command-from-history-in-linux.html' title='Running a command from history in LINUX'/><author><name>Jubith</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
