<?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:blogger='http://schemas.google.com/blogger/2008' 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-1771611745557879832</id><updated>2024-09-01T05:50:31.979+05:30</updated><title type='text'>Jiten Jha</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jitenjha.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://jitenjha.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07663057837439208477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>35</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1771611745557879832.post-2685913477925892567</id><published>2015-12-01T19:48:00.001+05:30</published><updated>2015-12-01T19:48:13.407+05:30</updated><title type='text'>Linux Basic Commands</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
How to change Shell in Linux?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;cat /etc/shells (In that file you will see all shell that support by OS)&lt;/li&gt;
&lt;li&gt;To change Shell &quot;chsh -s /bin/shell name&quot; &quot;chsh -s /bin/tcsh&quot;&lt;/li&gt;
&lt;li&gt;Change Shell for user &quot;chsh -s /bin/shell name Username&quot; &quot;chsh -s /bin/tcsh jiten&quot;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
What is the command to check user group name , group ID , UID ?&lt;/div&gt;
&lt;div&gt;
id username&lt;/div&gt;
&lt;div&gt;
id jiten (This command will show you UID , GID , group name)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
What is the command to check user account expiry date info?&lt;/div&gt;
&lt;div&gt;
chage -l username&lt;/div&gt;
&lt;div&gt;
chage -l jiten (This command will show you user related information)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
User add command options?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
what is the command to create user in different directory?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -d /home/directory name/ username &amp;nbsp; username&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -d /home/sale/jiten jiten&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
what is the command to user with specific user ID?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -u UID number user name&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -u 2222 jiten&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
what is the command to user with specific GID?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -u UID number -g GID number username&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -u 3323 -g 400 jiten&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
or&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -g 391 jiten&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
what is the command to add user in multiple group?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -G group name username&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -G postfix,sale,market jiten&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
(To separate groups we use &quot;,&quot; sign )&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
what is the command &amp;nbsp;to add user without HOME directory?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -M username&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -M jiten&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
what is the command to add user with &amp;nbsp;account expiry date?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -e yyyy-mm-dd username&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -e 2013-06-01 jiten&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
what is the command to set user expiry date and days?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -e 2013-06-01 -f 45 (days) username&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -e 2013-06-01 -f 45 jiten &amp;nbsp;(user command with expiry in 45 days)&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
what is the command to set comment on user ?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -c &quot;Hello I am sales team&quot; user name&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -c &quot;Hello I am sales team&quot; jiten&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
what is the command to change user shell?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -s /sbin/nologin username&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -s /sbin/nologin jiten&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Add user with specific Home directory , Default shell and Custom comment?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -m -d /home/sales/username -s /bin/bash -c &quot;sales person&quot; -U username&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -m -d /home/sales/jiten -s /bin/bash -c &quot;sales person&quot; -U jiten&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Add user with home directory, custom shell , custom comment and UID/GID?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -m -d /home/sales/username -s /bin/bash -c &quot;hello&quot; -u 6000 -g 6000 username&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -m -d /home/sales/jiten -s /bin/bash -c &quot;hello&quot; -u 6000 -g 6000 jiten&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Add user with home directory , no shell , custom comment and UID?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -m -d /home/sales/username -s /sbin/nologin -c &quot;how are you team&quot; -u 1020 username&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -m -d /home/sales/jiten -s /sbin/nologin -c &quot;How are you team&quot; -u 1020 jiten&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Add user with home directory, shell,custom skell/comment and user ID?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -m -d /home/sales/username -k /etc/custom.skell -s /sbin/tcsh -c &quot;sales member&quot; -u 3021 username&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -m -d /home/sales/jiten -k /etc/custom.skell -s /sbin/tcsh -c &quot;sales member&quot; -u 3021 jiten&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Add user without home directory, No shell &amp;nbsp;and no group ?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -M -N -r -s /bin/false username&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
useradd -M -N -r -s /bin/false jiten&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
What is the usermod command and it use ?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
we use usermod command to modify user details&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
what is the command to change user home directory ?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
usermod -d newdirectory name &amp;nbsp;olddirectoryname&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
usermod -d /home/testnet jiten (This command will not copy the content of jiten user directory to testnet directory)&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
what is the command to change user home directory with it content?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
usermod -d newdirectory name -m olddirectory name&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
usermod -d /home/testnet -m jiten (When you will run this command it will copy jiten directory content to testnet directory)&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
what is the command to add group in user?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
usermod -G group name user name&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
usermod -G developer jiten&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
what is the command to add group with exist group?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
usermod -aG groupname username&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
usermod -aG developer jiten&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
what is the command to change user primary group?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
usermod -g groupname username&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
usermod -g developer jiten&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
id username&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
id jiten&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
what is the command to lock user?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
usermod -L username&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
usermod -L jiten&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
what is the command to unlocking user?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
usermod -U username&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
usermod -U jiten&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
what is the command to change expiry date of user account?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
usermod -e yyyy-mm-dd username&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
usermod -e 2016-12-30 jiten&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
what is the command to change login name ?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
usermod -l newname username&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
usermod -l jitenjha jiten&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
what is the command to change login password?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
usermod -p newpassword username&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
usermod -p newpassword jiten&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
what is the command to change user shell?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
usermod -s /bin/bash username&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
usermod -s /bin/bash jiten&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://jitenjha.blogspot.com/feeds/2685913477925892567/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1771611745557879832/2685913477925892567?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/2685913477925892567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/2685913477925892567'/><link rel='alternate' type='text/html' href='http://jitenjha.blogspot.com/2015/12/linux-basic-commands.html' title='Linux Basic Commands'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07663057837439208477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1771611745557879832.post-3625162401560763564</id><published>2014-01-23T12:23:00.002+05:30</published><updated>2015-02-27T16:42:55.654+05:30</updated><title type='text'>Squid Proxy with Mysql Auth</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;b&gt;Configure Squid Proxy server :&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small; font-style: italic; line-height: 19.5px;&quot;&gt;1.&lt;/span&gt;&lt;i style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small; line-height: 19.5px;&quot;&gt;&amp;nbsp;Install Squid, start it, and&amp;nbsp;set it to start on boot.&lt;/i&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-top: 1em; padding: 0px;&quot;&gt;
&lt;div style=&quot;line-height: 19.5px; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;$ su -&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span 19.5px=&quot;&quot; line-height:=&quot;&quot; small=&quot;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;# yum install squid&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span 19.5px=&quot;&quot; line-height:=&quot;&quot; small=&quot;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;# service squid start&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span 19.5px=&quot;&quot; line-height:=&quot;&quot; small=&quot;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;# chkconfig squid on&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small; line-height: 19.5px;&quot;&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 19.5px; margin-bottom: 1em; margin-top: 1em; padding: 0px; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;2.&lt;/span&gt;&lt;i&gt;&amp;nbsp; Now install SquidGuard.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 19.5px; margin-bottom: 1em; margin-top: 1em; padding: 0px; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;# yum install squidGuard&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 19.5px; margin-bottom: 1em; margin-top: 1em; padding: 0px;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span courier=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;3.&amp;nbsp;&lt;/span&gt;&lt;i&gt;&amp;nbsp;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Now that SquidGuard is installed, open Firefox and go to&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;the SquidGuard website:&amp;nbsp;&lt;a href=&quot;http://squidguard.org/&quot;&gt;http://squidguard.org&lt;/a&gt;&amp;nbsp;. The&amp;nbsp;SquidGuard website has links to configuration documentation&amp;nbsp;and websites to download blacklists.&amp;nbsp;You need to download a&amp;nbsp;blacklists file. You can go to&amp;nbsp;&lt;a href=&quot;http://dsi.ut-capitole.fr/blacklists/&quot;&gt;http://dsi.utcapitole.fr/blacklists/&lt;/a&gt;&amp;nbsp;&amp;nbsp;and get the link for the&amp;nbsp;blacklists.tar.gz&amp;nbsp;file,&amp;nbsp;then you can use&amp;nbsp;wget to download &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;blacklists.tar.gz, by copying and pasting the&amp;nbsp;link, or you can download it through the Firefox web&amp;nbsp;browser.&amp;nbsp;Squidguard has its own blacklists.tar.gz file,&amp;nbsp;and you&amp;nbsp;will eventually want to replace it with the newer&amp;nbsp;blacklists.tar.gz file that you downloaded. Before you do that,&amp;nbsp;you can create a test&amp;nbsp;blacklists file for SquidGuard to block.&amp;nbsp;To do that you need to create a&amp;nbsp;blacklists&amp;nbsp;directory &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; in&amp;nbsp;the&amp;nbsp;/var/squidGuard/&amp;nbsp;directory. Now, in the &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; new&amp;nbsp;blacklists&amp;nbsp;directory&amp;nbsp;use vim create and edit a text &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;file&amp;nbsp;called&amp;nbsp;testdomains.&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 19.5px; margin-bottom: 1em; margin-top: 1em; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 19.5px; margin-bottom: 1em; margin-top: 1em; padding: 0px; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;# cd /var/squidGuard# mkdir blacklists&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;#&amp;nbsp;cd blacklists&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;# mkdir testdomains&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; # cd testdomains&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; # vim testdomains&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 19.5px; margin-bottom: 1em; margin-top: 1em; padding: 0px; text-align: left;&quot;&gt;
&lt;span courier=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;4.&lt;/span&gt;&lt;i&gt;&amp;nbsp;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;In this testdomains file you have write or&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;add website name those you want to block.type in three lines of text&amp;nbsp;to add&amp;nbsp;some test-domains to block:&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span courier=&quot;&quot; font-size:=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot; style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot; x-small=&quot;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; yahoo.com&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span courier=&quot;&quot; font-size:=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot; style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot; x-small=&quot;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; msn.com&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span courier=&quot;&quot; font-size:=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot; style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot; x-small=&quot;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; whatever-you-want-to-block.com&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 19.5px; margin-bottom: 1em; margin-top: 1em; padding: 0px; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; save and exit.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 19.5px; margin-bottom: 1em; margin-top: 1em; padding: 0px;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span courier=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;5.&lt;/span&gt;&lt;i&gt;&amp;nbsp;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;After create testdomains file Now you have to edit squid.conf&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;file.&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 19.5px; margin-bottom: 1em; margin-top: 1em; padding: 0px;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;6.&lt;/span&gt;&lt;i&gt;&amp;nbsp;vim /etc/squid/squid.conf&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 19.5px; margin-bottom: 1em; margin-top: 1em; padding: 0px; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;7.&lt;/span&gt;&lt;i&gt;&amp;nbsp;If you have LDAP server so add this lines :&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-top: 1em; padding: 0px; text-align: left;&quot;&gt;
&lt;span style=&quot;line-height: 19.5px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; ## LDAP AUTH&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-top: 1em; padding: 0px; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;auth_param basic program /usr/lib64/squid/squid_ldap_auth -&lt;/span&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;b &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;dc=ii,dc=ac,dc=in&quot; -f &quot;uid=%s&quot; -h ldap.ii.ac.in&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-top: 1em; padding: 0px; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small; line-height: 19.5px;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; acl ldapauth proxy_auth REQUIRED&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-top: 1em; padding: 0px; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small; line-height: 19.5px;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; http_access allow ldapauth&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-top: 1em; padding: 0px; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small; line-height: 19.5px;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;(/usr/lib64/squid/squid_ldap_auth) This line represent that all&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small; line-height: 19.5px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small; line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp;squid commands in /usr/lib64/squid/ directory&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-top: 1em; padding: 0px;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span courier=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;8.&lt;/span&gt;&lt;i&gt;&amp;nbsp;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Make sure that you have to put right path so that command&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace; line-height: 19.5px;&quot;&gt;&lt;i&gt;will execute .&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small; font-style: italic;&quot;&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;9.&lt;/span&gt;&lt;i&gt;&amp;nbsp;Squid normally listens to port 3128&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp; http_port 8080&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp; Find line listens port 3128 .&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;span courier=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot;&gt;&lt;i&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp;If you want to change port no. so you can change it.&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: x-small; font-style: italic; line-height: 19.5px;&quot;&gt;10.&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;url_rewrite_program /usr/bin/squidGuard -c&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;/etc/squid/squidGuard.conf&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;i&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;write this 2 lines in squid.conf file .&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp; /usr/bin/squidGuard is a command and&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;/etc/squid/squidGuard.conf is the &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; squidGuard configuration&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;file path.&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;line-height: 19.5px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; redirect_children 20&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small; font-style: italic; line-height: 19.5px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small; font-style: italic; line-height: 19.5px;&quot;&gt;11.&lt;/span&gt;&lt;i style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small; line-height: 19.5px;&quot;&gt;&amp;nbsp;save and exit squid.conf file.&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;line-height: 19.5px;&quot;&gt;&lt;span courier=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;12.&lt;/span&gt;&lt;i&gt;&amp;nbsp;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;vim /etc/squid/squidGuard.conf&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;i style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; When you open squidGuard.conf file .&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small; font-style: italic; line-height: 19.5px;&quot;&gt;13.&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small; line-height: 19.5px;&quot;&gt;dbhome /var/squidGuard/blacklists&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;line-height: 19.5px;&quot;&gt;&lt;span courier=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;14.&lt;/span&gt;&lt;i&gt;&amp;nbsp;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;remove blacklists and line look like.&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small; line-height: 19.5px;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; dbhome /var/squidGuard&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span 19.5px=&quot;&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; search and edit&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small; font-style: italic; line-height: 19.5px;&quot;&gt;15.&lt;/span&gt;&lt;i style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small; line-height: 19.5px;&quot;&gt;&amp;nbsp;dest adult {&lt;/i&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;line-height: 19.5px; white-space: pre;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;domainlist&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;line-height: 19.5px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;blacklists/testdomains/testdomains&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;line-height: 19.5px; white-space: pre;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;urllist&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;line-height: 19.5px; white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;blacklists/terstdomains/testdomains&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;line-height: 19.5px; white-space: pre;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;expressionlist&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;line-height: 19.5px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;blacklists/porn/expressions&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;&lt;/span&gt;}&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-style: italic; line-height: 19.5px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-style: italic; line-height: 19.5px;&quot;&gt;16.&lt;/span&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;&lt;i&gt;&amp;nbsp;Add :&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;default {&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small; line-height: 19.5px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;line-height: 19.5px; white-space: pre;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;pass&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;line-height: 19.5px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;!testdomains any&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;#&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;line-height: 19.5px; white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;rewrite&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;line-height: 19.5px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;&amp;nbsp;dmz&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;line-height: 19.5px; white-space: pre;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;redirect http://10.99.100.3/blocked.html&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small; font-style: italic;&quot;&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace; line-height: 19.5px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;font-style: italic; white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;i&gt;}&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp; here you will see redirect option if you want you can delete it&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;or you can &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; put any website name , any html page that will so&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;some message.&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: x-small; font-style: italic;&quot;&gt;17.&lt;/span&gt;&lt;i style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;b&gt;Authenticate from MySQL database&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;18.&lt;/span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;yum search mysql-server&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;19.&lt;/span&gt;&lt;i&gt;&amp;nbsp;/etc/init.d/mysqld restart&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span courier=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot; style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; If you face any problem to start it. vim /etc/my.cnf file and change &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; line-height: 17.804800033569336px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;datadir&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; line-height: 17.804800033569336px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; line-height: 17.804800033569336px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;home&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; line-height: 17.804800033569336px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; line-height: 17.804800033569336px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;mysql&quot; path or locate , file&amp;nbsp;&lt;/span&gt;name.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span courier=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span courier=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;20.&lt;/span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mysql -u root -p&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span courier=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;21.&lt;/span&gt;&lt;i&gt;&amp;nbsp;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;create database squid;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span courier=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;22.&lt;/span&gt;&lt;i&gt;&amp;nbsp;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;grant select on squid.* to dataproxy@localhost identified by &#39;dataproxy&#39;;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span courier=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot; style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; If you want to can allow dataproxy user permission for check or edit squid &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; database.or you can use root user.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;23.&lt;/span&gt;&lt;i&gt;&amp;nbsp;Create table &#39;passwd&#39; in &#39;squid&#39; db.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; CREATE TABLE `passwd` (&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; `user` varchar(32) NOT NULL default &#39;&#39;,&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; `password` varchar(35) NOT NULL default&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39;&#39;,`enabled` tinyint(1) NOT NULL default &#39;1&#39;,&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; `fullname` varchar(60) default NULL,&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; `comment` varchar(60) default NULL,&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PRIMARY KEY (`user`) );&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;24.&lt;/span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Populate the table with some test data, eg&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; insert into passwd values(&#39;testuser&#39;,&#39;test&#39;,1,&#39;Test User&#39;,&#39;for testing &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; purpose&#39;);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; In the insert line &#39;testuser&#39; is a user name and &#39;test&#39; password for access &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; internet.&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;25.&lt;/span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Again Edit squid.conf file.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;26.&lt;/span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;vim /etc/squid/squid.conf&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/i&gt;&lt;i&gt;auth_param basic program&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &lt;/i&gt;&lt;i&gt;&amp;nbsp;/usr/lib64/squid/squid_db_auth --user dataproxy --password dataproxy -- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; plaintext --persist&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;auth_param basic children 5&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;auth_param basic realm Web-Proxy&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;auth_param basic credentialsttl 1 minute&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;auth_param basic casesensitive off&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;acl db-auth proxy_auth REQUIRED&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;i&gt;http_access allow db-auth&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;http_access allow localhost&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;http_access deny all&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;27.&lt;/span&gt;&lt;i&gt;save and exit file.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;28.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;&lt;i&gt;Now&amp;nbsp;compile the SquidGuard blacklists and chown the blacklists to be &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;accessible by Squid.&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span courier=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;squidGuard -b -d -C all&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;&lt;i&gt;chown -R squid /var/squidGuard/blacklists&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span courier=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-style: italic; line-height: 19.5px;&quot;&gt;29.&amp;nbsp;&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;restart squid service&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/etc/init.d/squid restart&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-style: italic;&quot;&gt;30.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;i&gt;At last open terminal&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span courier=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Run this command for testing&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span courier=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span courier=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/usr/lib64/squid/squid_db_auth --user dataproxy --password dataproxy -- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;plaintext --persist &amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; --- Press Enter&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;i&gt;After Press Enter you have to put username and password there&amp;nbsp;like we have &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;created&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;i&gt;testuser test&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span courier=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span courier=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;username and password both in same line with one space.&amp;nbsp;you will see ok it &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mean it is working fine.or any error so send me or you can google it.&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span courier=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span courier=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;32.&lt;/span&gt;&lt;i&gt;&amp;nbsp;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;OPEN your browser firefox , internet explore , chrome,&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span courier=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;33.&lt;/span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Proxy setting option&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span courier=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;34.&lt;/span&gt;&lt;i&gt;&amp;nbsp;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Manual Proxy setting&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span courier=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;35.&lt;/span&gt;&lt;i&gt;&amp;nbsp;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;put there your squid server ip address or domain name if it is and port no &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;that you allow or open it.&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Best of Luck&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span courier=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://jitenjha.blogspot.com/feeds/3625162401560763564/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1771611745557879832/3625162401560763564?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/3625162401560763564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/3625162401560763564'/><link rel='alternate' type='text/html' href='http://jitenjha.blogspot.com/2014/01/configure-squid-proxy-server.html' title='Squid Proxy with Mysql Auth'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07663057837439208477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1771611745557879832.post-4583466738015698720</id><published>2012-03-09T10:53:00.000+05:30</published><updated>2012-03-09T10:53:30.277+05:30</updated><title type='text'>PostgreSQL</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
POSTGRESQL&lt;br /&gt;
&lt;br /&gt;
aptitude search postgresql&lt;br /&gt;
&lt;br /&gt;
You have to install server type &amp;amp; latest version of SQL server.&lt;br /&gt;
&lt;br /&gt;
Run postgresql command&lt;br /&gt;
&lt;br /&gt;
apt-get install postgresql name ( package name with version )&lt;br /&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; or&lt;br /&gt;
aptitude install package name&lt;br /&gt;
&lt;br /&gt;
After that we check postgresql is working or not&lt;br /&gt;
&quot;psql : FATAL: role &quot;root&quot; does not exits&lt;br /&gt;
&lt;br /&gt;
# psql postgres&lt;br /&gt;
&lt;br /&gt;
# su - postgres&lt;br /&gt;
&lt;br /&gt;
# pwd to check path of file.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /var/lib/postgresql&lt;br /&gt;
&lt;br /&gt;
#postgres@common-...:~$ su - postgres&lt;br /&gt;
#createuser -U postgres -P&lt;br /&gt;
&lt;br /&gt;
Connect to database or access any database&lt;br /&gt;
&lt;br /&gt;
#psql postgres ( database name )&lt;br /&gt;
postgres =&amp;gt;&amp;nbsp; [ postgres is bydefault database create when we install postgresql ]&lt;br /&gt;
&lt;br /&gt;
To see database &quot;\l&quot;&lt;br /&gt;
To quit to database &quot;\q&quot;&lt;br /&gt;
Create database in postgresql&lt;br /&gt;
#createdb data1 ( database name ) ---&amp;gt; This command run in user mode.&lt;br /&gt;
&lt;br /&gt;
postgres =&amp;gt; CREATE DATABASE data1;&lt;br /&gt;
postgres =&amp;gt; \l&lt;br /&gt;
Stop any process in sql &quot;;&quot;&lt;br /&gt;
&lt;br /&gt;
Connect to other database &lt;br /&gt;
psqlgres =&amp;gt; \c [ database name ] data1&lt;br /&gt;
&lt;br /&gt;
Alt + F1 : open application menu&lt;br /&gt;
Alt + F2 : Display run application dialog&lt;br /&gt;
print screen : Take a screen shot of the entire desktop&lt;br /&gt;
Alt + print screen : Take a screen shot of the current open windows&amp;nbsp; &lt;br /&gt;
Ctrl + Alt + Arrow : switch to the work space to the specified direction of&lt;br /&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;&amp;nbsp;&amp;nbsp; the current workspace.&lt;br /&gt;
Ctrl + Alt + D :&amp;nbsp; Minimize all windows &amp;amp; give focus to the desktop&lt;br /&gt;
Alt + tab : Switch between windows. A list of windows that you can select is display id. Release the keys to select a windows. You can press the &quot;shift&quot; key to cycle through the windows in reverse order.&lt;br /&gt;
Ctrl + Alt + Tab : Switch the focus between the panels and the desktop. A list of &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; items that you can select it display. Release the keys to select&lt;br /&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; on item. you can press the &quot;shift&quot; key to cycle through&lt;br /&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; the&amp;nbsp; items in reverse order.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jitenjha.blogspot.com/feeds/4583466738015698720/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1771611745557879832/4583466738015698720?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/4583466738015698720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/4583466738015698720'/><link rel='alternate' type='text/html' href='http://jitenjha.blogspot.com/2012/03/postgresql.html' title='PostgreSQL'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07663057837439208477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1771611745557879832.post-5650575010418486840</id><published>2012-03-07T11:13:00.004+05:30</published><updated>2012-03-07T11:13:50.001+05:30</updated><title type='text'>PS command</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;ps command&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
use for check which process is run or not.&lt;br /&gt;
&lt;br /&gt;
#ps -ef ---&amp;gt; show you all process running on computer&lt;br /&gt;
# ps -ef | grep -i process name ----&amp;gt; grep any process you want to check or kill.&lt;br /&gt;
&lt;br /&gt;
If you want to set any value to any file then we run .&lt;br /&gt;
&lt;br /&gt;
echo [ 1 or 0 ] &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
&lt;br /&gt;
echo is command&lt;br /&gt;
1 or 0 is value&lt;br /&gt;
/proc/sys/net/ipv4/ip_forward --&amp;gt; file path&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jitenjha.blogspot.com/feeds/5650575010418486840/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1771611745557879832/5650575010418486840?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/5650575010418486840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/5650575010418486840'/><link rel='alternate' type='text/html' href='http://jitenjha.blogspot.com/2012/03/ps-command.html' title='PS command'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07663057837439208477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1771611745557879832.post-176977506405912031</id><published>2012-03-07T11:08:00.005+05:30</published><updated>2012-03-07T11:08:46.689+05:30</updated><title type='text'>APT ( Advanced Packaging Tool )</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;APT ( Advanced Packaging Tool )&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
apt-get&amp;nbsp;&amp;nbsp; -------&amp;gt; APT package handling tool&lt;br /&gt;
apt-get install (package name) ----------&amp;gt; To install any software and package&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
apt-get install firefox&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
apt-get autoremove package name&lt;br /&gt;
apt-get remove package name --------------&amp;gt; To remove package&lt;br /&gt;
&lt;br /&gt;
* aptitude :-&amp;gt; high-level interface to the package manager This command use&lt;br /&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; for.&lt;br /&gt;
&lt;br /&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; &lt;b&gt;install any software or find any software&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
aptitude search ( package name ) ----&amp;gt; search any package&lt;br /&gt;
aptitude install ( package name )&amp;nbsp; -----&amp;gt; To install any package&lt;br /&gt;
aptitude remove ( package name ) ----&amp;gt; To remove any package&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want to install any binary package like java in a binary formate then give package execute permission. After that [ ./java ] is command.&lt;br /&gt;
./java&lt;br /&gt;
&lt;br /&gt;
Check java install or not :&lt;br /&gt;
&lt;br /&gt;
dpkg -query -l | grep java&lt;br /&gt;
&lt;br /&gt;
This command show you that the java install or not check java package install or not.&lt;br /&gt;
&lt;br /&gt;
env : run a program in a modified environment&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This command run for to check environment or path is correct or not.&lt;br /&gt;
&lt;br /&gt;
export JAVA_HOME = /opt/java&lt;br /&gt;
export = command&lt;br /&gt;
JAVA_HOME = variable&lt;br /&gt;
/opt/java = file location&lt;br /&gt;
&lt;br /&gt;
export JAVA_HOME = /opt/java&lt;br /&gt;
export ANT_HOME = /opt/ant&amp;nbsp; ----&amp;gt; [ ANT is a compiler ]&lt;br /&gt;
echo $ JAVA_HOME&lt;br /&gt;
echo $ANT_HOME -----&amp;gt; To check variable export or not.&lt;br /&gt;
&lt;br /&gt;
vim /etc/profile ----&amp;gt; insert line&lt;br /&gt;
&lt;br /&gt;
export JAVA_HOME = /opt/java&lt;br /&gt;
export ANT_HOME = /opt/ant&lt;br /&gt;
export PATH = $PATH:${JAVA_HOME}/bin:${ANT_HOME}/bin ---&amp;gt; restart pc&lt;br /&gt;
&lt;br /&gt;
But if you don&#39;t want to reboot pc then run&lt;br /&gt;
&amp;nbsp;&amp;nbsp; [ source /etc/profile ]&amp;nbsp; -----&amp;gt; command use for execute variable .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jitenjha.blogspot.com/feeds/176977506405912031/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1771611745557879832/176977506405912031?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/176977506405912031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/176977506405912031'/><link rel='alternate' type='text/html' href='http://jitenjha.blogspot.com/2012/03/apt-advanced-packaging-tool.html' title='APT ( Advanced Packaging Tool )'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07663057837439208477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1771611745557879832.post-6993402563240842996</id><published>2012-03-06T17:57:00.000+05:30</published><updated>2012-03-06T17:57:23.526+05:30</updated><title type='text'>Proc File System</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Understanding the Proc File System&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;The Linux kernel provides a mechanism to access its underlying internal data-structure and also to change its kernel setting at run-time through /proc file system. We will be discussing the /proc file system here targeted to the Intel x86 architecture; though the basic concepts will remain the same for linux on any plarform.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;/proc - a Virtual File System:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The /proc file system is a mechanism that is used for the kernel and kernel modules to send information to processes ( hence the name /proc ). This pseudo file system allows you to interact with the internal data-structure of the kernel,bet useful information about the processes, and to change settings ( by modifying the kernel parameters ) on the fly. /proc is stored in memory, unlike other file-systems, which are stored on disk. If you look at the file /proc/mount ( which lists all the mounted file systems, like &quot;mount command), you should see a line in it like:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;gerp proc /proc/mounts&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;/proc /proc proc rw 0 0&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
/proc&amp;nbsp; is controlled by the kernel and does not have an underlying device. Because it contains mainly state information controlled by the kernel, the most logical place to store the information is in memory controlled by the kernel. Doing a &#39;ls -l&#39;&lt;br /&gt;
on /proc reveals that most of the files are 0 bytes in size; yet when the file is viewed, quite a bit of information is seen. How is this possible ? This happens because the /proc file-system like any other regular file-system registers itself to the Virtual File System layer ( VFS ). However when VFS make calls to it requesting i-nodes for files/directories the /proc file system creates those files/directories from information within the kernel.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Mounting the proc file system:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
If already not mounted on your system, proc file system can be mounted on your system by running the following command -&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;mount -t proc proc /proc&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The above command should successfully mount your proc file system. Please read the mount man page for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Viewing the /proc files:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
/proc files can be used to access information about the state of the kernel, the attributes of the machine the state of the running processes etc. Most of the files in the /proc directory provide the latest glimpse of a system&#39;s physical environment. Although these /proc files are virtual yet they can be viewed using file the file is created on&amp;nbsp; the fly from information within the kernel. Here are some interesting results which i got on my system.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$ ls -l /proc/cpuinfo&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;-r--r--r--&amp;nbsp; 1 root root 0 2012-03-06 11:47 /proc/cpuinfo&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$ file /proc/cpuinfo&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;/proc/cpuinfo: empty&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
processor&amp;nbsp;&amp;nbsp;&amp;nbsp; : 0&lt;br /&gt;vendor_id&amp;nbsp;&amp;nbsp;&amp;nbsp; : GenuineIntel&lt;br /&gt;cpu family&amp;nbsp;&amp;nbsp;&amp;nbsp; : 15&lt;br /&gt;model&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; : 4&lt;br /&gt;model name&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; Intel(R) Xeon(TM) CPU 3.40GHz&lt;br /&gt;stepping&amp;nbsp;&amp;nbsp;&amp;nbsp; : 1&lt;br /&gt;cpu MHz&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; : 3391.625&lt;br /&gt;cache size&amp;nbsp;&amp;nbsp;&amp;nbsp; : 1024 KB&lt;br /&gt;physical id&amp;nbsp;&amp;nbsp;&amp;nbsp; : 0&lt;br /&gt;siblings&amp;nbsp;&amp;nbsp;&amp;nbsp; : 2&lt;br /&gt;core id&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; : 0&lt;br /&gt;cpu cores&amp;nbsp;&amp;nbsp;&amp;nbsp; : 1&lt;br /&gt;fpu&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; : yes&lt;br /&gt;fpu_exception&amp;nbsp;&amp;nbsp;&amp;nbsp; : yes&lt;br /&gt;cpuid level&amp;nbsp;&amp;nbsp;&amp;nbsp; : 5&lt;br /&gt;wp&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; : yes&lt;br /&gt;flags&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pni monitor ds_cpl est cid cx16 xtpr&lt;br /&gt;bogomips&amp;nbsp;&amp;nbsp;&amp;nbsp; : 6792.84&lt;br /&gt;clflush size&amp;nbsp;&amp;nbsp;&amp;nbsp; : 64&lt;br /&gt;cache_alignment&amp;nbsp;&amp;nbsp;&amp;nbsp; : 128&lt;br /&gt;address sizes&amp;nbsp;&amp;nbsp;&amp;nbsp; : 36 bits physical, 48 bits virtual&lt;br /&gt;power management:&lt;br /&gt;&lt;br /&gt;processor&amp;nbsp;&amp;nbsp;&amp;nbsp; : 1&lt;br /&gt;vendor_id&amp;nbsp;&amp;nbsp;&amp;nbsp; : GenuineIntel&lt;br /&gt;cpu family&amp;nbsp;&amp;nbsp;&amp;nbsp; : 15&lt;br /&gt;model&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; : 4&lt;br /&gt;model name&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; Intel(R) Xeon(TM) CPU 3.40GHz&lt;br /&gt;stepping&amp;nbsp;&amp;nbsp;&amp;nbsp; : 1&lt;br /&gt;cpu MHz&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; : 3391.625&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ETC..&lt;br /&gt;
&lt;br /&gt;
This is the result for a five-CPU machine. Most of the information above is self-explanatory and gives useful hardware information about the system. Some of the information in /proc files is encoded and various utilities are built that interpret this encoded information and output it in a human readable format. Some of these utilities are: &#39;top&#39;, &#39;ps&#39;, &#39;apm&#39; etc.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Getting Useful system/kernel information:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The Proc File System can be used to gather useful information about the system and the running kernel. Some of the important files are listed below:&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;/proc/cpuinfo - information about the CPU ( model, family, cache size etc.)&lt;/li&gt;
&lt;li&gt;/proc/meminfo - information about the physical RAM, Swap space etc.&lt;/li&gt;
&lt;li&gt;/proc/mounts - list of mounted file system.&lt;/li&gt;
&lt;li&gt;/proc/devices - list of available devices&lt;/li&gt;
&lt;li&gt;/proc/filesystem - supported file system&lt;/li&gt;
&lt;li&gt;/proc/modules -&amp;nbsp; list of loaded modules&lt;/li&gt;
&lt;li&gt;/proc/version - Kernel version&lt;/li&gt;
&lt;li&gt;/proc/cmdline - Parameters passed to the kernel at the time of starting&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
There are much more files in /proc than listed above. An alert reader is expected to do a &#39;more&#39; on every file in /proc directory or read [1]1 for more information about the files present in /proc directory. I suggest to use &#39;more&#39; and not &#39;cat&#39; until you know the filesystem a bit because some files (e.g. kcore) can be very large.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Information about running processes:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The /proc file system can be used to retrieve information about any running process. There are couple of numbered sub-directories inside /proc. Each numbered corresponds to a process id (PID). Thus for each running process, there is a sub-directory inside /proc named by its PID. Inside these sub-directories are files that provide important details about the state and environment of a process. Lets try to search for a running process.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$ps -aux | grep mozilla&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The above command shows that there is a running process of mozilla with PID ***. &lt;br /&gt;
&lt;br /&gt;
The file&amp;nbsp; &quot;cmdline&quot; contains the command invoked to start the process. The &quot;environ&quot; file contains the environment variables for the process. &quot;status&quot; has status information on the process, including the user (UID) and group (GID) identification for the user executing the process the parent process ID (PPID) that instantiated the PID and the current state of the process such as &quot;Sleeping&quot; or &quot;Running&quot;. Each process directory also has a couple of symbolic links. &quot;cwd&quot; is a link to the current working directory for the process ,&quot;exe&quot; to the executable program of the running process, &quot;root&quot; is a link to the directory, which the process, sees as its root directory (usually &quot;/&quot;). The directory &quot;fd&quot; contains links to the file description that the process is using. &quot;cpu&quot; entry appears only on SMP linux kernels. It contains a breakdown of process time by CPU.&lt;br /&gt;
&lt;br /&gt;
/proc/self is an interesting sub-directory that makes it easy for a program to use /proc to find information about its own process. The entry /proc/self is a symbolic link to the /proc directory corresponding to the process accessing the /proc directory.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Interacting with kernel via /proc:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Most of the files in /proc discussed above are read-only. However the /proc file system provides provision of interact with kernel via read-write files inside. Writing to these files can change the state of the kernel and therefore changes to these files should be made with caution. The /proc/sys directory is the one that hosts all the read-write files and thus can be used to change the kernel behaviour.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;/porc /sys/kernel&lt;/b&gt; - This directory contains information that reflects general kernel behaviour. /proc/sys/kernel/{domainname,hostname} hold the domain-name and hostname for the machine/network. These files can be configured to modify these names.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$hostname&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$cat /proc/sys/kernel/domainname&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$cat /proc/sys/kernel/hostname&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$echo &quot;new-machinename&quot; &amp;gt; /proc/sys/kernel/hostname&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$hostname&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Thus by modifying the file inside /proc file system. we are able to modify the hostname. Lots of other configurable files exists inside /proc/sys/kernel. Again its impossible to list down every file here so readers are expected to go through this directory in detail.&lt;br /&gt;
Another configurable directory is /proc/sys/net. Files inside this directory can be modified to change the networking properties of the machine/network. E.g. By simply modifying a file, you can hide your machine in the network.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$echo 1 &amp;gt; /proc/sys/net/ipv4/icmp_echo_ignore_all&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
This will hide your machine in the network as it disables answers to icmp_echos. The host will not respond to ping queries from other hosts.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$ ping machiname.domainname.com&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;To trun it back to default behaviour, do&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$echo 0&amp;gt; /proc/sys/net/ipv4/icmp_echo_ignore_all&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
There are lots of other sub-directories in /proc/sys which can be configured to change the kernel properties. See [1],[2] for detailed information.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Conclusion:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The /proc File System provides a file-based interface to the linux internals. It assists in determining the state and configuration of various devices and processes on system. Understanding and applied knowledge of this file-system is therefore the key to making the most out of your linux system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jitenjha.blogspot.com/feeds/6993402563240842996/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1771611745557879832/6993402563240842996?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/6993402563240842996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/6993402563240842996'/><link rel='alternate' type='text/html' href='http://jitenjha.blogspot.com/2012/03/proc-file-system.html' title='Proc File System'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07663057837439208477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1771611745557879832.post-6923855630863286004</id><published>2012-03-06T14:47:00.000+05:30</published><updated>2012-03-06T14:47:00.297+05:30</updated><title type='text'>vi editor</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;VI Editor&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;What is vi?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The default editor that comes with the UNIX operating system is called vi ( visual editor ). [Alternate editors for UNIX environments include pico and emacs, a product of GNU.]&lt;br /&gt;
&amp;nbsp;The UNIX vi editor is a full screen editor and has two modes of operation:&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;command mode commands which cause action to be taken on the file, and&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Insert mode in which entered text is inserted into the file.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
In the command mode, every character typed is a command that does something to the text file being edited; a character typed in the command mode may even cause the vi editor to enter the insert mode. In the insert mode, every character typed is added to the text in the file; pressing the &lt;esc&gt; (Escape) key turns off the Insert mode.&lt;/esc&gt;&lt;br /&gt;
&lt;br /&gt;
While there are a number of vi commands just a handful of these is usually sufficient for beginning vi users. To assist such users, this web page contains a sampling of basic vi commands. The most basic and useful commands are marked with an asterisk (* or star) in the tables below. With practice these commands should become automatic.&lt;br /&gt;
&lt;b&gt;NOTE:&lt;/b&gt; bot UNIX and vi are case-sensitive. Be suer not to use capital letter in place of a lower-case letter; the results will not be what you expect.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;To get into and out of vi :&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;To start vi&lt;/b&gt;&lt;br /&gt;
To use vi on the type in vi filename. If the file named filename exists, then the first page ( or screen ) of the file will be displayed; if the does not exist, then an empty file and screen are created into which you may enter text.&lt;br /&gt;
&lt;br /&gt;



 
 
 
 &lt;style type=&quot;text/css&quot;&gt;
td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; }
&lt;/style&gt;

&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;
 &lt;col width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;tbody&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   *&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Vi filename&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Edit filename starrting at line 1&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   &lt;br /&gt;
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Vi -r filename 
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Recover filename that was being edited when system crashed&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&amp;nbsp;
&lt;br /&gt;&lt;b&gt;To Exit vi&lt;/b&gt;&lt;br /&gt;
Usually the new or modified file is saved when you leave vi. However it is also possible to quit vi without saving the file.&lt;br /&gt;
&lt;b&gt;NOTE: &lt;/b&gt;The course moves to bottom of screen whenever a colon(:) is typed. This type of command is completed by hitting the &lt;return&gt;(or &lt;enter&gt;) key.&lt;/enter&gt;&lt;/return&gt;&lt;br /&gt;



 
 
 
 &lt;style type=&quot;text/css&quot;&gt;
td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; }
&lt;/style&gt;

&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;
 &lt;col width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;tbody&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   *&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   :x &lt;return&gt;&lt;/return&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Quit vi, writing out modified file to file named in original
   invocation&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
A common occurrence in text editing is to replace one word or phase by another. To locate instances of particular sets of characters ( or strings ) use the following commands.&lt;br /&gt;



 
 
 
 &lt;style type=&quot;text/css&quot;&gt;
td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; }
&lt;/style&gt;

&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;tbody&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   /string&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Search forward for occurrence of string in text&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   ?string&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Search backward for occurrence of string in text&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   n&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Move to next occurrence of search string 
   &lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   N&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Move to next occurrence of search string on opposite direction&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;b&gt;Determining Line Number:&lt;/b&gt;&lt;br /&gt;
Being able to determine the line number of the current line or the total number of lines in the file being edited is sometimes useful.&lt;br /&gt;



 
 
 
 &lt;style type=&quot;text/css&quot;&gt;
td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; }
&lt;/style&gt;

&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;tbody&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   : .=&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Returns line number of current line at bottom of screen&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   :=&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Returns the total number of lines at bottom of screen&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   ^g&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Provides the current line number, along with the total number
   of lines, in the file at the bottom of the screen&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;b&gt;Saving and Reading Files:&lt;/b&gt;&lt;br /&gt;
These commands permit you to input and output files other than the named file with which you are currently working.&lt;br /&gt;



 
 
 
 &lt;style type=&quot;text/css&quot;&gt;
td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; }
&lt;/style&gt;

&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;tbody&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   :r filename &lt;return&gt;&lt;/return&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Read file named filename and insert after current line ( the
   line with cursor)&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   :w&lt;return&gt;&lt;/return&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Write current contents to file named in original vi call&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   :w newfile &lt;return&gt;&lt;/return&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Write current contents to a new file named newfile&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   :12, 35w smallfile&lt;return&gt;&lt;/return&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Write the contents of the lines numbered 12 through 35 to a new
   file named smallfile&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   :w! prevfile&lt;return&gt;&lt;/return&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Write current contents over a pre-existing file named prevfile&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;style type=&quot;text/css&quot;&gt;
td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; }
&lt;/style&gt;

&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;tbody&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   ^f&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Move forward one screen&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   ^b&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Move backward one screen&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   ^d&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Move down (forward) one half screen&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   ^u&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Move up (back) one half screen&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   ^l&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Redraws the screen&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   ^r&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Redraws the screen, removing deleted lines&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;b&gt;Adding, Changing and Deleting Text :&lt;/b&gt;&lt;br /&gt;
Unlike PC editors you cannot replace or delete text by highlighting it with the mouse. Instead use the commands in the following tables.&lt;br /&gt;
Perhaps the most important command is the one that allows you to back up and undo your last action. Unfortunately this command acts like a toggle undoing and redoing your most recent action. You cannot go back more than one step.&lt;br /&gt;



 
 
 
 &lt;style type=&quot;text/css&quot;&gt;
td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; }
&lt;/style&gt;

&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;
 &lt;col width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;tbody&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   *&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   u&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Undo whatever you just did; a simple toggle&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
The main purpose of an editor is to create, add, or modify text for a file.&lt;br /&gt;
&lt;b&gt;Inserting or Adding Text:&lt;/b&gt;&lt;br /&gt;
The following commands allow you to insert and add text. Each of these commands puts the vi editor into insert mode; thus the &lt;esc&gt; key must be pressed to terminate the entry of text and to put the vi editor back into command mode.&lt;/esc&gt;&lt;br /&gt;



 
 
 
 &lt;style type=&quot;text/css&quot;&gt;
td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; }
&lt;/style&gt;

&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;
 &lt;col width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;tbody&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   *&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   i&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Insert text before cursor, until &lt;esc&gt; hit&lt;/esc&gt;&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   &lt;br /&gt;
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   I&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Insert text at beginning of current line, until &lt;esc&gt; hit&lt;/esc&gt;&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   *&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   a&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Append text after curson, until &lt;esc&gt; hit&lt;/esc&gt;&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   &lt;br /&gt;
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   A&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Append text to end of current line, until &lt;esc&gt; hit&lt;/esc&gt;&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   *&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   o&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Open and put text in a new line below current line until &lt;esc&gt;
   hit&lt;/esc&gt;&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   *&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   O&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Open and put text in a new line above current line, until &lt;esc&gt;
   hit&lt;/esc&gt;&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;b&gt;Changing Text:&lt;/b&gt;&lt;br /&gt;
The following commands allow you to modify text.&lt;br /&gt;



 
 
 
 &lt;style type=&quot;text/css&quot;&gt;
td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; }
&lt;/style&gt;

&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;
 &lt;col width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;tbody&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   *&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   r&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Replace single  character under cursor (no &lt;esc&gt; needed)&lt;/esc&gt;&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   &lt;br /&gt;
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   R&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Replace characters, starting with current cursor position,
   until &lt;esc&gt; hit&lt;/esc&gt;&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   &lt;br /&gt;
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   cw&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Change the current word with new text, starting with the
   character under cursor, until &lt;esc&gt; hit&lt;/esc&gt;&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   &lt;br /&gt;
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   cNw&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Change N words beginning with character under cursor, until
   ,ESC&amp;gt; hit; e.g. C5w changes 5 word&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   &lt;br /&gt;
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   C&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Change (replace) the characters in the current line, until
   &lt;esc&gt; hit&lt;/esc&gt;&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   &lt;br /&gt;
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   cc&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Change (replace) the entire current line, stopping when &lt;esc&gt;
   is hit&lt;/esc&gt;&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   &lt;br /&gt;
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Ncc OR cNc&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Change (replace) the next N lines, starting with the current
   line, stopping when &lt;esc&gt; is hit&lt;/esc&gt;&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;b&gt;Deleting Text:&lt;/b&gt;&lt;br /&gt;
The following commands allow you to delete text.&lt;br /&gt;



 
 
 
 &lt;style type=&quot;text/css&quot;&gt;
td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; }
&lt;/style&gt;

&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;
 &lt;col width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;tbody&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   *&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   x&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Delete single character under cursor&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   &lt;br /&gt;
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Nx&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Delete N character, starting with character under cursor&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   &lt;br /&gt;
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   dw&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Delete the single word beginning with character under cursor&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   &lt;br /&gt;
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   dNw&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Delete N words beginning with character under cursor; e.g. d%w
   delete 5 words&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   &lt;br /&gt;
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   D&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Delete the remainder of the line starting with current cursor
   position 
   &lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   *&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   dd&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Delete entrie current line&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   &lt;br /&gt;
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Ndd or dNd&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Delete N lines, beginning with the current line; e.g. 5Dd
   delete 5 lines&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&amp;nbsp;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;b&gt;Cutting and Pasting Text:&lt;/b&gt;&lt;br /&gt;
The following commands allow you to copy and paste text.&lt;br /&gt;



 
 
 
 &lt;style type=&quot;text/css&quot;&gt;
td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; }
&lt;/style&gt;

&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;tbody&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   yy&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Copy (yank, cut) the current line into the buffer&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Nyy or yNy&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Copy (yank,cut) the next N lines, including the current line,
   into the buffer&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   p&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Put (paste) the line(s) in the buffer into the text after the
   current line&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;b&gt;Other Commands:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Searching Text:&lt;/b&gt;&lt;br /&gt;



 
 
 
 &lt;style type=&quot;text/css&quot;&gt;
td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; }
&lt;/style&gt;

&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;
 &lt;col width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;tbody&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   &lt;br /&gt;
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   :wq&lt;return&gt;&lt;/return&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Quit vi, writing out modified file to file named in original
   invocation&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   &lt;br /&gt;
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   :q&lt;return&gt;&lt;/return&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Quit (or exit) vi&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   *&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   :q!&lt;return&gt;&lt;/return&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Quit vi even though latest changes have not been saved for this
   vi call&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;b&gt;Moving the cursor:&lt;/b&gt;&lt;br /&gt;
Unlike many of the PC and MacIntosh editors, the mouse does not move the cursor within the vi editor screen (or window). You must use the key commands listed below. On some UNIX platforms, the arrow keys may be used as well; however since vi was designed with the Qwerty keyboard ( containing no arrow keys) in mind, the arrow keys sometimes produce strange effects in vi and should be avoided.&lt;br /&gt;
If you go back and forth between a PC environment and a UNIX environment, you may find that this dissimilarity in methods for cursor movement is the most frustrating difference between the two.&lt;br /&gt;
In the table below the symbol ^ before a letter means that the &lt;ctrl&gt; key should be held down while the letter key is pressed.&lt;/ctrl&gt;&lt;br /&gt;



 
 
 
 &lt;style type=&quot;text/css&quot;&gt;
td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; }
&lt;/style&gt;

&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;
 &lt;col width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;tbody&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   *&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   J or &lt;return&gt; [or down-arrow]&lt;/return&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Move cursor down one line&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   *&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   K [or up-arrow]&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Move cursor up one line&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   *&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   H or &lt;backspace&gt; [ or left-arrow]&lt;/backspace&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Move cursor left one character&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   *&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   L or &lt;space&gt; [ or right-arrow]&lt;/space&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Move cursor right one character&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   *&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   0 (zero)&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Move cursor to start of current line ( the one with the cursor)&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   *&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   $&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Move cursor to end of current line&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   &lt;br /&gt;
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   w&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Move cursor to beginning of next word&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   &lt;br /&gt;
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   b&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Move cursor back to beginning of preceding word&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   &lt;br /&gt;
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   :0 &lt;return&gt; or lG&lt;/return&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Move cursor to first line in file&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   &lt;br /&gt;
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   :n &lt;return&gt; or nG&lt;/return&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Move cursor to line n&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;33%&quot;&gt;
   &lt;br /&gt;
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   :$ &lt;return&gt; or G&lt;/return&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;33%&quot;&gt;
   Move cursor to last line in file&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;b&gt;Screen Manipulation:&lt;/b&gt;&lt;br /&gt;
The following commands allow the vi editor screen ( or windows ) to move up or down several lines and to be refreshed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jitenjha.blogspot.com/feeds/6923855630863286004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1771611745557879832/6923855630863286004?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/6923855630863286004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/6923855630863286004'/><link rel='alternate' type='text/html' href='http://jitenjha.blogspot.com/2012/03/vi-editor.html' title='vi editor'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07663057837439208477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1771611745557879832.post-4640617197366756871</id><published>2012-03-05T18:53:00.000+05:30</published><updated>2012-03-05T18:53:11.597+05:30</updated><title type='text'>File System Commands</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;File System Commands&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Linux look at everything as a file. Linux file system will have tens of thousands of files. If you write a program you add one more file to the system. When you compile it you are adding at least two more.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Linux file is a storehouse of information. It is simply a sequence of charaters. linux places no restriction on the structure of the file. A file contains exactly those bytes that you out in to it, be it a source program executable code or anything else. It neither contains it&#39;s own size not it&#39;s attributes. It doesn&#39;t contain it&#39;s own name.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Although everything is treated as a file by linux it&#39;s still divided files into various categories:&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&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; Ordinary files, device files, directory files etc.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Commands:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;pwd: Checking current directory:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;When you log in you are placed in a specific directory of the file system. This directory is known as your current directory. At any time you should be able to know what your current directory. At any time, you should be able to know what your current directory is. For this we have to use the &quot;pwd&quot; command.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$pwd&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;/usr/ben&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;cd: changing directories:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;We can move around in the file system using cd command. It changes the current directory to the directory specified as the argument. For example:&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$pwd&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;/user/username&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$cd progs&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$pwd&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;/user/username/progs&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;The command cd progs means change your subdirectory to progs under the current directory. If we use absolute pathname that also the effect will be the same. You can use like this also&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;cd /user/username/progs&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
If we want to switch to the /bin&amp;nbsp; directory where most of the Unix/Linux commands are kept in that case we have to use the absolute pathname.&lt;br /&gt;
If we use &lt;b&gt;cd &lt;/b&gt;without ant argument then it reverts to the home directory.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;mkdir: Making Directories:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;We can create directories with mkdir command. This command is followed by the named of the directories to create. If we want to make the directory by the name patch.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;$mkdir patch&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
We can create number of sub directories in a single shot.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$mkdir one two three&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Unix/Linux systems lets we create directory chain with just one command. For example:&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$mkdir foo foo/one foo/two&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
This command creates three subdirectories- foo &amp;amp; two subdirectories under foo.&lt;br /&gt;
But we can&#39;t enter like this-&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$mkdir foo/one foo/two foo&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
This command failed to create two subdirectories one &amp;amp; two but still creates foo&lt;br /&gt;
directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;rmdir: Removing Directories:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;We can remove directories with rmdir command. For example:&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;$rmdir patch&lt;/b&gt;&lt;br /&gt;
Like mkdir, rmdir can also delete more than one directory in a single shot. For example:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$rmdir one two tree&lt;/b&gt;&lt;br /&gt;
Also the tree directories &amp;amp; subdirectories that we just prepared using mkdir can be removed by using rmdir with reverse set of arguments.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$ rmdir foo/one foo/two foo&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
But we can&#39;t enter like this.&lt;br /&gt;
&lt;b&gt;$rmdir foo foo/one foo/two&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
In this case, rmdir will silently delete the lowest levels of directories one &amp;amp; two. You should remember the following rules while deleting the directories.&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&quot;you can&#39;t delete the directory unless it is empty. In this case foo directory can&#39;t be removed&amp;nbsp; because of the existence of the directories one &amp;amp; two.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;You can&#39;t remove a subdirectory unless you are placed in a directory, which is hierarchically above the one you have chosen to remove.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
To understand this look at the following example.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$cd progs&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$pwd&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;/user/useraname/progs&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$rmdir progs&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;rmdir:progs:Directory does not exit.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
To remove this directory we must position ourselves in the directory above progs that is username &amp;amp; remove it from there.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$cd /user/username&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$pwd&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;/user/username&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$rmdir progs&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The mkdir and rmdir commands work with only those directories, which are owned by the user.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;ls: Listing Files:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
This command is used to list all the files in the current directory.&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$ls&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
We can see here there is a complete list of filenames in the current directory. Arranged in ASCII collating sequence with one filename in each line.&lt;br /&gt;
If you want a particular file then just use ls with particular filename.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$ls patch&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;patch&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;-x Option:Output In Multiple columns:&lt;/b&gt;&lt;br /&gt;
When we have several files then it is better to display the filename in multiple columns. So we need the -x option to produce the multi-columnar output.&lt;br /&gt;
&lt;b&gt;-F option: Identifying Directories &amp;amp; Executables:&lt;/b&gt;&lt;br /&gt;
With the help of ls command we got only the filenames, but we didn&#39;t know how many of them are directories &amp;amp; executable files. To get this -F option should be used.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$ls -F&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Note&lt;/b&gt; that the&amp;nbsp; two symbols that&amp;nbsp; tag some of the filenames the * indicates the file containing the executable code &amp;amp; the / refers to a directory.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;-a Option:Showing Hidden Files:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;ls &lt;/b&gt;command doesn&#39;t show all the files in a directory. Some of files are hidden files in every directory. This option lists all the files even hidden files also.&lt;br /&gt;
&lt;br /&gt;
All these files beginning with a &#39;.&#39; are normally not listed out only with ls.&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;-r Option: Reversing the sort order:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
We can reverse the order of the presentation of the list with the -r option. The sorting is done in the reverse ASCII collating order.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$ls -r&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The ls command will work differently if we give the two directory names with it. &lt;b&gt;$ls directory1 directory2&lt;/b&gt;&lt;br /&gt;
Here is the list of important option:&lt;br /&gt;
&lt;br /&gt;
&lt;style type=&quot;text/css&quot;&gt;
td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; }
&lt;/style&gt;

&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;tbody&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;Options&lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;Description&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;-x&lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;Display multi-columnar output&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;-r&lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;Sorts files in reverse order&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;-R 
   &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;Recursive listing of all files in subdirectories&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;-F 
   &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;Makes executables with * &amp;amp; directories with /&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;-a&lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;Shows all files including hidden ones&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;-i&lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;Shows inode number of files&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;-l&lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;Long listing showing seven attributes of flies&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;-d&lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;Force listing of directories&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;-t&lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;Sorts files by modification time&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;-u&lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;Sorts files by access time&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&amp;nbsp;
&lt;br /&gt;
&lt;b&gt;&amp;nbsp;cat : Displaying and Creating Files:&lt;/b&gt;&lt;br /&gt;
cat command is generally used to display the contents of a file.&lt;br /&gt;
&lt;b&gt;$cat filename&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&lt;b&gt;cat&lt;/b&gt; command also accepts more than one filenames&lt;br /&gt;
&lt;b&gt;$cat file1 file2&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;The contents of second file are shown immediately after the contents of first file. cat is normally used to display the text files only.&lt;br /&gt;
Using &lt;b&gt;cat &lt;/b&gt;to&lt;b&gt; create&lt;/b&gt; file:&lt;br /&gt;
cat is used for&amp;nbsp; creating files. Look at the following examples:&lt;br /&gt;
$cat&amp;gt;one&lt;br /&gt;
&lt;b&gt;This command shows the inserting of data into the files. ( Ctrl -d)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$ prompt returns&lt;/b&gt;&lt;br /&gt;
When we terminate the command line after pressing the enter key the prompt vanishes &amp;amp; now waits for input the user side. Finally press the control-d to signify the end of data input.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;cp: Copying of files:&lt;/b&gt;&lt;br /&gt;
Copy the contents of one file to another with the cp command.&lt;br /&gt;
&lt;b&gt;syntax&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;cp [options] old_filename new_filename&lt;/b&gt;&lt;br /&gt;
you now have two copies of the file, each with identical contents. They are completely independent of each other and you can edit and modify either as needed. They each have their own inode, data blocks and directory table entries.&lt;br /&gt;
&lt;br /&gt;
We can also copy files to another directory. For example&lt;br /&gt;
&lt;b&gt;cp one progs/two&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;cp&lt;/b&gt; can also be used to copy more than one file in a single shot. In that case the last filename must be a directory. For example : to copy files one, two, tree to the progs directory we have to write.&lt;br /&gt;
&lt;b&gt;$cp one two tree progs&lt;/b&gt;&lt;br /&gt;
To work this command it is necessary that progs directory should be there.&lt;br /&gt;
you can also use * metacharacter if the names having same starting characters. For example: if filename are page1, page2, page3.&lt;br /&gt;
&lt;b&gt;cp page* progs&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Common Options&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;-i : interactive ( prompt and wait for confirmation before proceeding)&lt;/b&gt;&lt;br /&gt;
$cp -i one two&lt;br /&gt;
cp:overwrite two?y/n&lt;br /&gt;
&lt;b&gt;-r: recursively copy a directory&lt;/b&gt;&lt;br /&gt;
It is possible to copy entire directory structure with this option. For example the following command copies all files &amp;amp; subdirectories from progs to newprogs.&lt;br /&gt;
cp -r progs newprogs&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;rm: Deleting files:&lt;/b&gt;&lt;br /&gt;
Remove a file with the rm, remove command.&lt;br /&gt;
&lt;b&gt;syntax&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;rm [option] filename&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;common options&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;-i : interactive ( prompt and wait for confirmation before proceeding )&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;-r : recursively remove a directory, first removing the files and&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; subdirectories beneath it.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;-f : don&#39;t prompt for confirmation (overrides -i)&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Examples:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$rm old_filename&lt;/b&gt;&lt;br /&gt;
A listing of the directory will now show that the file no longer exists. Actually all you&#39;ve done is to remove the directory table entry and mark the inode as unused. The file contents are still on the disk, but the system now has no way of identifying those data blocks with a file name. There is no command to &lt;b&gt;&quot;unremove&quot;&lt;/b&gt; a file that have been removed in this way. For this reason many novice users alias their remove command to be &lt;b&gt;&quot;rm -i&lt;/b&gt;&quot; where the -i option prompts them to answer yes or no before the file is removed.&lt;br /&gt;
&lt;b&gt;rm &lt;/b&gt;dosen&#39;t normally remove directory but removes the files from it. You can remove two files from foo directory without having to &quot;cd&quot; to it.&lt;br /&gt;
&lt;b&gt;$rm foo/one/ foo/two&lt;/b&gt;&lt;br /&gt;
sometimes it is required to delete all the files of directory then we can use the * metacharacter which represents all files. For example:&lt;br /&gt;
&lt;b&gt;$rm *&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;mv: Renaming Files:&lt;/b&gt;&lt;br /&gt;
Rename a file with the move command, &lt;b&gt;mv&lt;/b&gt;.&lt;br /&gt;
&lt;b&gt;Syntax:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;mv [option] old_filename new_filename&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Common Options:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;-i interactive (prompt and wait for confirmation before preceeding)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;-f don&#39;t prompt even when copying over and existing target file ( overrides -i )&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Example:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$mv old_filename new_filename&lt;/b&gt;&lt;br /&gt;
You now have a file called new_filename and the file old_filename is gone. Actually all you&#39;ve done is to update the directory table entry to give the file a new name. The contents of the file remain where they were.&lt;br /&gt;
&lt;b&gt;mv&lt;/b&gt; can also be used to rename a directory.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;more:Paging Output:&lt;/b&gt;&lt;br /&gt;
If the file too large to display it&#39;s contents on screen, then the contents will scroll off the screen when we view it with cat. So a pager is required more allows the user to view a file one screen at a time. To view the contents of a file page1 use the following command with the filename.&lt;br /&gt;
&lt;b&gt;$more page1&lt;/b&gt;&lt;br /&gt;
You will see the contents on the screen one page at a time. At the bottom of the screen, you will see the filename with the percentage of file content that has been viewed.&lt;br /&gt;
&lt;b&gt;more&lt;/b&gt; command also contains some internal commands-&lt;br /&gt;
&lt;b&gt;q- this command is used to exit more.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;f- to scroll forward one screen.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;b- to scroll backward one screen.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;to move even slowly only one line at a time use, j key for scrolling.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;forward and k for scrolling backward.&lt;/b&gt;&lt;br /&gt;
we can use &lt;b&gt;more&lt;/b&gt; with multiple filenames.&lt;br /&gt;
&lt;b&gt;more page1 page2 page3&lt;/b&gt;&lt;br /&gt;
you will first see the contents of the first file preceded by it&#39;s name after that the message &quot;page1:ENDS(next file: page2)&quot; and then the contents of the next file. In this way it display the contents of all the files. In between we can switch to previous or next files also using :n or :p for next and previous voyage.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;lp (Line Printing): Printing A File:&lt;/b&gt;&lt;br /&gt;
Users are not allowed to directly access the&amp;nbsp; printer. But users can spool ( or line up) a job with others in a print queue. With spooling one can orderly print the jobs relieve the user from the necessity of administering the usage of print resources. The spooling facility is provided by the &lt;b&gt;lp&lt;/b&gt; command. Take a look at following example:&lt;br /&gt;
&lt;b&gt;$lp page1&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;request id is pr1-100(1 file )&lt;/b&gt;&lt;br /&gt;
This command will print a single copy of first page. This command also gives the request id. It is the combination of printer name &amp;amp; job number.&lt;br /&gt;
If there are more than one printer in a system, we have to use the -d option with the printer name if the printer name is dotmatrix.&lt;br /&gt;
&lt;b&gt;$lp -ddotmatrix page1&lt;/b&gt;&lt;br /&gt;
The another option we can use with lp is -t ( title ) followed by the title string. this command prints the title on the first page.&lt;br /&gt;
&lt;b&gt;$lp -t &quot;first page&quot; page1&lt;/b&gt;&lt;br /&gt;
We can cancel our jobs with cancel command which requires the request id of the job as an argument.&lt;br /&gt;
&lt;b&gt;$ cancel pr1-100&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;file: To know the file types:&lt;/b&gt;&lt;br /&gt;
There are three of files. i.e. ordinary files directory files &amp;amp; device files. A regular file may contain simple text a C program or executable file. This file command is used to determine the type of file.&lt;br /&gt;
&lt;b&gt;$file filename.lst&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;filename.lst: &amp;nbsp; &amp;nbsp; &amp;nbsp; English text&lt;/b&gt;&lt;br /&gt;
This command you can use with more filename also. We can apply this command to all the files in the progs directory. Just look at the following example ( * to indicate all the files )&lt;br /&gt;
&lt;b&gt;$file /proc/*&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;wc: Line, Words and Character Count:&lt;/b&gt;&lt;br /&gt;
This command counts lines, words and characters depending on the options used. It takes one or more file name as an argument. Before you use wc command take a look at the following example&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$create a file type some lines.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$ cat &amp;gt; filename&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$wc filename&lt;/b&gt;&lt;br /&gt;
This command offers three option to make specific count. This -l counts only number of lines, -w counts number of words and -c counts number of characters.&lt;br /&gt;
&lt;b&gt;$wc -l filename&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$wc -w filename&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$wc -c filename &lt;/b&gt;&lt;br /&gt;
we can use this command with multiple file names, wc produces a separate line for each file.&lt;br /&gt;
&lt;b&gt;$ wc file1 file2 file3&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;split: Splitting a file into multiple files:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Some file are so large that some times we found difficulties in editing them. So there&#39;s a need to split them. The split command breaks up its input into several equi-line segments and all these segments are created as separate file in&amp;nbsp; the current directory. Split by default break up a file into 1000 line pieces.&lt;br /&gt;
&lt;b&gt;$split file1&lt;/b&gt;&lt;br /&gt;
This command creates a group of files xaa, xab, xac like this up to xzz. If the file is not large enough to occupy 1000 line you can override this default figure of 1000 by specifying the size.&lt;br /&gt;
&lt;b&gt;$split -101 filename&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Each file will contain 101 lines.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;cmp: Comparing Two files:&lt;/b&gt;&lt;br /&gt;
Some times two files are exactly identical to each other, in such cases you can delete one of them. There are three commands to do this comparison one of them is cmp command. this command requires two file names as an argument.&lt;br /&gt;
&lt;b&gt;$cmp file1 file2&lt;/b&gt;&lt;br /&gt;
This command compares the two files byte by byte and location of the first mismatch gives on the screen. The -l option gives a detailed list of byte number and differing bytes in octal for each character, that differs in both files.&lt;br /&gt;
&lt;b&gt;$cmp -l file1 file2&lt;/b&gt;&lt;br /&gt;
If the two files are identical the cmp does not display many message but it simple returns the $ prompt.&lt;br /&gt;
&lt;b&gt;diff: Differences in files:&lt;/b&gt;&lt;br /&gt;
The diff command compares two files, directories, etc and reports all differences between the two. It deals only with ASCII files. It&#39;s output format is designed to report the changes necessary to convert the first file into the second.&lt;br /&gt;
&lt;b&gt;Syntax:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;diff [option] file1 file2&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Common Options&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;-b ignore trailing blanks&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;-i ignore the case of letters&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;-w ignore &lt;space&gt; and &lt;tab&gt; characters&lt;/tab&gt;&lt;/space&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;-e produce and output formated for use with the editor, ed&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;-r apply diff recursively through common sub-directories&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Examples:&lt;/b&gt;&lt;br /&gt;
For the file1 and file2 files, the difference between them:&lt;br /&gt;
&lt;b&gt;&amp;nbsp;Note&lt;/b&gt; that the output lists the differences as well as in which file the difference exists.&lt;br /&gt;
Lines in the first file are preceded by &quot;&amp;lt;&quot;, and those in the second file are preceded by &quot;&amp;gt;&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;File Permissions:&lt;/b&gt;&lt;br /&gt;
Each file, directory and executable has permission set for who can rad, write, and/or execute it. To find the permissions assigned to a file, the ls command with the -l option should be used. Also using the -g option with &quot;ls -l&quot; will help when it is necessary to know the group for which the permissions are set ( BSD only ).&lt;br /&gt;
When using the &quot;ls -lg&quot; command on a file ( ls -l on sysV), the output will appear as follows.&lt;br /&gt;
&lt;b&gt;-rwx-r-x--- user unixgroup size month nn hh:mm filename&lt;/b&gt;&lt;br /&gt;
The are above designated by letters and dashes ( -rwx-r-x---) is the area showing the file type and permissions. Therefore, a permission string for example of -rwx-r-x--- allows the use ( owner ) of the read, write and execute it; those in the unixgroup of the file can rad and execute it; others cannot access it at all.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Chmod - Change File Permissions:&lt;/b&gt;&lt;br /&gt;
The command to change permissions on an item ( file, directory, etc) is chmod ( changes mode). The syntax involves using the command with three digits ( representing the user ( owner, u) permission, the group (g) permissions, and other (o) user&#39;s permissions) followed by the argument (which may be a file name or list of files and directories). Or by using symbolic representation for the permissions and who they apply to.&lt;br /&gt;
Each of the permission types is represented by either a numeric equivalent:&lt;br /&gt;
&lt;b&gt;read=4, write=2, execute=1&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;or single letter:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;read-=r, write=w, execute=x&lt;/b&gt;&lt;br /&gt;
A permission of 4 or r would specify read permissions. If the permission desired are read and write, the 4 (representing rad) and the 2 (representing write) are added together to make a permission of 6. Therefore, a permission setting of 6 would allow read and write permissions.&lt;br /&gt;
Alternatively you could use symbolic notation which uses the one letter representation for who and for the permissions and an operator, where the operator can be:&lt;br /&gt;
&lt;b&gt;+ add permissions&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;- remove permissions&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;= set permissions&lt;/b&gt;&lt;br /&gt;
So to set read and write the owner we could use &quot;u=rw&quot; in symbolic notation.&lt;br /&gt;
&lt;b&gt;Syntax:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$ chmod nnn [argument list] numeric mode&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$ chmod [ who]op[prem] [argument list] symbolic mode&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
Where nnn are the three numbers representing user, group and other permissions, who is any u, g, o or a (all) and perm is any of r, w, x . In symbolic natation you can separate permission specifications by commas as shown in the example below.&lt;br /&gt;
&lt;b&gt;Common Options:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;-f force (no error message is generated if the change is unsucessful)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;-R recursively descend through the directory structure and change the modes.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Example:&lt;/b&gt;&lt;br /&gt;
If the permission desired for file1 is user: read, write, execute, group: read, execute, other: rad, execute the command to use would be&lt;br /&gt;
&lt;b&gt;$ chmod 755 file2 or chmod u=rwx,go=rx file1&lt;/b&gt;&lt;br /&gt;
Reminder: When giving permissions to group and other to use a file, it is necessary to allow a least execute permission to the directories for the path in which the file is located. The easiest way to do this is to be in the directory for which permissions need to be granted.&lt;br /&gt;
&lt;b&gt;chmod 7111. or chmod u=rw,+x. or chmod u=rwx.go=x.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;where the dot (.) indicates this directory.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Shell&lt;/b&gt;&lt;br /&gt;
Shell is command interpreter that execute commands. A Unix shell is both a command interpreter, which provides the user interface to the rich set of unix utilities, and a programming language allowing these utilities to be combined. Files containing commands can be created and become commands themselves. These new commands have the same status as system command in directories like &#39;/bin&#39;, allowing users or groups to establish custom environments.&lt;br /&gt;
A shell allows execution of unix command both synchronously and asynchronously. The shell waits for synchronous commands to complete before accepting more input; asynchronous commands continue to execute in parallel with the shell while it reads and executes additional commands. The redirection construct permit fine-grained control of the input and output of those commands and the shell allows control over the contents of their environment. Unix shells also provide a small set of built in commands ( builtins ) implementing functionality impossible ( e.g. cd, break, continue and exec ), or inconvenient ( history, getopts, kill or pwd for example ) to obtain via separate utilities. Shells may be used interactively or non-interactively they accept input typed from the keyboard or from a file.&lt;br /&gt;
While executing commands is essential most of the power ( and complexity ) of shells is due to their embedded programming languages. Like any high-level language, the shell provides variables flow control constructs, quoting and functions.&lt;br /&gt;
Shells have begun offering features geared specifically for interactive use rather than to augment the programming language. These interactive features include job control command line editing history and aliases.&lt;br /&gt;
Shell Operations:&lt;br /&gt;
The following is a brief description of the shell&#39;s operation when it reads and executes a command. Basically the shell does the following:&lt;br /&gt;
Reads it input from a file, from a string supplied as an argument to the &#39;-c&#39; invocation or from the user&#39;s terminal.&lt;br /&gt;
Breaks the input into words and operators, obeying the quoting rules. These tokens are separated by metacharacters. Alias expansion is performed by this step.&lt;br /&gt;
Parses the tokens into simple and compound commands.&lt;br /&gt;
Performs the various shell expansions, breaking the expanded tokens into lists of filenames and commands and arguments.&lt;br /&gt;
Performs any necessary redirections and removes the redirection operators and their operands from the argument list.&lt;br /&gt;
Executes the command.&lt;br /&gt;
Optionally waits for the command to complete and collects its exit status.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;comments:&lt;/b&gt;&lt;br /&gt;
In a non-interactive shell or an interactive shell in which the interactive_comments option to the shops built in is enabled a word beginning with &#39;#&#39; causes that word and all remaining characters on that line to be ignored. An interactive shell without the interactive_comments option enable does not allow comments. The interactive_comments option is on by default in interactive shells.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Pipelines:&lt;/b&gt;&lt;br /&gt;
A pipeline is a sequence of simple commands separated by &#39;|&#39;. The formate for a pipeline is -&lt;br /&gt;
&lt;b&gt;[time [-p]] [!] command1 [|command2..]&lt;/b&gt;&lt;br /&gt;
The output of each command in the pipeline is connected to the input of the next command. That is each command reads the previous command&#39;s output.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Pattern Matching : Wild cards:&lt;/b&gt;&lt;br /&gt;
Up to this point we used certain commands with more than one filename (e.g., page1 page2, page3) as arguments. Often you may require to enter a number of such filenames in the command line. To illustrate this look at the following examples:&lt;br /&gt;
&lt;b&gt;$ls -l file1 file2 file3&lt;/b&gt;&lt;br /&gt;
Each filename has a common string viz., page.&amp;nbsp; But this command line requires lot of typing work &amp;amp; doesn&#39;t look good. Fortunately shell offers solution to this.&lt;br /&gt;
&lt;b&gt;The * And ?&lt;/b&gt;&lt;br /&gt;
this * is known as metacharacter. this character matches any number of characters. When this character is appended to the string page the pattern page *&amp;nbsp; expands in to all files in which first four characters constitute to string page. The previous command line can now be shortened with this sequence.&lt;br /&gt;
&lt;b&gt;$ ls -l file*&lt;/b&gt;&lt;br /&gt;
Now when shell encounters the above command line it looks for metacharacters &amp;amp; identifies the * immediately. It then matches all the files in the current directory with the pattern page start and replace the pattern with the list that matches the pattern. It then reconstructs the command line as below &amp;amp; passes it to the kernel for execution.&lt;br /&gt;
&lt;b&gt;$ls -l file1 file2 file3&lt;/b&gt;&lt;br /&gt;
The next character is ? , which matches a single character. When used with the same string page (page?) the shell matches all five character filenames beginning with page. Placing another? at the end of this string creates the pattern page?? where page is followed by two characters. Look at the following example.&lt;br /&gt;
&lt;b&gt;$ls -x file?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Pattern Matching&lt;/b&gt;&lt;br /&gt;
Any character that appears in a pattern other than the special pattern characters described below, matches itself. The NULL character may not occur in a pattern. The special pattern characters must be quoted if they are to be matched literally.&lt;br /&gt;
&lt;b&gt;The special pattern characters have the following meanings:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;* Matches any string including the null string.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;? Matches any single character.&lt;/b&gt;&lt;br /&gt;
[...] Matches any one of the enclosed characters. A pair of characters separated by a minus sign denotes a range; any character lexically between those two character, inclusive is matched. If the first character following the `[&#39;is a ` !&#39; or a `^&#39; then any character not enclosed is matched. A `_&#39; may be matched by including it as the first or last character in the set. A `}&#39; may be matched by including it as the first character in the set. Within `[&#39; and `]&#39; , character classes can be specified using the syntax [:class:], where class is one of the following classes defined in the POSIX.2 standard:&lt;br /&gt;
alnum alpha ascii blank cntrl digit graph lower print punct space upper sdigit&lt;br /&gt;
A character class matches any character belonging to that class. Within `[&#39; and `]&#39;, an equivalence class can be specified using the syntax [=c=], which matches all characters with the same collation weight ( as defined by the current locale ) as the character c. Within `[&#39; and `]&#39;, the syntax [.symbol.] matches the collating symbol symbol.&lt;br /&gt;
If the extglob shell option is enable using the shopt built in, several extended pattern-matching operators are recognized. In the following description, a pattern-list is a list of one or more patterns separated by a `|&#39;. Composite patterns may be formed using one or more of the following sub-patterns:&lt;br /&gt;
&lt;b&gt;? ( pattern-list)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Matches zero or one occurrence of the given patterns.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;* ( pattern-list)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Matches zero or more occurrences of the given patterns.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;+ ( pattern-list)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Matches one or more occurrences of the given patterns.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;@&amp;nbsp; ( pattern-list)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Matches exactly one of the given patterns.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;! ( pattern-list)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; Matches anything except one of the given patterns.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;When Wild - Cards lose their meaning:&lt;/b&gt;&lt;br /&gt;
The metacharacters * and ? lose their meaning when used inside the class &amp;amp; are matched literally. Similarly - &amp;amp; ! also lose their significance when placed outside the class. Additionally ! loses it&#39;s meaning when placed anywhere but at the beginning of the class. The - loses it&#39;s meaning if it is not bounded properly on either side by a single character.&lt;br /&gt;
&lt;b&gt;Matching the Dot:&lt;/b&gt;&lt;br /&gt;
The * doesn&#39;t match all the files beginning with a . (dot) or the / of a pathename. If you want to list all the hidden files in your directory having at least 3 characters after the dot, then the dot or the must be matched explicitly.&lt;br /&gt;
&lt;b&gt;$ls -x .???*&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;When using rm with *:&lt;/b&gt;&lt;br /&gt;
We use these metacharacter to speed up our interaction with the system but there are great risks involved if you are not alert. When using shell metacharacters&amp;nbsp; especially the *, you could be totally at sea if instead of typing&lt;br /&gt;
&lt;b&gt;$rm file*&lt;/b&gt;&lt;br /&gt;
Which removes all file. You inadvertently introduces space.&lt;br /&gt;
&lt;b&gt;$rm file * ( space between page and * )&lt;/b&gt;&lt;br /&gt;
Even if there is not file named file in the current directory, and you get an error message to indicate that the command will still removed all files in this directory because of singular existence of *. This happens because shell rightly treats the * as a separate argument.&lt;br /&gt;
&lt;b&gt;Escaping: The Backslash (\):&lt;/b&gt;&lt;br /&gt;
It is generally accepted principle that file names should not contain the shell meta characters. What happens if we do that imagine a file named page* created with the &amp;gt;.&lt;br /&gt;
&lt;b&gt;Symbol:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$&amp;gt;file*&amp;nbsp;&amp;nbsp;&amp;nbsp; # you can create any empty file like this&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
How do we remove this file without deleting other files. ( If we have other files named&amp;nbsp; file1, file2, file3). the shell uses another characters \(Backslash), to remove the special meaning of any metacharacter placed after it. Here the shell has to be told that the asterisk has to treated &amp;amp; matched literally, instead of being interpreted as metacharacter use the \ before * to solve&amp;nbsp; the problem.&lt;br /&gt;
&lt;b&gt;$ ls -x file\*&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;file*&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$ rm file\*&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Escaping The &amp;lt; ENTER&amp;gt; Key:&lt;/b&gt;&lt;br /&gt;
When you enter a long chain of commands you can split the command line by hitting enter key. But only after the \ escapes this key.&lt;br /&gt;
&lt;b&gt;$wc -l file1 \ ( Enter)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;gt; file2 file3 ( Press Enter )&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Quoting:&lt;/b&gt;&lt;br /&gt;
What happens when we enter a shell metacharacter with echo command as below:&lt;br /&gt;
&lt;b&gt;$echo *&lt;/b&gt;&lt;br /&gt;
showing files and directories&lt;br /&gt;
&amp;nbsp;You simply see list of all files in the current directory. Why that happens? The shell uses the * meta character to match the files in the current directory. All files matched so you see all of them in the output. Suppose you intend to literally echo a * without permitting the shell to interfere. Escaping with a \, solves the problem.&lt;br /&gt;
&lt;b&gt;$echo \*&lt;/b&gt;&lt;br /&gt;
There is another solution. When the argument to a command is enclosed in quotes the meaning of all special characters are turn off.&lt;br /&gt;
&lt;b&gt;$echo &#39;*&#39; ( you can use double quotes also )&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Quoting Preserves Spaces:&lt;/b&gt;&lt;br /&gt;
Whenever a shell finds contiguous spaces &amp;amp; tabs in the command line, it compresses them to a single space. Look at the following example:&lt;br /&gt;
&lt;b&gt;$echo write one or two lines with so many space.&lt;/b&gt;&lt;br /&gt;
The above arguments to echo could have been preserved by escaping the space character, whenever it occurs at least twice.&lt;br /&gt;
&lt;b&gt;$ echo dflfjdasl\ \ \sdafsda\ \ \sdfsad\ \&amp;nbsp;&amp;nbsp;&amp;nbsp; \sdfsad\.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;In this situation quoting is recommended.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$echo &quot;sdfklsajlfjsadl;&quot;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;grep: Searching For A Pattern:&lt;/b&gt;&lt;br /&gt;
grep is one of the most useful unix filter. It scans the file for a specific occurrence of a pattern, and displays the selected pattern the filenames where that pattern occurs or the line number in which they found. The syntax for it is as follows- grep option pattern filename (s)&lt;br /&gt;
Look at the following example&lt;br /&gt;
&lt;b&gt;$ps -aux | gerp firefox&lt;/b&gt;&lt;br /&gt;
grep when unable to find the required pattern then it silently returns the prompt. Take a look at this -&lt;br /&gt;
&lt;b&gt;$ grep production record1.lst&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$- &amp;nbsp;&amp;nbsp; #No production person found&lt;/b&gt;&lt;br /&gt;
It is generally safe to quote the pattern though always it is not required. Quoting is essential if the search string consist of more than one word. Try the following example -&lt;br /&gt;
&lt;b&gt;$grep baiju damoder record.lst&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;gerp:can&#39;t open damodar&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;gerp interprets damodar as a filename and so unable to open that file. but still searches the record1.lst and gives the result. To correct this problem you quote the pattern just like -&lt;br /&gt;
&lt;b&gt;$ grep &#39;jiten&#39; record1.lst&lt;/b&gt;&lt;br /&gt;
When we use grep with a series of string it interprets the first arguments as the pattern &amp;amp; the rest as filenames. It then displays along with the output.&lt;br /&gt;
&lt;b&gt;$grep manager record1.lst record2.lst&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;grep options:&lt;/b&gt;&lt;br /&gt;



 
 
 
 &lt;style type=&quot;text/css&quot;&gt;
td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; }
&lt;/style&gt;

&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;tbody&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Option 
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Significance 
   &lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   -c&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Displays count of number of occurances&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   -l&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Displays list of filename only&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   -n&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Display line number along with lines&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   -v&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Displays all but lines matching expressions&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   -i&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Ignores care for matching&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   -h&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Omits filenamewhrn handling multiple files&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   -n&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Display line &amp;amp; n lines above &amp;amp; below&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&amp;nbsp;
&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jitenjha.blogspot.com/feeds/4640617197366756871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1771611745557879832/4640617197366756871?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/4640617197366756871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/4640617197366756871'/><link rel='alternate' type='text/html' href='http://jitenjha.blogspot.com/2012/03/file-system-commands.html' title='File System Commands'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07663057837439208477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1771611745557879832.post-774210928488001363</id><published>2012-02-29T18:01:00.000+05:30</published><updated>2012-02-29T18:01:02.810+05:30</updated><title type='text'>User and Group Management</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;User and Group Management&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Description: &lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Managing user accounts in linux is of paramount importance as users need an ID just to login to the system. Create, Delete and Change user attributes.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Introduction: &lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Linux being a multi-user, multitasking operating system, needs every user to possess a user name and a password. So to efficiently use linux we first need to know the process of creation of users and using the created users to logon and logout of the system.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
We summaries a few points regarding user accounts.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Linux operating system is case sensitive. This imposes that we use commands in the lower case to get our work done. Command typed upper-case will throw errors.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Every on a Linux system needs a user account. &lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Every account has right ans privileges that very depending on the command and the directory.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Linux users are organized into groups.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;In RHEL user accounts are organized in the &#39;/etc/passwd&#39; file.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Their passwords are made more secure by the use of the &#39;/etc/shadow&#39; file.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;When creating a new account the default parameters are configured in the &#39;/etc/login.defs&#39; file.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Configuration files are stored in another directory from where the files are copied to the user&#39;s home directory while the user is created.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Introduction to files that relate to the users of a system:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;/etc/passwd&lt;/b&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&amp;nbsp;Linux users are classified into three types&lt;/li&gt;
&lt;/ul&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Administrative (root)&lt;/li&gt;
&lt;li&gt;Regular&lt;/li&gt;
&lt;li&gt;Service&lt;/li&gt;
&lt;/ol&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;The administrative root account is automatically created when you install linux which has administrative privileges for all services on your linux box.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Regular users have the necessary privileges to perform standard task on linux computer. They can access programs such as word processors, databases and web browsers. They can store files in their home directories only.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Services such as Apache, ftp, Squid, nail, games, audio etc. have their own individual service accounts.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;each column in the &#39;/etc/passwd&#39; file is delimited by a colon(:)&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;



 
 
 
 &lt;style type=&quot;text/css&quot;&gt;
td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; }
&lt;/style&gt;

&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;
 &lt;col style=&quot;text-align: left;&quot; width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;text-align: left;&quot; width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;text-align: left;&quot; width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;tbody style=&quot;text-align: left;&quot;&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Column&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Function&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Comment&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   1&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Username 
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Login name of the account&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   2&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Password 
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   If this field contains an X, the encrypted password is stored
   in /etc/shadow&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   3&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   UserID 
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   A numeric ID for the usr. Assigned by the OS&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   4&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   GroupID 
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   A numeric ID for the default group of the user. Assigned by the
   OS&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   5&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Extra Information&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Commonly used for the user&#39;s ral name. Can be any comment on
   the account&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   6&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Home directory&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   The path to the user&#39;s home directory&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   7&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Defaulty shell&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   The shell the user sees after logging in&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&amp;nbsp;&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;/etc/shadow&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;This is the file that holds the password information of the users of the machine.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;It is a read-only file for the root and no permissions are afforded for anyone else. Hence it is more secure.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;If you use standard command to create new users, basic information is also added to this file based on the defaults in the &#39;/etc/login.def&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;



 
 
 
 &lt;style type=&quot;text/css&quot;&gt;
td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; }
&lt;/style&gt;

&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;
 &lt;col style=&quot;text-align: left;&quot; width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;text-align: left;&quot; width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;text-align: left;&quot; width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;tbody style=&quot;text-align: left;&quot;&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Column&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Function&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Comment&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   1&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Username 
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Login name&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   2&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Password 
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   The encrypted password. Blank if the user has no password. A *
   signifies a password has not been defined. If the useris disable
   from logging in to the system an ! Is displayed.&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   3&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Number of days&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Last  time the password was chagned in days after january
   1,1970&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   4&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Minimum password life&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   You can&#39;t change the password for at least this amount of time
   in days.&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   5&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Maximum password life&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   You have to change the password after this period of time in
   days&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   6&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Warning period&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   You get a warning this name days before your password expires&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   7&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Disable account&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   If you don&#39;t use your account this many days after your
   password expires, you can&#39;t log in&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   8&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Account expiration&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   If you don&#39;t use your account by this date, you won&#39;t be able
   to log in. Maybe in yyyy-mm-dd format or in number of days after
   january 1,1970&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&amp;nbsp;&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;/etc/skel&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Users have a default set of configuration files and directories.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;The default list of these files is located in the &#39;/etc/skel&#39; directory.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;you can see the files by listing the hidden contents of the skel directory.&amp;nbsp;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;All new users will get a copy of these&amp;nbsp; files in their home directories.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;



 
 
 
 &lt;style type=&quot;text/css&quot;&gt;
td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; }
&lt;/style&gt;

&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;
 &lt;col style=&quot;text-align: left;&quot; width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;text-align: left;&quot; width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;tbody style=&quot;text-align: left;&quot;&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;50%&quot;&gt;
   Files&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;50%&quot;&gt;
   Purpose 
   &lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;50%&quot;&gt;
   .bashrc&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;50%&quot;&gt;
   The basic bash cofiguration file. May include a reference to
   the general /etc/bashrc&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;50%&quot;&gt;
   .bash_logout&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;50%&quot;&gt;
   A file executed when you exit a bash shell. Can include
   commands appropriate for this purpose, such as clearing your
   screen&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;50%&quot;&gt;
   .bash_profile&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;50%&quot;&gt;
   Configures the bash start up environment. Appropriate place to
   add environment variables or to modify the directories in your
   PATH&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;50%&quot;&gt;
   .gnome*&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;50%&quot;&gt;
   Servral directories that include start up setting for the GNOME
   desktop environment. For example, details of desktop icons such as
   Trash are stored in .gnome-desktop/Trash&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;50%&quot;&gt;
   .gtkrc&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;50%&quot;&gt;
   Adds the bluecurve theme for the default Red Hat GUI&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;50%&quot;&gt;
   .kde&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;50%&quot;&gt;
   A dirctory that includes auto start setting for the K Desktop
   environment. Not copied to the users home directories if you
   haven&#39;t installed KDE in the computer.&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;/etc/login.defs&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;When you create a new user the basic parameters come from the /etc/login.defs configuration file.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;The version included with RedHat Linux includes settings for&lt;/li&gt;
&lt;/ul&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Email directories&lt;/li&gt;
&lt;li&gt;Password directories&lt;/li&gt;
&lt;li&gt;UserID numbers&lt;/li&gt;
&lt;li&gt;GroupID numbers&lt;/li&gt;
&lt;li&gt;Creating a home directory&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Adding Users - Creating and management of user account :&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Login/Logout, Shutting down, Restarting a System and using commands to add users&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;To logon to the system you should enter username and password&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;login: username&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;password: **********&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&amp;nbsp;To create a user&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;#useradd username ( Read man page for more controlled user creation )&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;#man useradd&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;To set the password for the newly created user&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;#passwd username&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;To log off the system and enter as a new user&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;#exit&lt;/b&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;To shut-down a system&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;#init 0&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;#shutdown -h now&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;#poweroff&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;To restart a system&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;#init 6&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;#shutdown -r now&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;#reboot&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Editing the /etc/passwd file directly:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Open the /etc/passwd file for editing using a text editor.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;# vim /etc/passwd&lt;/b&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Start a new line. the easiest way to do this is by copying the applicable information from a current user.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Substitute the information of your choice to create the new user.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;For example change the user name as testuser, UID as 1010, GID as 1010, full name as &quot;This is a test user&quot; ( less the quotes), /home/testuser as the home directory.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Save and Exit.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Open the /etc/shadow file for editing using a test editor.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;# vim /etc/shadow&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Create a new line by copying the applicable information from a current user.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Change the group name as testuser and GID as 1010.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Save and exit.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Set up your new user&#39;s home directory.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;#mkdir -p /home/testuser&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Give the new user access to his home directory.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;# chown testuser:testuser /home/testuser&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Assign a new password with passwd command&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;# su -testuser&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Copy the basic initialization files which are normally stored in the /etc/skel directory.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;#cp -r /etc/skel/ /home/testuser&amp;nbsp; &lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;#cd /home/testuser&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;#mv /etc/skel/* .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ---------------------------&amp;gt; (ignore error message)&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;#mv /etc/skel/.* .&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;#rmdir skel&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Change the Ownership of the files and directories copied to the home directory of the user.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;#chown testuser:testuser /home/testuser /home/testuser&lt;/b&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Logout from the user&#39;s account.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Assuming you&#39;re using the default shadow password suite, run the pwconv and grpconv commands.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Deleting user account by deleting entries in the files:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Delete the user&#39;s entry from the /etc/passed file.&lt;/li&gt;
&lt;li&gt;Delete the user&#39;s entry from the /etc/group file.&lt;/li&gt;
&lt;li&gt;Delete the user&#39;s entry from the /etc/shadow file.&lt;/li&gt;
&lt;li&gt;Delete the user&#39;s entry from the /etc/gshadow file.&lt;/li&gt;
&lt;li&gt;Delete the user&#39;s home directory after saving the files you need.&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Commands:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Useradd -u 1010 -g 1010 -s /bin/bash -d /home/testuser -m testuser&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
#useradd username&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
#useradd -u UID username&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
#useradd -g GID username&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
#useradd -G &lt;group&gt; username&lt;/group&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
#useradd -c &lt;comment&gt; username&lt;/comment&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
#useradd -s &lt;default shell=&quot;&quot;&gt; username&lt;/default&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
#useradd -e &lt;date account=&quot;&quot; expiry=&quot;&quot; of=&quot;&quot;&gt; username&lt;/date&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
#useradd -d &lt;path directory=&quot;&quot; for=&quot;&quot; home=&quot;&quot;&gt; username&lt;/path&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
#useradd -m username {to create the home directory if it does not exist}&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Usermod -l -L -U&lt;/b&gt;:&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
usermod -l&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {to change the user login name}&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
usermod -L&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { to lock a user account}&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
usermod -U&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {to unlock user accounts}&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;change:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
chage&amp;nbsp; -m &lt;day&gt; &lt;user&gt;&amp;nbsp;&amp;nbsp; { sets minimum life of password to days}&lt;/user&gt;&lt;/day&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
chage&amp;nbsp; -M &lt;days&gt;&lt;user&gt;&amp;nbsp;&amp;nbsp; { sets maximum life of password to days}&lt;/user&gt;&lt;/days&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
chage&amp;nbsp; -I &lt;days&gt;&lt;user&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {sets the number of days that an account can be &lt;/user&gt;&lt;/days&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&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;&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; inactive before it is locked} &lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
chage -W &lt;days&gt;&lt;user&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {sets an advance warning in says of an upcaming&lt;/user&gt;&lt;/days&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&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;&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; mandatory password change}&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
chage -l &lt;user&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; {list the current user password information. can be&amp;nbsp;&lt;/user&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&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;&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; used by regular users on their own accounts}&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;The Shadow password Suite:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;The Shadow Password Suite features all of the commands related to managing Linux users and groups.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;By default RedHat Linux uses this suite to provide additional security through encrypting passwords in the /etc/shadow and the /etc/gshadow files.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;These files require commands to convert passwords to and from the companion /etc/passwd and the /etc/group configuration files.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;These encrypted password files have more restrictive permissions than /etc/passwd or /etc/group; only the root user is allowed to only view these files and they are not writable by default.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;b&gt;Converting User Passwords:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Two commands are associated with converting user password in the shadow password suite.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;pwconv&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;pwunconv&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;pwconv:&lt;/b&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Converts an existing /etc/passwd file. Passwords that currently exist in the /etc/passwd are replaced by a &quot;x&quot; the encrypted password, username, and the other relevant information are transferred to the /etc/shadow file.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;If you&#39;ve recently added new users by editing the /etc/passwd file in a text editor you must run this command again to convert the passwords associated with any new users.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;pwunconv:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Password are transferred back to the /etc/passwd, and the /etc/shadow file is deleted.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Be careful as this also deletes any password aging information.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;/etc/group:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Every linux user is assigned to a group.&lt;/li&gt;
&lt;li&gt;By default every user gets their own private group.&lt;/li&gt;
&lt;li&gt;This file has four columns as follows&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;



 
 
 
 &lt;style type=&quot;text/css&quot;&gt;
td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; }
&lt;/style&gt;

&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;
 &lt;col style=&quot;text-align: left;&quot; width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;text-align: left;&quot; width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;text-align: left;&quot; width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;tbody style=&quot;text-align: left;&quot;&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Column&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Function&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Comment&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   1&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Group name&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   By default red hat users are members of a group with their
   username&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   2&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Password&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   If you see and &#39;x&#39; in this column, see /etc/gshadow for the
   actual encrypted password&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   3&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   GroupID 
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   By default redhat users have a GID same as their UID&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   4&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Members 
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Includes the usrnames of others that are the members of the
   group&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;/etc/gshadow:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;The RHEl /etc/gshadow configuration file for the group is analogous to the /etc/shadow file for users.&lt;/li&gt;
&lt;li&gt;It specifies an encrypted password for applicable group, as well as administrators with privileges for a specific group.&lt;/li&gt;
&lt;li&gt;This file has four columns as follows&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;



 
 
 
 &lt;style type=&quot;text/css&quot;&gt;
td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; }
&lt;/style&gt;

&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;
 &lt;col style=&quot;text-align: left;&quot; width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;text-align: left;&quot; width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;text-align: left;&quot; width=&quot;85*&quot;&gt;&lt;/col&gt;
 &lt;tbody style=&quot;text-align: left;&quot;&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Column&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Function&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Comment&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   1&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Group name&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   You can create additional groups.&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   2&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Password 
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   The encrypted group password, added with the gpasswd command.&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   3&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Group Administrator&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   The user is allowed to manage users in that group.&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;text-align: left;&quot; valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   4&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Group Members&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;text-align: left;&quot; width=&quot;33%&quot;&gt;
   Includes the usernames that are the members of the same group.&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Group Commands:&lt;/b&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;#groupadd -g GID &lt;groupname&gt;&lt;/groupname&gt;&lt;/li&gt;
&lt;li&gt;#groupadd -n &lt;newname&gt;&lt;groupname&gt;&lt;/groupname&gt;&lt;/newname&gt;&lt;/li&gt;
&lt;li&gt;#groupdel &lt;groupname&gt;&lt;/groupname&gt;&lt;/li&gt;
&lt;li&gt;#groups &amp;lt; username&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {displays the group memberships that the&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ul&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;&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; user&amp;nbsp; has}&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;#id&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; { to get ID information}&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jitenjha.blogspot.com/feeds/774210928488001363/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1771611745557879832/774210928488001363?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/774210928488001363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/774210928488001363'/><link rel='alternate' type='text/html' href='http://jitenjha.blogspot.com/2012/02/user-and-group-management.html' title='User and Group Management'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07663057837439208477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1771611745557879832.post-3192554563952413318</id><published>2012-02-28T15:07:00.000+05:30</published><updated>2012-02-28T15:07:15.798+05:30</updated><title type='text'>RedHat Package Management</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Red Hat Package Management&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Description :&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Every user of a linux system needs to install or remove software in his system. There are a few methods available by which one can install software into Red Hat Linux. One method is to user the source tarballs to install the packages into linux and the second method is to user per-compiled binaries into the system. These are usually called as RPM and in Debian it is call DPKG packages.&lt;br /&gt;
Red Hat package Management utility to install and remove packages from a Linux system.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Introduction:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Generally a package&#39;s name&amp;nbsp; will be in the following format.&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;packagename.version.release.architecture.rpm&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Eg. firefox-4.0rc2.tar.bz2,firefox.9.0.0.1-0.1.mga1.x86_64.rpm&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Redhat&amp;nbsp; Linux includes a tool name rpm to administer the software packages. Using rpm command you can:&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Installing Packages&lt;/li&gt;
&lt;li&gt;Upgrading Packages&lt;/li&gt;
&lt;li&gt;Removing packages&lt;/li&gt;
&lt;li&gt;Querying Packages&lt;/li&gt;
&lt;li&gt;Removing Packages&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;Command Syntax: root@linux:~#rpm -I [option] package&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Package is the complete name of the package to be installed. The options refine the installation process. The options are explained below.&lt;br /&gt;
&lt;br /&gt;
-v &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; Turn on verbosity. Shows some useful information during the&amp;nbsp;&amp;nbsp;&lt;br /&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; installation.&lt;br /&gt;
&amp;nbsp;-h&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; Print up to 50 hash marks (#) to illustrate the progress of the&amp;nbsp;&lt;br /&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; package installation.&lt;br /&gt;
&amp;nbsp;--force&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Install the package even if it already is installed, install an older&amp;nbsp;&lt;br /&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; version or replace files already installed.&lt;br /&gt;
--nodeps&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Do not perform dependency checks before installing or upgrading&amp;nbsp;&amp;nbsp;&lt;br /&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; a package.&lt;br /&gt;
--test&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Do not install the package or upgrade the database, just identify&amp;nbsp;&amp;nbsp;&lt;br /&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; and display possible conflicts or dependency errors.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;In your installation CD-ROM RPMs are stored under REDHAT/RPMS directory. For installing software packages from the installation CD-ROM do the following steps.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Installing Packages:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Insert the CD-ROM in the drive mount the cdrom and select the package to install. Alternatively you can change your directory to the place where the RPMs have been downloaded.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;#mount /dev/cdrom /mnt/cdrom or /media/cdrom&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;#cd /mnt/cdrom&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;#rpm -ivh firefox.9.0.0.1-0.1.mga1.x86_64.rpm&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;The next example shows the error generated by trying to install a package which is already installed. To work around we use the &#39;--force&#39; option.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;#rpm -ivh firefox.9.0.0.1-0.1.mga1.x86_64.rpm&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;#rpm -ivh --force firefox.9.0.0.1-0.1.mga1.x86_64.rpm&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Upgrading Packages:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The option for upgrading existing RPMs comes in 2 flavour , -U for gpgrade and -F for freshen. Upgrade will install the package even if an earlier version is not currently installed, but freshening package installs only if an earlier version is currently installed.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;#rpm -Uvh firefox.9.0.0.1-0.1.mga1.x86_64.rpm&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Note:&lt;/b&gt; You can use a program called &#39;alien&#39; to convert between packages like rpm, dpkg, stampede sle and slackware tgz file formats.&lt;br /&gt;
&lt;br /&gt;
The following table illustrates methods of using the RedHat Package Manager.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;


 
 
 
 &lt;style type=&quot;text/css&quot;&gt;
td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; }
&lt;/style&gt;

&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;tbody&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Question&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   RPM Command&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   How do I install a new package or upgrade it if it already
   exists?&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   #rpm -Uvh package.rpm&lt;br /&gt;

   &lt;br /&gt;
   &lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   If I have a diretory containing updated packages, how do I
   insatll the only the ones that are currently in my system?&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   #rpm -Fvh *.rpm&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   How do I delete an insallted packase from my computer?&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   #rpm -e package&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   How do I see a list of all installed packages on my computer&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   #rpm -qa | less&lt;br /&gt;

   &lt;br /&gt;
   &lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   I don&#39;t know what a certain installed package does. How can I
   get it to tell me about itself?&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   #rpm -qi package&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   How do I ask what files were installed by a package?&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   #rpm -ql package&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   There&#39;s a file in my system called /apth/to/file. How can i
   find out which package installed it?&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   #rpm -qf /path/to/file&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   How do I find out which package installed /apth/to/file and how
   do I get information on that package and see the other file that
   were installed by the package&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   #rpm -qifl /path/to/file&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   I delete a few files by accident but I don&#39;t know what are
   they. Can RPM chow me which files in its database are now missing?&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   #rpm -Va&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &#39;#rpm -Va&#39; is taking a log time. How do I just verify that a
   certain package is OK?&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   #rpm -Vv package&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   I&#39;ve downloaded an RPM package containing source code. How do I
   make a binary RPM out of it and then install it?&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   #rpm -ivh package.src.rpm&lt;br /&gt;

   #cd /usr/src/redhat/SPECS/&lt;br /&gt;

   #rpmbuild -ba package.spec&lt;br /&gt;

   #cd /usr/src/redhat/RPMS/i386&lt;br /&gt;

   #rpm -ivh package.rpm&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   How do I compress and rebuild my computer&#39;s RPM database?&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   #rpm -rebuilddb 
   &lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;em&gt; &lt;/em&gt;&lt;/span&gt;&lt;br /&gt;
 &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jitenjha.blogspot.com/feeds/3192554563952413318/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1771611745557879832/3192554563952413318?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/3192554563952413318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/3192554563952413318'/><link rel='alternate' type='text/html' href='http://jitenjha.blogspot.com/2012/02/redhat-package-management.html' title='RedHat Package Management'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07663057837439208477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1771611745557879832.post-6928943340057723395</id><published>2012-02-28T12:34:00.002+05:30</published><updated>2012-02-28T15:07:43.433+05:30</updated><title type='text'>Networking In Linux</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Networking In Linux&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Descriptions:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Any system if needed to connect to the Internet, would require the networking components configured. Linux offers various methods to control the network interfaces of a system which will be explored .&lt;br /&gt;
Linux provides excellent support for networking and configuration of the various options via the command line as well as built-in configuration tools.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Gathering network information and setting IP addresses:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;The first step is to find the IP address and the currently active interfaces in the system that we are using. Use the command &#39;ifconfig&#39; to get a list of all active interfaces in the system.&lt;/li&gt;
&lt;/ul&gt;
Use the same command with the -a switch to get a list of all interfaces.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;#ifconfig&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
eth0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Link encap:Ethernet&amp;nbsp; HWaddr b8:ac:6f:b5:8a:3a&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inet addr:10.112.18.76&amp;nbsp; Bcast:10.112.255.255&amp;nbsp; Mask:255.255.0.0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inet6 addr: fe80::baac:6fff:feb5:8a3a/64 Scope:Link&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UP BROADCAST RUNNING MULTICAST&amp;nbsp; MTU:1500&amp;nbsp; Metric:1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RX packets:110687304 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TX packets:84807708 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; collisions:0 txqueuelen:1000 &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RX bytes:3862591144 (3.8 GB)&amp;nbsp; TX bytes:2051180865 (2.0 GB)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Interrupt:18 &lt;br /&gt;
&lt;br /&gt;
lo&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Link encap:Local Loopback&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inet addr:127.0.0.1&amp;nbsp; Mask:255.0.0.0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inet6 addr: ::1/128 Scope:Host&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UP LOOPBACK RUNNING&amp;nbsp; MTU:16436&amp;nbsp; Metric:1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RX packets:1098 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TX packets:1098 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; collisions:0 txqueuelen:0 &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RX bytes:610070 (610.0 KB)&amp;nbsp; TX bytes:610070 (610.0 KB)&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;We assign an IP address to the interface &#39;eth0&#39; using the command line as follows :&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;#ifconfig eth0 192.168.1.1 netmask 255.255.255.0&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
we also check if the changes have taken place using the &#39;ifconfig&#39; command. You may not give the subnet mask value if you want the default ones to be used.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;#ifconfig eth0&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;However this assignment of the IP address is only a temporary one and will be lost upon the next system reboot or restart of the network services.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;To prevent this from happening and the avoid the setting of the IP address for each session, edit the configuration file for the interface which is located in the &#39;/etc/sysconfig/network-script&#39; directory. The file will be called &#39;ifcfg-&lt;interface name=&quot;&quot;&gt;&#39;. In&amp;nbsp; our example, the file will be called &#39;ifcfg-eth0&#39;.&lt;/interface&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Edit the lines in the original file which is as follows:&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;DEVICE=eth0&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;BOOTPROTO=dhcp&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;HWADDR=08:0027:27:57:52&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;ONBOOT=yes&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;TYPE=Ethernet&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
To read as follows&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;DEVICE=eth0&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;BOOTPROTO=static&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;HWADDR=08:0027:27:57:52&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;ONBOOT=yes&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;TYPE=Ethernet&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;IPADDR= 192.168.1.1 --------------------------------------&amp;gt; IP address&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;NETMASK= 255.255.2555.0 ---------------------------&amp;gt; subnet mask&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;From the next boot onward the system will take the IP address that you designated.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;Adding and Deleting gateway in Linux:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;The IP address assigned so far would only allow for communication between system in the same subnet. To add support for communications to other subnets, we need to add gateways to the system.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;We add default gateway to the system by using the &#39;route&#39; command.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;#route add default gw 192.168.1.254&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;We can add a dedicated route to a particular network or host by issuing the route command but with a few changes to the command used above.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;#route add -net 10.0.0.0 netmask 255.255.255.0 gw 192.168.1.10&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;#route add -host 172.16.1.1 gw 192.168.1.11&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;To look at the current routing table in the kernel we use the same command but this time without any arguments. However we can use the &#39;-n&#39; switch which will give the output in the numeric format.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;#route -n&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;To delete a route we use the &#39;route&#39; command itself but with the &#39;del&#39; option passed instead of the &#39;add&#39;.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;#route del -net 10.0.0.0 netmask 255.255.255.0&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;A look at the kernel routing table shows that the route to the 10.0.0.0/32 network no longer exists.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;#route -n&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Using the &#39;system-config-network&#39; tool:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Open a terminal and type &#39;system-config-netowrk&#39;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;In the monitor we will see network configuration tool Utility.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Select the interface whose properties you wish to change and click edit. A screen as shown on monitor.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Choose the properties of the interface as per your requirements.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;To add route to the system click on the Route tab.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Click on &#39;Add&#39; icon and you will configure IP address and Subnet Mask , Gateway.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Finally you can delete a route by selecting the route and then clicking &#39;Delete&#39; in the &#39;Route&#39; tab.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jitenjha.blogspot.com/feeds/6928943340057723395/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1771611745557879832/6928943340057723395?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/6928943340057723395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/6928943340057723395'/><link rel='alternate' type='text/html' href='http://jitenjha.blogspot.com/2012/02/networkin-in-linux.html' title='Networking In Linux'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07663057837439208477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1771611745557879832.post-5329527370480087572</id><published>2012-02-28T11:49:00.002+05:30</published><updated>2012-02-28T11:49:21.712+05:30</updated><title type='text'>Disk Management in Linux</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Disk Management in Linux&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Descriptions:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Secondary storage forms the fundamental part of any computing infrastructure. System administrators are expected to utilize hard drives effectively to help users in optimizing&amp;nbsp; their productivity. Using command line tools to manage hard disks in linux.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Introduction:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Linux offers utilities to manage hard disks. Users may add, delete change partition types. Furthermore they can also implement software RIAD, LVM etc using command line utility.&lt;br /&gt;
&lt;br /&gt;
Here are a few caveats regarding hard disks.&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;A disk drive requires a partition table.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;The partition is the logical sequence of cylinders in the disk.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;A cylinder represents all the sectors that can be read by all heads with on movement of the arm that contains all these heads.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Linux supports up to 16 partitions on any individual IDE or SCSI drive.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Primary partitions: 3 , Extended partition: 1, Logical partition:12&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Hard Disk Overview:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Firstly we start off by inspecting the hard disk for its current set-up. Our aim now is to find the partitions and their types those are currently existing. All commands need to be executed as the &#39;root&#39; user. Hard disks are detected in the location /dev/hda&#39;n&#39; ( for IDE drvies) or /dev/sda&#39;n&#39; ( for SATA/SCSI drives). The &#39;n&#39; denotes the partition number in that hard drive. Primary partitions are numbered from 1-3 and extended partition is given the number 4. All logical partitions are given numbers 5 onwards. However, the conventions differ as per the distribution of linux that you are using.&lt;br /&gt;
&lt;br /&gt;
The &#39;a&#39; in the hda (or sda) is the location of the hard disk controller where the hard drive is connected. So for IDE drives, &#39;a&#39; is the primary master channel, &#39;b&#39; is the primary slave channel, &#39;c&#39; is the secondary master channel, &#39;d&#39; is the secondary slave channel. Accordingly the location where the hard disk gets read would change to either /dev/had, /dev/hdb , /dev/hdc, or /dev/hdd.&lt;br /&gt;
&lt;br /&gt;
In my system that has 2 hard disks, a 500 GB primary master and a 1 TB primary slave, I execute the following commands. I have just added the 1 TB partition. So lets perform all our operation in this hard drive only.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;#fdisk -l &lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Disk /dev/sda: 320.1 GB, 320072933376 bytes&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;255 heads, 63 sectors/track, 38913 cylinders&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Units = cylinders of 16065 * 512 = 8225280 bytes&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Sector size (logical/physical): 512 bytes / 512 bytes&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Disk identifier: 0x00000080&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; Device Boot&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Start&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Blocks&amp;nbsp;&amp;nbsp; Id&amp;nbsp; System&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;/dev/sda1&amp;nbsp;&amp;nbsp; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 194560&amp;nbsp;&amp;nbsp; 83&amp;nbsp; Linux&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Partition 1 does not end on cylinder boundary.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;/dev/sda2&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; 25&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 38914&amp;nbsp;&amp;nbsp; 312373249&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp; Extended&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;/dev/sda5&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; 25&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 523&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3998720&amp;nbsp;&amp;nbsp; 82&amp;nbsp; Linux swap / Solaris&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;/dev/sda6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 523&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 38914&amp;nbsp;&amp;nbsp; 308373504&amp;nbsp;&amp;nbsp; 83&amp;nbsp; Linux&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
When I gave this command without specifying the device, I get a list of all hard drives and I get an informatory messages that the hard disk /dev/hdb has no valid partition table. Also the hard drives are recognized as IDE hard drives in slots &#39;a&#39; and &#39;b&#39;. To get details regarding only one hard drive, pass the location of the hard disk to the same command.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;#fdisk -l /dev/hda&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Lets analyses the output:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;The command request the details of the hard disk attached to /dev/hda.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;The output first gives the human-readable ( MB, GB etc.) size of the hard disk.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Next it gives the actual size of the hard disk in bytes.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Next are a few details on the number of heads, sectors and the total number of cylinders in the hard disk.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Then the details of the partitions are given. Each column is as follows.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;



 
 
 
 &lt;style type=&quot;text/css&quot;&gt;
td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; }
&lt;/style&gt;

&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;tbody&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Title&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Explanation&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Device&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   The absolute path to the partition&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Boot&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Specifies which partition is bootable. An asterisk in marked to
   designated this partition&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Start&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   The starting cylinder of the partition&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   End&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   The last cylinder of the partition&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Blocks&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   The number of blocks in that partition&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Id&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   The file system id, a hexadecimal number to denore the file
   system in the partition&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   System 
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   The type of the partition. A human-understandable format&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&amp;nbsp;
&lt;br /&gt;
&lt;b&gt;Creation and Deletion of partitions :&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
As we have a 4 GB hard disk that does not have a partition table. We will create 2 partition in it.&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;We use the fdisk to create partition in the second hard drive.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;#fdisk /dev/hdb&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Pressing &lt;b&gt;&#39;m&#39; &lt;/b&gt;will display the help for you.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;We create a new primary partitions occupying 6000 cylinders for the first one and the remaining for the second partition which will be an extended partition. Note: You can create a partition of a specific size that&amp;nbsp; you want. Just rad the option carefully. Pressing ENTER at any question will take the default value for that question, if there is any.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;Command ( m for help): n&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;We look at the partition table by pressing &lt;b&gt;&#39;p&#39;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;The changes we made so far only temporary and will be finalized to the disk only when you explicitly&amp;nbsp; order &#39;fdisk&#39; to do so. Confirm changes using the &#39;w&#39; option. The &#39;q&#39; option will quit without saving changes.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;Command (m for help): w&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;This creates the partition in the hard disk. But the changes are not yet read by the Operation System. The next step is no make the kernel re-read the partition in the hdb device.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;# partprobe /dev/hdb&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;We next make the filesystem that linux can read in the partition hdb1.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;#mkfs.ext3 /dev/hdb1 ( partition name )&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Similarly we add a filesystem to the hdb2 partition as well&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;#mkfs.ext3 /dev/hdb2&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;The deletion of a partition can be accomplished by typing &#39;d&#39; and corresponding number of the&amp;nbsp; partition which you want to delete when prompted for one.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jitenjha.blogspot.com/feeds/5329527370480087572/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1771611745557879832/5329527370480087572?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/5329527370480087572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/5329527370480087572'/><link rel='alternate' type='text/html' href='http://jitenjha.blogspot.com/2012/02/disk-management-in-linux.html' title='Disk Management in Linux'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07663057837439208477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1771611745557879832.post-9134462987187621713</id><published>2012-02-24T12:52:00.000+05:30</published><updated>2012-02-24T12:52:28.223+05:30</updated><title type='text'>SAMBA Server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;SAMBA Server Configuration&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Descriptions:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The presence of linux workstation in a network will invariable demand the need for allowing remote file access in between systems. Samba is a solution that is used to enable UNIX-Windows file sharing. Readers implements a samba server in the network so that other users of the LAN can leverage the functionalities of network file sharing.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Introduction:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Samba is a suite of programs running under UNIX-like operating systems that provide integration between unix and windows machines. Samba uses server Server Message Block ( SMB ) protocol which is the underlying protocol used in Microsoft Windows Networking.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;For many networks samba can provide a complete replacement for windows NT servers, although it does not provide the full range of functionality provided by Active Directory under Windows Server 2000 and Windows server 2003.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Samba can also register itself with the master browser on the network so that it would appear in the listing of hosts in windows 95/NT &quot;neighborhood network&quot;. In fact, samba itself can act as the master browser ( domain controller ) on the network.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Samba can also use LDAP ( Lightweight Directory Access Protocol ) as backend database for storing machine and user account details.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Another standard feature of Samba is an ftp like SMB client which allows you to access shared PC resources such as disk or folders and printers.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Packages that are required to have Samba system in the system are shown below.&lt;br /&gt;
&lt;br /&gt;



 
 
 
 &lt;style type=&quot;text/css&quot;&gt;
td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; }
&lt;/style&gt;

&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;tbody&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;Package&lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;Description&lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Samba-*&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Basic Samba Server Package&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Samba-client-*&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   This package allows you to setup your linux computer to read
   shared Microsoft Printers&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Samba-common-*&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   This package includes files required to support Linux as a
   Samba client and as a samba server.&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Samba-swat-*&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   This GUI tool lets you modify the main samba configuration
   files.&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Configuring a share :&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
To analyze the way directory are share from the packaged &#39;smb.cong&#39; configuration. There are 8 examples of shared directories in the standard &#39;smb.conf&#39; file.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;SAMBA Linux to Windows Sharing&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Setup the shares in /etc/samba/smb.conf by editing it as follows&lt;br /&gt;
[share1]&amp;nbsp; -----------------------------------------------------&amp;gt; This is the share name&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; comment = share from linux box&amp;nbsp; ----&amp;gt; A description of the share&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; path = /path/to/shared/directory -----&amp;gt; Path to the shared directory&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; read only - yes/no ----------------------------&amp;gt; Permissions to the directory&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vaild users = user ---------------------------&amp;gt;&amp;nbsp; User name&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; browse able = yes/no ----------------------&amp;gt; Permission to list contents of the&amp;nbsp;&amp;nbsp;&lt;br /&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;&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; directory&lt;br /&gt;
&amp;nbsp;If you want to share CD/DVD drive&lt;br /&gt;
[DVD]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; comment = dvd drive on linux box&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; writable = no&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; locking =&amp;nbsp; no&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; path = /mount/point/of/dvd&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; valid users = user1 ( user name )&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Checking the configuration file for errors:&lt;/b&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;After editing the &#39;smb.conf&#39; file to add the shares that you need, we check it for consistency and syntactic errors.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;At the shell type:&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;#testparm&lt;/b&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;this command reads through the configuration file and display errors if any.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;Adding Users:&lt;/b&gt;&lt;br /&gt;
At this stage, we are almost done. To access Samba shares, evey user needs to have a userID and password. Bear in the mind that this userID and passwd is different from the log-in ID that the users uses to log in to the system.&lt;br /&gt;
Open your terminal windows and type in the following:&lt;br /&gt;
&lt;b&gt;#useradd user1&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;#passwd user1&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;changing password for user user1&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;NEW UNIX password:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Retype new UNIX password:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;passwd: all authentication tokens updated successfully&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;#smbpasswd -a user1&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;NEW SMB password:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Retype new SMB password:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Added user user1&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The same username and password that you log onto to the windows PC with.&amp;nbsp; &lt;br /&gt;
When you create a new linux user, it will automatically create a home share for this person. In this case it will be /home/user1.&lt;br /&gt;
Now Samba has to be restarted so that all of the changes that we have made will take effect. For starting that samba services use the following command in the command prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;#/etc/init.d/smb restart OR&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;#/etc/init.d/smb start&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Accessing the shares via GUI:&lt;/b&gt;&lt;br /&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; Accessing shares from a windows machine.&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Click Start|Run.&lt;/li&gt;
&lt;li&gt;In the prompt type \\192.168.0.1\share1. 192.168.0.1 is the IP address of the linux machine.&lt;/li&gt;
&lt;/ul&gt;
Accessing shares from a linux machine.&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Open a file browser like nautilus or knoqueror.&lt;/li&gt;
&lt;li&gt;Type &#39;smb://192.168.0.1/share1&#39; and press enter to access the share.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;Accessing the shares via command line in Linux:&lt;/b&gt;&lt;br /&gt;
you can access share available from linux machine by mounting the share as your local directory. For mounting use&amp;nbsp; the following command on the client linux machine.&lt;br /&gt;
&lt;b&gt;#smbmount //linuxserver/share name /home/user1 -o username= test password:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&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;&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; OR&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;$smbclient&amp;nbsp; //linuxserver/sharename -u username&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;password:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;smb:/&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
To access the smb share via a remote machine, we need&amp;nbsp; to know the username and password on the remote samba server machine.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Global Parameters&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;[global]&lt;/b&gt;&lt;br /&gt;
Anything in here applies to samba as a global setting. There is some configuration info here that is important so that samba and your windows pc&#39;s will function properly. However some global settings can be overridden by share settings ( more on this later). I will now go through each line and give a brife description of what role it plays in Samba.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;workgroup = home&lt;/b&gt;&lt;br /&gt;
This is the name of your network group. It is important that both samba and windows are in the same workgroup. Please read your windows documentation on how to change your windows pc&#39;s workgroup name.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;netbios = Samba&lt;/b&gt;&lt;br /&gt;
Netbios name is what you will see in your windows pc &quot;Network Neighborhood&quot; &lt;br /&gt;
for your Samba server. You can name this anything you wish. If you leave it blank, it will default to your host name.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;encrypt passwords = yes&lt;/b&gt;&lt;br /&gt;
Samba can work with encrypted or unencrypted passwords. However windows 98, Windows NT,2000 utilize encrypted passwords. The only time this should be set to no is when you have any older windows systems running on your network ie: Windows 95,3.x if this is the case you will have to do some registry modifications to your windows 98, NT , 2000 to allow them to send unencrypted passwords across the network. Not the most secure situation though.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Share Parameters&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;[homes]&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;When you create a user on your linux pc ( more on this later ) it will automatically create a home folder for you in /home/yourusername. Think of this as your &quot;My Documents&quot; for linux.&lt;br /&gt;
&lt;b&gt;read only = no&lt;/b&gt;&lt;br /&gt;
By default samba will always make any directory read only for security reasons, so we need to let samba know that we want to be able to write to this directory.&lt;br /&gt;
browseable = no: defines when you map a network drive to samba, it will map directly to your user directory ie: \\home\mw ( this is my username on linux and samba ) This share /home/mw is browseable only by you. Remember this is much the same as the &quot; My Documents&quot; folder in windows.&lt;br /&gt;
&lt;b&gt;path = /data/mp3&lt;/b&gt;&lt;br /&gt;
This tells us the directory is found on the samba server as /data/mp3, later when we map the network drive on the windows pc, it will be seen as &quot;music&quot; in Network Neighborhood.&lt;br /&gt;
&lt;b&gt;browseable = yes&lt;/b&gt;&lt;br /&gt;
This share will show in network neighborhood as &quot; Music &quot;&lt;br /&gt;
&lt;b&gt;Public = yes&lt;/b&gt;&lt;br /&gt;
Specifies anyone can access and view the contents of /data/mp3&lt;br /&gt;
&lt;b&gt;write list = user1&lt;/b&gt;&lt;br /&gt;
Although anyone can view and excute ( meaning see and play any mp3 in this directory ). For security and practical reason i have set this share so only mw&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ( thats me )&amp;nbsp; and jackie can delete or add files. You can add as many names as you wish to this line ie: , mw, john, tiffany etc. To exclude any person from being&amp;nbsp; able to access this share altogether, add the line: invalid users = vicky, steve. These names are the logon names from windows and are not case sensitive. They also must have a logon name and samba password on the linux pc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jitenjha.blogspot.com/feeds/9134462987187621713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1771611745557879832/9134462987187621713?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/9134462987187621713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/9134462987187621713'/><link rel='alternate' type='text/html' href='http://jitenjha.blogspot.com/2012/02/samba-server_24.html' title='SAMBA Server'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07663057837439208477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1771611745557879832.post-9000666744380726019</id><published>2012-02-23T13:12:00.000+05:30</published><updated>2012-02-23T13:12:10.353+05:30</updated><title type='text'>Network Information Services</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Network Information Services ( NIS )&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Descriptions :&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The existence of a centralized log on system eases the administrative burdens of network and systems administrators. NIS is one such implementation for linux domains.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Introduction:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;b&gt;Network Information Servies ( NIS )&lt;/b&gt; enables you to create user accounts that can be shared across all systems on your network. The user account is crated only on the NIS server. NIS clinets downloads the necessary user name and password data from the NIS server to verify each user login.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Network Information Services ( NIS ) originally known as yellow pages, is sometimes called Name Services and follows the client-server architecture. NIS servers maintain replicated servers, with the principal servers being referred to as master servers and the replicated serves referred to as replica or slave servers.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;NIS master and replica servers provide services to NIS clients. NIS stores information on the master server in a set of files called maps about users, groups, hosts information, address, and network services information. This collection of network information is referred to as the NIS name space.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;NIS maps store information in a two column table. The first column lists the key and the other column display information about the key. The NIS server responds to the client query based on the information in the maps.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;An advantage of NIS is that users need to change their passwords on the NIS server only. instead of every system on the network. This makes NIS popular in computer training labs, distributed software development projects or any other situation where group of people have to share many different computers.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;The disadvantages are that NIS doesn&#39;t encrypt the user name and password information send to the client with each login and that all users have access to the encrypted passwords stored on the NIS server.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;The Lightweight Directory Access Protocol ( LDAP ) offers similar features to NIS but has the advantage of supporting encryption without additional software and can support clients across multiple networks without the need for slave servers. It is for this reason that LDAP has became increasingly popular for this type of application.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;Packages required for NIS server and client configuration are given below:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;ypserve , yp-tools ------------ server configuration&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;ypbind ,&amp;nbsp; yp-tools ------------&amp;nbsp; client configuration&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
So before configuration NIS check whether these package are present both in server and client systems by typing the following command in the command prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;# rpm -qa yp*&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Configuring Network Fine System :&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Configuring NFS on server side :&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The need for configuring NFS in NIS server is to make the users home directories available across all the remaining linux workstations in the local network. So to export the users home directories across network go to /etc/exports and add the following line&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;/home&amp;nbsp;&amp;nbsp;&amp;nbsp; *(rw,sync)&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
and save changes to the file and come back to the command prompt and type &lt;b&gt;exportfs -a&lt;/b&gt; to export users home directories across the network.&lt;br /&gt;
&lt;br /&gt;
Make sure the required &lt;b&gt;nfs, nfslock and portmap &lt;/b&gt;daemons are running.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Configuring NFS on client side:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
On client side to mount the users respective home directories when they access NIS server for login, create a directory by name home to mount your home directory on the serve to the newly created home directory on the machine from where we are going to access the NFS server. For mounting use the following command.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;# mount 192.168.53.2:/home /home/&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;# mount IP Address:/direcotry /path/&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Here 192.168.53.2:/home is home directory of user situated on the NFS server and /home is directory created in the client system.&lt;br /&gt;
&lt;br /&gt;
To unmount the home directory use &lt;b&gt;umount /home.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The other way of mounting the home directory if the user is using auto mounting option. Start configuring auto fs auto mounting. Edit your /etc/auto.master file to refer to file /etc/auto.home for mounting information whenever the /home directory is accessed. After five minutes, autofs umounts the directory.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;# vim /etc/auto.master&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;/home&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; /etc/auto.home --timeout 600&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Edit file /etc/auto.home to do the NIS mount whenever the /home directory is accessed. If the line is too long to view on your screen, you can add a \ character at the end to continue on the next line.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;# vim /etc/auto.home&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -fstype=nfs,soft,intr,rsize=8192,wsize=8192,nosuid,tcp \192.168.53.2:/home:&amp;amp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Start autofs and make sure it starts after the next reboot with the chkconfig command.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;#chkconfig autofs on&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;#service autofs restart&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Configuring NIS Server :&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Before configuring NIS server make sure that all the NIS related packages are installed and if not install the required packages. After installing the required packages follow the steps given below for configuring NIS.&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;In &lt;b&gt;/etc/sysconfig/network&lt;/b&gt; file and add the domain name as test.com&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;# vim /etc/sysconfig/network&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;NISDOMAIN= &quot;test.com&quot;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Now edit the /etc/yp.conf file since NIS server also have to be NIS clients themselves, so you&#39;ll have to edit the NIS client configuration file /etc/yp.conf to list the domain&#39;s NIS server as being the server itself or local host.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;# /etc/yp.conf -ypbind configuration file&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;ypserver 127.0.0.1&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Start the necessary NIS daemons and use the chkconfig command to ensure they start after the next reboot.&lt;b&gt; &lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;# service portmap start&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;# service yppasswdd start&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;# service ypserv start&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;# chkconfig portmap on&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;# chkconfig yppasswdd on&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;# chkconfig ypserv on&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Brief description of each daemon is shown below :&lt;br /&gt;
&lt;br /&gt;



 
 
 
 &lt;style type=&quot;text/css&quot;&gt;
td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; }
&lt;/style&gt;

&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;tbody&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Daemon Name&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Purpose&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Portmap&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   The foundation RPC daemon upon which NIS runs.&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Yppasswdd&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Lets users change their passwords on the NIS server from NIS
   clients&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Ypserv&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Main NIS server daemon&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Ypbind&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Main NIS client daemon&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Ypxfrd&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   Used to speed up the fransfer of very large NIS maps&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
To make sure they that all the daemon are running properly, you can use the rpcinfo command from the command prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Initializing NIS Domain:&lt;/b&gt;&lt;br /&gt;
To create the associated authentication file for the domain we use ypinit command. When you use this command it will prompt for the domain name at some time where we have to specify test.com. Before running this command sure that port map service is running on your system. Use ypinit command as shown below.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;# /usr/lib/yp/ypinit -m&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt; &lt;br /&gt;
At this point, we have to construct a list of the hosts which will run NIS servers. &#39;user1&#39; is in the list of NIS server hosts. Please continue to add the names for the other hosts, one per line. When you are done with the list, type a &quot;control D&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;next host to add: test.com&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;next host to add:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;The current list of NIS servers looks like this:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;user1&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Is this correct? [y/n] = y&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;user1 has been set up as a NIS master server.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Now you can run ypinit -s user1 on all slave server.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;#&lt;/b&gt;&lt;br /&gt;
Now start running ypbind and ypxfrd services from the command promp.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Configuring NIS client:&lt;/b&gt;&lt;br /&gt;
Now on the client side run authconfig command. The authconfig or the authconfig-tui program automatically configures your NIS files after prompting you for the IP address and domain of the NIS server.&lt;br /&gt;
&lt;b&gt;#authconfig-tui&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Once finished, it should create an &lt;b&gt;/etc/yp.conf &lt;/b&gt;file that defines, amongst other things the IP address of the NIS server for a particular domain. It also edit the &lt;b&gt;/etc/sysconfig/network&lt;/b&gt; file to define the NIS domain to which the NIS client belongs. In addition, the authconfig program updates the &lt;b&gt;/etc/nsswitch.conf &lt;/b&gt;file that lists the order in which certain data sources should be searched for name lookups such as those in DNS, LDAP and NIS.&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;You can also make changes manually by making changes for the following files as shown below.&lt;/li&gt;
&lt;/ul&gt;
In &lt;b&gt;/etc/sysconfig/network&lt;/b&gt; file and add the domain name as &lt;b&gt;test.com.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;#/etc/sysconfig/network&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;NISDOMAIN=&quot;test.com&quot;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Now edit the /etc/yp.conf file since NIS servers also have to be NIS clients themselves, so you&#39;ll have to edit the NIS client configuration file /etc/yp.conf to list the domain&#39;s NIS server as being the server itself or local host.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;#/etc/yp.conf - ypbind configuration file&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;ypserver 192.168.53.2&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;In /etc/nsswitch.conf file, that lists the order in which certain data sources should be searched for name lookups such as those in DNS, LDAP and NIS. Here you can see where NIS entries were added for the important login files.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;#/etc/nsswitch.conf&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;passwd:&amp;nbsp; files nis&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;shadow: files nis&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;group: files nis&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;After completing the editing of files start client service daemons ypbind and port map and verify that they are automatically starting at reboot.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;Testing the NIS Server:&lt;/b&gt;&lt;br /&gt;
For testing access to NIS server you can ru nthe ypcat, ypmatch and getent commands to make sure communication to the server is correct.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;#ypcat passwd&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;#ypmatch user1 passwd&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;#getent passwd user1 &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jitenjha.blogspot.com/feeds/9000666744380726019/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1771611745557879832/9000666744380726019?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/9000666744380726019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/9000666744380726019'/><link rel='alternate' type='text/html' href='http://jitenjha.blogspot.com/2012/02/network-information-services.html' title='Network Information Services'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07663057837439208477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1771611745557879832.post-8194916448894454650</id><published>2012-02-22T16:22:00.002+05:30</published><updated>2012-02-22T16:22:54.314+05:30</updated><title type='text'>Network File System</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Network File System ( NFS )&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;Descriptions :&lt;/b&gt;&lt;br /&gt;
The presence of Linux workstation in a network will invariably demand the need for allowing remote file access in between system. NFS is a solution that is used to enable UNIX-UNIX file sharing. Implement a NFS server in the network so that other users of the LAN can leverage the functionalities of network file sharing.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Introduction:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
NFS ( Network File System ) allows hosts to mount partitions on a remote system and use them as though they are local file systems. This allows the system administrators to store resources in a central location on the network, providing authorized users continuous access to them.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Package required for NFS:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Nfs-utils-*&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; Include basic NFS commands and daemons&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Portmap-*&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; Supports secure NFS.RPC connections&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Editing the configuration file:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
To configure NFS you have to configure /etc/exports file. This is the place where you are going to mount file system that is to be shared in the network. In order to export a particular file system, we have specify it in the following format as shown below in /etc/exports file.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;export host1(options)------------------------- hostN(options)&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
In the above format, in the place of export place the directory which you want to export. In the place of host1 specify the ip address or the network address so that a particular network can access the exported directory. And the options include read and permissions,user permissions etc.&lt;br /&gt;
&lt;br /&gt;
The following methods can be used to specify host names in place of host1:&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;single host --- Where one particular host is specified with fully qualified domain name, hostname, or IP Address.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;wildcards ---- Where a * or ? character is used to take into account a grouping of fully qualified domain names that match a particular string of letters. Wildcards should not be used with IP Address; however, it is possible for them to work accidentally if reverse DNS lookups fail.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Be careful when using wildcards with fully qualified domain names, as they tend to be more exact than expected. For example the use of *.example.com as a wildcard allows sales.example.com to access and exported file system but not bob.sales.example.com. To match both possibilities both *.example.com and *.*.example.com must be specified.&lt;br /&gt;
&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;IP networks --- Allows the matching of hosts based on their IP address within a larger network. For example, 192.168.0.0/28 allows the first 16 IP address, from 192.168.0.0 to 192.168.0.15, to access the exported file system but not 192.168.0.16 and higher.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;



 
 
 
 &lt;style type=&quot;text/css&quot;&gt;
td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; }
&lt;/style&gt;

&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;tbody&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;OPTION&lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;DESCRIPTION&lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;ro&lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;Read Only permission 
   &lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;rw&lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;Read and Write permission 
   &lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;sync&lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;All data is written by request&lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;no_root_squash&lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;Allow root user to access exported directory through network&lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;hide&lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;Sharing the directory without including its sub directories for
   sharing&lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;no_hide&lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;Includes sharing sub directories&lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;no_wdelay&lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;Data is written to share immediately 
   &lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;style type=&quot;text/css&quot;&gt;
td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; }
&lt;/style&gt;

&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;tbody&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;all_squash&lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;Treat all users as anonymous users&lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;b&gt;
&amp;nbsp;
&lt;/b&gt;&lt;b&gt;Example :&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
An example for how to enter a directory in /etc/exports file for exporting is given below:&lt;br /&gt;
&lt;b&gt;/home&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; user.test.com(rw,sync)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;/user1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *.test.com(rw,no_root_squash,sync)&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Here in the first line the home directory can be accessed only by user.test.com. Where as in the second line user1 directory can be accessed by any system in the test.com domain. Here &#39;*&#39; is a wild card which specifies all clients in the domain test.com.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Exporting Files:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;After specifying the directory which we want to export in the /etc/exports file, save the configuration and come out of the file and start the nfs service through command prompt using command service portmap start or /etc/init.d/portmap start.&lt;br /&gt;
Now for exporting the specified directory,in the command prompt use the following commands.&lt;br /&gt;



 
 
 
 &lt;style type=&quot;text/css&quot;&gt;
td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; }
&lt;/style&gt;

&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;128*&quot;&gt;&lt;/col&gt;
 &lt;tbody&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;Command&lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;Description 
   &lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;exportfs -a&lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;Exports all directories for sharing specified in /etc/exports&lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;exportfs -r 
   &lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;Receives list of shared directories after changing the
   configuration file&lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;exportfs -u  
   &lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;Unexports all directories&lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;exportfs -v&lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;50%&quot;&gt;
   &lt;b&gt;Lists all currently shared directories&lt;/b&gt;&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Configuration on the client side for accessing directories exports through NFS:&lt;/b&gt;&lt;br /&gt;
On the client side, in order to view the directories that are exported through NFS use the following command.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;#shownmount -e hostname ( IP Address of server )&lt;/b&gt;&lt;br /&gt;
Which shows all shared files. If you want to mount that directory locally you&#39;ll need an empty local directory. So create a directory such as /home/test. Now we can mount the share directory from a particular computer with the following command.&lt;br /&gt;
&lt;b&gt;# mount -t nfs enterprise3:/usr/loca /home/test&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;# mount -t nfs IP address hostname:/server side directory /user side directory&lt;/b&gt;&lt;br /&gt;
In the above command, enterprise3 is the computer name from where the directory is exported and /usr/local is the exported directory and /home/test is the place where we have mounted the exported directory on to the machine through which you are accessing. &#39;-t nfs&#39; specifies the type of file system.&lt;br /&gt;
&lt;b&gt;NOTE:&lt;/b&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&amp;nbsp;A file system is a method for storing and organizing computer files and the data they contain to make it easy to find and access them. File systems may use a data storage device such as a hard disk or CD-ROM and involve maintaining the physical location of the files.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Portmap service is required to map RPC requests to the correct services. When ever a client contacts the Portmap server with some RPC number the Portmap redirects the client to the intended service.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;RPC ( remote procedure call ) is a protocol that one program can use to request service from a program located in another computer in a network without having to understand network details. RPC&amp;nbsp; uses client/server model. The requesting program is a client and service providing program is the server.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jitenjha.blogspot.com/feeds/8194916448894454650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1771611745557879832/8194916448894454650?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/8194916448894454650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/8194916448894454650'/><link rel='alternate' type='text/html' href='http://jitenjha.blogspot.com/2012/02/network-file-system.html' title='Network File System'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07663057837439208477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1771611745557879832.post-960731799229722733</id><published>2012-02-21T17:11:00.000+05:30</published><updated>2012-02-21T17:11:59.226+05:30</updated><title type='text'>FTP Server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;File Transfer Protocol ( FTP )&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Description:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Linux offers powerful networking capabilities. Consequently it has become one of most popular Operating System that make the backbone of the world wide web. One of the popular method of hosting services across the Internet is the use of FTP server that use the File Transfer Protocol to aid file transfers across the Internet. Set-up FTP server for various access needs.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Introduction:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;If you want to enable other users to download files from a location on your server&#39;s hard disk or to upload file to that location then one solution is to set-up an FTP server.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;When users want to upload/download from your FTP server they use a program called the FTP client.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;These communications between the FTP server and FTP client takes place using the File Transfer Protocol ( FTP ).&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;FTP is not considered a secure protocol as communications between the FTP client and server are unencrypted. Consequently Secure FTP ( SFTP ) is gaining popularity among users.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Many FTP servers still its disk space and download its files. Anonymous FTP access is used mostly to enable users to access freely available documents program etc. via the internet without access control.&lt;/li&gt;
&lt;li&gt;530 Please login with USER and PASS.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;FTP Servers included in Linux&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Very Secure File Transfer Protocol Daemon ( vsftpd )&lt;br /&gt;
TUX&lt;br /&gt;
wu-ftpd&lt;br /&gt;
gssftpd&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Installing the vsftpd FTP server:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the choices chosen during installation, the FTP daemon may have been installed.&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Check for it in Applications|System Settings|Add/Remove Application . Check the check box for the vsftp package.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;To start the FTP service ( enabling users to upload/download files), we can use the services configuration tool located in Application|system Settings|Server Setting|Srvices.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Alternatively type service-config-services at the command line.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Select vsftpd in the list and then click the start button.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Click on file save it.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;From the command line, use the service command.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;# service vsftp start&amp;nbsp; ( to start the service )&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;# service vsftp stop&amp;nbsp;&amp;nbsp; ( to stop the&amp;nbsp; service )&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;The commands shown above are specific to Linux. A more generic command. &lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;# /etc/init.d/vsftpd start&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;# /etc/init.d/vsftpd stop&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Testing the FTP server :&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Now you have setup the FTP server and started the service, we&#39;ll adopt the role of the client to quickly test the server. From the command line type the command.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;#ftp &lt;ip-address hostname=&quot;&quot;&gt;&lt;/ip-address&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; Connected to host.domain/ip-address.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; 220 (vsFTPd version)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; 530 Please login with USER and PASS.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; 530 Please login with USER and PASS.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; KERBEROS_V4 rejected asan authentication type&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; Name (ip-address:root):anonymous&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; 331 Please specify the password.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; Password:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; 230 Login successful.&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; Remote system type is UNIX.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; Using binary mode to transfer files.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; ftp&amp;gt; bye&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; 221 Goodbye.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Configuring an anonymous FTP for file download:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Anonymous users can not read form any directory from the machine in which the server is hosted.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;By default the vsftpd package creates a directory tree starting ar /var/ftp/pub and enables anonymous read access to this directory. Anonymous users connect to the /var/ftp directory when they establish a session with the FTP server.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Setting Up the FTP server:&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Place some content in the /vat/ftp/pub directory so that other users can access it.&lt;/li&gt;
&lt;li&gt;The owner of l the /var/ftp/pub is the root account and is only permitted to that directory.&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;b&gt;Using and FTP client to test anonymous read access:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Now you can test for anonymous access by using an FTP client to try grab a copy of this file via FTP connection.&lt;/li&gt;
&lt;li&gt;Both Windows and Linux machines can use FTP using the command line.&lt;/li&gt;
&lt;li&gt;FTP clients are given as a default package on the installation of the system.&lt;/li&gt;
&lt;li&gt;Connect to the FTP server and log in as the anonymous user.&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;b&gt;$ ftp 192.168.53.77 ( ip address )&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Connected to 192.168.53.77.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;220 ( vsFTPd 2.0.5 )&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Name (192.168.53.77:user):anonymous&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;331 Please specify the password.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Password:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;230 Login successful.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Remote system type is UNIX.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Using binary mode to transfer files.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;ftp&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;You can list the files in the current directory. This is the directory where you connected.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;ftp&amp;gt; ls&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;200 PORT command successful. Consider using PASV.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;150 Here comes the directory listing.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;-rw-r--r-- 1 0 0&amp;nbsp; 21 feb 13 11.14 file 1&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;226 Directory send OK.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Any Linux command related to file system navigation will be executed in the server. To execute a command in the local system, precede the command with an exclamation mark (!). To change the local directory&amp;nbsp; , use the &#39;lcd&#39; commad.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;ftp&amp;gt; !pwd&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;/home/user/Desktop&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;ftp&amp;gt;lcd~&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Local directory now /home/user&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;To download a file, use the &#39;get&#39; command. To get multiple files, use the &#39;mget&#39; command.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;ftp&amp;gt; get file1&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;local: file 1 remote: file 1&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;200 PORT command successful. Consider using PASV.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;150 Opening BINARY mode data connection for file 1 ( 16 bytes ).&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;226 File send OK.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;16 bytes received in 0.00 secs ( 84.0 kB/s )&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;To exit out of the session, use the bye command.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;ftp&amp;gt; bye&lt;br /&gt;221 Goodbye.&lt;br /&gt;$ &lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Configuring and anonymous&amp;nbsp; FTP server for file upload :&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Anonymous FTP users can write only into directories that we allow them to write to.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;By default, vsftpd dose not allow users to upload to the FTP server at all; we must first configure the server to allow anonymous users to write to some directory.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;Setting up the FTP server for Anonymous write access:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;To create a writable directory, you&#39;ll need the root account for this. Let&#39;s cerate a directory called &#39;uploads&#39; in the /var/ftp/pub directory.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;# mkdir /var/ftp/pub/uploads&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;To set the permission of the upload directory so that it allows write only access to anonymous FTP users.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;# chgrp ftp /var/ftp/pub/uploads&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;# chmod -R 730 /var/ftp/pub/uploads&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;To configure the vsftpd server to allow anonymous upload, edit the configuration file /etc/vdftpd/vsftpd.conf. &lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;#Uncomment this to allow the anonymous FTP user to upload files. This only&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;#has an effect if the above global write enable is activated. Also, you will&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;#obviously need to create a directory a directory writable by the FTP user.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;#anon_upload_enable = YES&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Remove the hash in front of the previous line. It should now look like.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;b&gt;anon_upload_enable=YES&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Restart the FTP service for the changes to take effect.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;Using an FTP client to test anonymous write access:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Connect to the server and authenticate as anonymous user.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;$ftp 10.0.2.15&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Connected to 10.0.2.15.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;220 ( vsFTPd 2.0.1 )&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;530 Please login with USER and PASS.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;530 Please login with USER and PASS.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;KERBEROS_V4 rejected as an authentication type.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Name (10.0.2.15:root):&amp;nbsp; anonymous&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;331 Please specify the password.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Password:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;230 Login successful.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Remote system type is UNIX.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Using binary mode to transfer files.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;ftp&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Change to the directory in which you have write permissions.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;ftp&amp;gt; cd pub/uploads&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;250 Directory successfully changed.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;ftp&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Upload the file you want using the &#39;put&#39; command. For multiple files use the &#39;mput&#39; command.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;ftp&amp;gt; put ftp&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;local:ftp remote:ftp&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;227 Entering Passive Mode (10,0,2,15,110,4)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;150 Ok to send data.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;226 File receive OK.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;575 bytes send in 0.00027 seconds (2.1e+03 Kbytes/s)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;ftp&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;FTP authentication vis a system account :&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Your system has an user account called &#39;user&#39;. This account can be used to gain access to the FTP server. These users will be presented their HOME directories to work with.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$ ftp 10.0.2.15&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Connected to 10.0.2.15.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;220 (vsftpd 2.0.1)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;530 Please login with USER and PASS.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;530 Please login with USER and PASS.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;KERBERROS_V4 rejected as an authentication type&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Name (10.0.2.15:root):user&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;331 Please specify the password.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Password:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;230 Login successful.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Remote system type is UNIX.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Using binary mode to transfer files.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;ftp&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Disabling Local System Users Account for FTP:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;By default the users logged in through FTP would have the same permission to read, write and execute the contents of their home directory via FTP that they would have had if they were accessing the directory by logging in at the computer.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Authentication via FTP is not encrypted so allowing FTP via user accounts is actually not a good idea to allow access to your system if you have got anything sensitive to protect.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Edit the vsftpd configuration file to disallow access to the system users and comment the following line.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;# Uncomment this to allow local users to log in.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;local_enable=Yes&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
This line should then read as&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;# uncomment this to allow local users to log in.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;# local_enable=YES&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Blocking FTP Access for selected user account: &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;To deny FTP access to individual users edit the vdftpd configuration file to allow system users access to the FTP server.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Edit the /etc/vsftpd.ftpusers file. This file contains the list of system users no allowed to access to the FTP server.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Add the name of the users that you want to deny access to. In the lab,we add the&amp;nbsp; user &#39;user&#39;.&lt;/li&gt;
&lt;li&gt;Save and Exit and restart the FTP server daemon. &lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Try logging in as the user.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;$ftp 10.0.2.15&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;connected to 10.0.2.15.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;220 (vdftpd 2.0.2)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;530 Please login with USER and PASS.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;530 Please login with USER and PASS.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;KERBEROS_V4 rejected as an authentication type&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Name (10.0.2.15:root):user&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;331 Please specify the password.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Password:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;530 Login incorrect.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Login failed.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;ftp&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Configuring an FTP greeting banner:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Open the vdftpd configuration file for editing.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Search for the line that asks you to customize a login banner.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;# you may fully customize the login banner string:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;# ftpd_banner=welcome to -------- services.&lt;/b&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Uncomment the line that says &#39;ftpd_banner&#39; and write and appropriate login banner.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Restart the FTP server and see if your banner has taken effect.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;$ftp 10.0.2.15&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;connected to 10.0.2.15.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;220 Welcome to the ------------ service.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Name (10.0.2.15:root):&amp;nbsp; &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jitenjha.blogspot.com/feeds/960731799229722733/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1771611745557879832/960731799229722733?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/960731799229722733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/960731799229722733'/><link rel='alternate' type='text/html' href='http://jitenjha.blogspot.com/2012/02/ftp-server_21.html' title='FTP Server'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07663057837439208477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1771611745557879832.post-6491781030950122236</id><published>2012-02-20T17:31:00.000+05:30</published><updated>2012-02-20T17:31:26.707+05:30</updated><title type='text'>DHCP Server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Dynamic Host Configuration Protocol ( DHCP )&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Description&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
For the management of large networks, assignment of the ip addresses statically&lt;br /&gt;
may prove to be a tedious task for the&amp;nbsp; administrator. A solution is to automatic&lt;br /&gt;
ip address assignment to the users via a Dynamic Host Configuration Protocol&lt;br /&gt;
( DHCP ) Server. Aims to get the readers to deploy a DHCP server in the network.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Introduction&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;It is a network protocol that enable a DHCP server to automatically assign an IP address to an individual computer. DHCP assigns a number dynamically from a defined range of number ( i.e., a scope ) configured for a given network.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Client computer configured to use DHCP for IP assignment do not need to have a statically assigned IP address.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;DHCP assigns a TCP/IP address when a system is started. Typically, it works like this:&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
1.&amp;nbsp; A user turns on a computer with a DHCP client.&lt;br /&gt;
2.&amp;nbsp; The client computer sends a broadcast request ( called DISCOVER or&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;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DHCPDISCOVER ), looking for a DHCP server to answer.&lt;br /&gt;
3.&amp;nbsp; The router directs the DISCOVER packet to the correct DHCP server.&lt;br /&gt;
4.&amp;nbsp;&amp;nbsp; The server receives the DISCOVER packet. Based on availability and usage&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; policies set on the server, the server determines an appropriate address&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ( if any ) to give to the client. The server then temporarily reserves that&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; address for the client and sends back to the client an OFFER ( or&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DHCPOFFER) packet, with that address information. The server also&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; configures the client&#39;s DNS server, WINS serves, NTP servers and some-&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -times other services as well.&lt;br /&gt;
5.&amp;nbsp; The client sends a REQUEST ( or DHCPREQUEST ) packet, letting the server&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; know that it intends to use the address.&lt;br /&gt;
6.&amp;nbsp; The server sends an ACK ( or DHCPACK ) packet, confirming that the client&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; has a been given a lease on the address for a server-specified period of time.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;The DORA process in DHCP works as follows&lt;/b&gt;. &lt;br /&gt;&lt;br /&gt;
D ----------&amp;gt; Discover&lt;br /&gt;&lt;br /&gt;
O ----------&amp;gt; Offer&lt;br /&gt;&lt;br /&gt;
R ----------&amp;gt; Request&lt;br /&gt;&lt;br /&gt;
A ----------&amp;gt; Acknowledgement&lt;br /&gt;
&lt;br /&gt;
1.&amp;nbsp; Client makes a UDP Broadcast to the server with a DHCPDiscover, or&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Discover packet. &lt;br /&gt;
2.&amp;nbsp; DHCP offers to the client. &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The
 server sends a DHCPOffer including other configuration parameters&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (DHCP
 Options) for the client per the servers configuration file &lt;br /&gt;
3.&amp;nbsp; In response to the offer Client requests the server. &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The client replies DHCPRequest, unicast to the server, requesting the&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; offered address. &lt;br /&gt;
4.&amp;nbsp; The server sends DHCPAck acknowledging the request which is the clients&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; final permission to take the address as offered. Before sending the 
ack the&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; server double checks that the offered address is still 
available, that the&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; parameters match the clients request and (if so) 
marks the address taken. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;DHCP Installation and Configuration&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Start the Linux machine and check if the DHCP server packages are installed.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;# rpm -qa dhcp&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;# rpm -ivh dhcp*&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;If you see the output show above the packages are installed or else you needto install them. However the version shown above might change depending on the version of the OS used.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Now open the file /etc/sysconfig /dhcpd and edit the line as follows. The line which reads&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
DHCPARGS=&lt;br /&gt;
&lt;br /&gt;
must now read.&lt;br /&gt;
&lt;br /&gt;
DHCPARGS=eth0&lt;br /&gt;
&lt;br /&gt;
Replace &#39;eth0&#39; above with the network interface you want to use for dhcp.&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Now copy /usr/share/doc/dhcp-version naem/dhcp.conf.sample to /etc/ by name &#39; dhcpd.cof &#39; by typing the following command in the command prompt.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;# cp /usr/share/doc/dhcp-version name/dhcpd.conf.sample /etc/dhcpd.conf&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;You can also copy the configuration file from any other configured dhcp server&lt;/li&gt;
&lt;li&gt;also.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Now edit /etc/dhcpd.conf file according to your requirements. A sample dhcp configuration file is shown below.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
subnet 10.0.0.0 netmask 255.255.255.0 {&lt;br /&gt;
# --- default gateway&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; option routers&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; 10.0.0.1;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; option subnet-mask&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; 255.255.255.0;&lt;br /&gt;
&lt;br /&gt;
#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; option nis-domain&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; &quot;mydomain.com&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; option domain-name&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; &quot;mydomain.com&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; option domain-name-servers&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 216.227.56.120, 64.34.4.36; ----&amp;gt;name&lt;br /&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;&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;&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; server&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; option time-offset&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; -28800; # Pacific Standard time&lt;br /&gt;
#&amp;nbsp; option ntp-servers&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; 192.168.1.1;&lt;br /&gt;
#&amp;nbsp; option netbios-name-servers&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 192.168.1.1;&lt;br /&gt;
#--- Select point-to-point node ( default is hybrid ). Don&#39;t change this unless&lt;br /&gt;
#--- you understand Netbios very well&lt;br /&gt;
#&amp;nbsp;&amp;nbsp;&amp;nbsp; option netbios-node-type 2;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; range 10.0.0.50 10.0.0.254; -------------------&amp;gt; range of your ip adderss&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; default-lease-time 604800;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max-lease-time&amp;nbsp; 604800;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hosts test {&lt;br /&gt;
#&amp;nbsp;&amp;nbsp; option dhcp-client-identifier &quot;test&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hardware ethernet mac address 00:e0:18:90:28:b2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; fixed-address &amp;nbsp;&amp;nbsp; 10.0.0.10;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # we want the nameserver to appear at a fixed address&lt;br /&gt;
# &amp;nbsp; &amp;nbsp;&amp;nbsp; host ns {&lt;br /&gt;
# &amp;nbsp; &amp;nbsp;&amp;nbsp; next-server marvin.redhat.com;&lt;br /&gt;
# &amp;nbsp; &amp;nbsp;&amp;nbsp; hardware ethernet 12:34:56:78:AB:CD;&lt;br /&gt;
# &amp;nbsp; &amp;nbsp;&amp;nbsp; fixed-address 207.175.42.254;&lt;br /&gt;
# &amp;nbsp; &amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;In the above the range 10.0.0.50 to 10.0.0.254 have been set side for dynamice hosts; this&amp;nbsp; allows anything between 10.0.0.1 and 10.0.0.49 to be set aside as static ips. In the example, host &#39;test&#39; is given a static ip using its mac address. the option &#39;dhcp-client-identifier&#39; may work as an alternative to mac address, but may require some additional configuration on the client. The max lease time of 604800 translates to 7 days. Lease times are automatically renewed by clients once 50% of the expiration date is reached. Because of this very long lease timesshould be unnecessary. If a very long one is required provide the client a static ip using the host declaration. Also the option time-offset setting is in seconds according to the manual page ; Red Hat&#39;s configuration document erroneously lists this setting in hours. Use option host-name &quot;apex.example.com&quot; in a host declaration to provide hostnames to clients.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Once the dhcp.conf file is configured, Start/Restart the server.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;# service dhcpd start&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Note: When ever you make changes to the configuration file /etc/dhcpd.conf require the dhcp server should be restarted .&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;And check dhcpd.lease file has been created automatically or not . If not create the file manually by using the following command .&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;# touch /var/lib/dhcp/dhcp.leases&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;The lease database is recreated from time to so that it is not too large. First all known leases are saved in temporary lease database. The dhcpd.leases file is renamed dhcpd.leases~, and the temporary lease database is written to dhcpd.leases.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Finally check whether the DHCP server is offering IP leases to clients. &lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jitenjha.blogspot.com/feeds/6491781030950122236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1771611745557879832/6491781030950122236?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/6491781030950122236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/6491781030950122236'/><link rel='alternate' type='text/html' href='http://jitenjha.blogspot.com/2012/02/dhcp-server.html' title='DHCP Server'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07663057837439208477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1771611745557879832.post-7685839490202890309</id><published>2012-02-17T15:08:00.002+05:30</published><updated>2012-02-17T15:15:33.628+05:30</updated><title type='text'>Apache Web Server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Apache Web Server&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Descriptions and Purpose of lab exercise&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; Web servers are perhaps present in every data center of any organization.&lt;br /&gt;
&amp;nbsp; There a few option from which we can choose a web server to host an&lt;br /&gt;
&amp;nbsp; organization&#39;s web pages from. Apache is the most popular open-source web&lt;br /&gt;
&amp;nbsp; server. This lab
aims at getting the readers to implement the webserver.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Prerequisite&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; Should be familiar with the basic principle of server/system administration.&lt;br /&gt;
&amp;nbsp; Additionally, prior exposure to any of these concepts can be helpful:&lt;br /&gt;
&lt;br /&gt;
*&amp;nbsp; Compilation of native programs (e.g. configuring and compiling c/c++&lt;br /&gt;
&amp;nbsp; &amp;nbsp; applications on UNIX/Linux)&lt;br /&gt;
*&amp;nbsp; HTTP protocol (i.e. the stateless nature of HTTP, the need for session, HTTP&lt;br /&gt;
&amp;nbsp; &amp;nbsp; methods, SSL, etc.)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Introduction&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Apache is the most widely used web server on the internet. Based on HTTP&lt;br /&gt;
&amp;nbsp;&amp;nbsp; daemon (hhtpd), it provides simple and secure access to all types of contents,&lt;br /&gt;
&amp;nbsp;&amp;nbsp; based on the HTTP and HTTPS protocols.&lt;br /&gt;
&amp;nbsp;&amp;nbsp; It is based on the server code developed by National Center for&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Supercomputing Applications (NCSA). As Apache include many patches it&lt;br /&gt;
&amp;nbsp;&amp;nbsp; came to be known as &quot;a patchy&quot; server. Apache web server continues to&lt;br /&gt;
&amp;nbsp;&amp;nbsp; advance the art of the web
and provides one of the most stable,secure,robust&lt;br /&gt;
&amp;nbsp;&amp;nbsp; and reliable web servers

available. This server is under constant development&lt;br /&gt;
&amp;nbsp;&amp;nbsp; by Apache software foundation (www.apache.org)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Features available in Apache Web Server&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;nbsp; &lt;b&gt;Dynamic Shared Object Support&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Apache modules may now be loaded at runtime; this means that modules can&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; be loaded into the server process space only when necessary, thus overall&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; memory usage by Apache will be significantly reduced. DSO currently is&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; supported on FreeBSD, OpenBSD, NetBSD, Linux, Solaris, SunOS, Digital&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; UNIX etc.&lt;br /&gt;
&lt;br /&gt;
*&amp;nbsp; &lt;b&gt;Support for various platforms &lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Apache supports the windows NT and windows 2000 operating systems.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; While Apache many run on windows 95,98 or ME these consumer products&lt;br /&gt;
&amp;nbsp; &amp;nbsp; are never recommended for production environments and their use remains&lt;br /&gt;
&amp;nbsp; &amp;nbsp; experimental. All versions of apache running on windows prior to 1.3.15&lt;br /&gt;
&amp;nbsp; &amp;nbsp; should be considered beta quality release. It also supports the cygwin&lt;br /&gt;
&amp;nbsp; &amp;nbsp; platform for the windows NT and windows 2000 operating system. The&lt;br /&gt;
&amp;nbsp; &amp;nbsp; cygwin version should be considered as stable and reliable. It also supports&lt;br /&gt;
&amp;nbsp; &amp;nbsp; NetWare 5.x and above operating system.&lt;br /&gt;
&lt;br /&gt;
*&amp;nbsp; &lt;b&gt;Reliable Piped Logs&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; On almost all unix architectures apache now implements &quot;reliable&quot; piped&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; logs in mod_log_config. Where reliable means that if the logging child dies&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; for whatever reason, apache will recover and respawn it without having to&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; restart the entire server. Furthermore if the logging child becomes &quot;stuck&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; and isn&#39;t reading its pipe frequently enough apache will also restart it.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; This opens up more opportunities for log rotation, hit filtering real-time&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; splitting of multiple vhosts into separate logs, and asynchronous DNS&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; resolving on the fly.&lt;br /&gt;
&lt;br /&gt;
*&amp;nbsp; &lt;b&gt;Virtual Hosts&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Apache is able to manage websites using a single ip address. This can be&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; done by creating multiple virtual hosts on the same web server. We can&lt;br /&gt;
&amp;nbsp; &amp;nbsp; configure virtual hosts for regular websites in the main apache configuration&lt;br /&gt;
&amp;nbsp; &amp;nbsp; file /etc/httd/conf/httpd.conf.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Updating a Home Page&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
1.&amp;nbsp; after installing the apache webserver start the apache server with the default&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; configuration.&lt;br /&gt;
2.&amp;nbsp; Copy any html file to /var/www/html/index.html&lt;br /&gt;
3.&amp;nbsp; Make any changes to the html file if you want your own information on it. &lt;br /&gt;
4.&amp;nbsp; Using the web browser such as Mozilla firefox Browser to connect to the&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; localhost and check whether the same html page is reflected.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Virtual Host&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
1.&amp;nbsp; mkdir -p /var/www/virtual&lt;br /&gt;
2.&amp;nbsp; vim /etc/httpd/conf/httpd.conf&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VirtualHost www.example.com:80&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; ServerAdmin root@IP Address&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DocumentRoot /var/www/virtual&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ServerName www.example.com&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ErrorLog logs/ error_log&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Customlog logs/ access_log common&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  VirtualHost&lt;br /&gt;
&lt;br /&gt;
3.&amp;nbsp; Line no. 971 Name VirtualHost IPAddress:80&lt;br /&gt;
4.&amp;nbsp; Service httpd restart&lt;br /&gt;
5.&amp;nbsp; chkconfig httpd on&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jitenjha.blogspot.com/feeds/7685839490202890309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1771611745557879832/7685839490202890309?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/7685839490202890309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/7685839490202890309'/><link rel='alternate' type='text/html' href='http://jitenjha.blogspot.com/2012/02/apache-web-server.html' title='Apache Web Server'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07663057837439208477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1771611745557879832.post-5019399042300826478</id><published>2012-02-16T11:57:00.003+05:30</published><updated>2012-02-16T11:57:42.296+05:30</updated><title type='text'>RHCT &amp; RHCE Exam Solution</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
RHCT &amp;amp; RHCE Exam Solution&lt;br /&gt;
&lt;br /&gt;
Q1. Create the following users, groups and group membership:&lt;br /&gt;
&lt;br /&gt;
#&amp;nbsp; groupadd sysusers&lt;br /&gt;
#&amp;nbsp; useradd -G sysusers andrew; passwd andrew&lt;br /&gt;
#&amp;nbsp; useradd -G sysusers susan; passwd susan&lt;br /&gt;
#&amp;nbsp; useradd -s /sbin/nologin brad; passwd brad&lt;br /&gt;
&lt;br /&gt;
Q2. Create a collaborative directory /shared/sysusers with following&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; characteristics:&lt;br /&gt;
&lt;br /&gt;
#&amp;nbsp; mkdir -p /shared/sysusers&lt;br /&gt;
#&amp;nbsp; chgrp sysusers /shared/sysusers&lt;br /&gt;
#&amp;nbsp; chmod 2770 /shared/sysusers&lt;br /&gt;
&lt;br /&gt;
Q3. Install appropriate kernel update from&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ftp://server1.example.com/pub/updates.&lt;br /&gt;
&lt;br /&gt;
-&amp;nbsp;&amp;nbsp; First download kernel from server using ftp.&lt;br /&gt;
#&amp;nbsp; ftp 192.168.1.254&lt;br /&gt;
#&amp;nbsp; mget kernel-* name&lt;br /&gt;
#&amp;nbsp; rpm -ivh -aid -force kernel-*&lt;br /&gt;
-&amp;nbsp;&amp;nbsp;&amp;nbsp; Check the /etc/grub.conf in that file what is the default=0 is there or not.&lt;br /&gt;
&lt;br /&gt;
Q4. Enable IP forwarding on your machine.&lt;br /&gt;
&lt;br /&gt;
#&amp;nbsp; vim /etc/sysctl.conf&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (line no. 7 ) net.ipv4.ip_forward = 1&lt;br /&gt;
#&amp;nbsp; sysctl -p&lt;br /&gt;
#&amp;nbsp; service network restart&lt;br /&gt;
&lt;br /&gt;
Q5. The user andrew must configure a cron job that runs daily at 15:25 local&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time and executes&amp;nbsp; &quot;/bin/echo hello&quot;.&lt;br /&gt;
&lt;br /&gt;
#&amp;nbsp; crontab -eu andrew&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25&amp;nbsp; 15&amp;nbsp; *&amp;nbsp; *&amp;nbsp; * /bin/echo &quot;hello&quot;&lt;br /&gt;
#&amp;nbsp; service crond restart&lt;br /&gt;
#&amp;nbsp; chkconfig crond on&lt;br /&gt;
&lt;br /&gt;
Q6. Bind to the NIS domain RHCE provided by 192.168.1.254 for usre&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; authentication.&lt;br /&gt;
# authconfig-tui&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; select user NIS&lt;br /&gt;
#&amp;nbsp; ypcat passwd&lt;br /&gt;
#&amp;nbsp; vim /etc/auto.master&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /rhome/stationX&amp;nbsp;&amp;nbsp;&amp;nbsp; /etc/auto.misc&lt;br /&gt;
#&amp;nbsp; vim /etc/auto.misc&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -rw,soft,intr&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 192.168.1.254:/rhome/nisuserX&lt;br /&gt;
#&amp;nbsp; service autofs restart&lt;br /&gt;
#&amp;nbsp; chkconfig autofs on&lt;br /&gt;
&lt;br /&gt;
Q7. Copy the file /etc/fstab to /var/tmp configure the permission of /var/tmp/fstab&lt;br /&gt;
&lt;br /&gt;
#&amp;nbsp; cp -prf /etc/fstab&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /var/tmp&lt;br /&gt;
#&amp;nbsp; setfacl -m u:andrew:rw /var/tmp/fstab&lt;br /&gt;
#&amp;nbsp; setfacl -m u:susan:--- /var/tmp/fstab&lt;br /&gt;
#&amp;nbsp; getfacl /var/tmp/fstab&lt;br /&gt;
&lt;br /&gt;
Q8. Configure SSH access as follows.&lt;br /&gt;
&lt;br /&gt;
#&amp;nbsp; yum install openssh*&lt;br /&gt;
#&amp;nbsp; vim /etc/ssh/sshd_config&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; allowusers susan&lt;br /&gt;
#&amp;nbsp; service sshd restart&lt;br /&gt;
#&amp;nbsp; chkconfig sshd on&lt;br /&gt;
#&amp;nbsp; iptables -I INPUT -s 192.168.0.0/255.255.255.0 -d 192.168.0.X -p tcp --dport&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 22 -j REJECT&lt;br /&gt;
&lt;br /&gt;
Q9. Configure POP3 email on your system according to these criteria&lt;br /&gt;
&lt;br /&gt;
#&amp;nbsp; yum install sendmail*&lt;br /&gt;
#&amp;nbsp; yum install dovecot*&lt;br /&gt;
#&amp;nbsp; vim /etc/mail/sendmail.mc&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; ( line no. 116) dnl # DAEMON_OPTIONS (&#39;port-smtp,addr- &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 127.0.0.1,Name=MTA&#39;) dnl&lt;br /&gt;
#&amp;nbsp; vim /etc/aliases&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; brad:&amp;nbsp; brad&lt;br /&gt;
#&amp;nbsp; vim /etc/dovecot.conf&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; Uncomment line no. 17&lt;br /&gt;
# &amp;nbsp; service sendmail restart&lt;br /&gt;
# &amp;nbsp; service dovecot restart&lt;br /&gt;
# &amp;nbsp; chkconfig sendmail on&lt;br /&gt;
# &amp;nbsp; chkconfig dovecot on&lt;br /&gt;
# &amp;nbsp; iptables -I INPUT -s 192.168.0.0/255.255.0.0 -d 192.168.0.X -p tcp -dport 110&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; -j REJECT&lt;br /&gt;
&lt;br /&gt;
Q10. Configure FTP access on your system&lt;br /&gt;
&lt;br /&gt;
#&amp;nbsp; yum install vsftp* &lt;br /&gt;
#&amp;nbsp; vim /etc/vsftpd/vsftpd.conf&lt;br /&gt;
#&amp;nbsp; service vsftpd restart&lt;br /&gt;
#&amp;nbsp; chkconfig vsftpd on&lt;br /&gt;
#&amp;nbsp; iptables -I INPUT -s 192.168.0.0/255.255.255.0 -d 192.168.0.X -p tcp -dport 21&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -j REJECT&lt;br /&gt;
&lt;br /&gt;
Q11. Share the /shared directory via SMB&lt;br /&gt;
&lt;br /&gt;
#&amp;nbsp; yum install samba* -y&lt;br /&gt;
#&amp;nbsp; vim /etc/samba/smb.conf&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; line 18: workgroup =&amp;nbsp; SMBGROUP&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; line 41: hosts allow 192.168.0.0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; go to bottom of the file and copy last 8 lines and make them uncomment&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [shared]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; comment&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; %m&#39;s stuff&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; path&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; /shared&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; valid users&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; susan&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public&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; no&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; writable&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; no&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; printable&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; no&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; create mask&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp; 0765&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; browseable&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; yes&lt;br /&gt;
#&amp;nbsp; service smb restart&lt;br /&gt;
#&amp;nbsp; chkconfigg smb on&lt;br /&gt;
#&amp;nbsp; smbpasswd -a susan&lt;br /&gt;
#&amp;nbsp; smbclient //192.168.0.X/shared -U susan&lt;br /&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; own pc IP address&lt;br /&gt;
#&amp;nbsp; chcon - R -t public_contect_t /shared&lt;br /&gt;
&lt;br /&gt;
Q12. Implement a web server for the site http://stationX.example.com&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; First download the index page from&lt;br /&gt;
&amp;nbsp; ftp://server1.example.com/pub/rhce/station.html&lt;br /&gt;
#&amp;nbsp; yum install http*&lt;br /&gt;
#&amp;nbsp; cp -rf stationX.html /var/www/html&lt;br /&gt;
#&amp;nbsp; cd /var/www/html&lt;br /&gt;
#&amp;nbsp; mv stationX.html index.html&lt;br /&gt;
#&amp;nbsp; vim /etc/httpd/conf/http.conf&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 250&amp;nbsp;&amp;nbsp; ServerAdmin &amp;nbsp;&amp;nbsp; root@stationX&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; 264 &amp;nbsp; ServerName &amp;nbsp; &amp;nbsp; stationX.example.com:80&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;The bottom of the configuration and copy last line and configure&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &lt;virtualhost stationx.example.com:80=&quot;&quot;&gt;&lt;/virtualhost&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; ServerAdmin&amp;nbsp; root@stationX&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; DocumentRoot /var/www/html&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; ServerName stationX.example.com&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; ErrorLog logs/ com-error_log&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Customlog logs/ access_log common&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
Q13. Export your /shred directory via NFS to example.com domain only&lt;br /&gt;
&lt;br /&gt;
#&amp;nbsp; yum install portmap*&lt;br /&gt;
#&amp;nbsp; yum install nfs*&lt;br /&gt;
#&amp;nbsp; vim /etc/exports&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; /shred &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; *.192.168.0.0/255.255.255.0(ro,sync)&lt;br /&gt;
#&amp;nbsp; service portmap restart&lt;br /&gt;
#&amp;nbsp; service nfs restart&lt;br /&gt;
#&amp;nbsp; chkconfig portmap on&lt;br /&gt;
#&amp;nbsp; chkconfig nfs on&lt;br /&gt;
&lt;br /&gt;
Q14. Configure an email alias for your MTA such that mail send to acctmgr&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; is received by the local user andrew&lt;br /&gt;
&lt;br /&gt;
#&amp;nbsp; vim /etc/aliases&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; acctmgr: &amp;nbsp;&amp;nbsp; andrew&lt;br /&gt;
#&amp;nbsp; newaliases&lt;br /&gt;
#&amp;nbsp; service sendmail restart&lt;br /&gt;
#&amp;nbsp; service dovecot restart&lt;br /&gt;
&lt;br /&gt;
Q15. Configure SMTP mail service&lt;br /&gt;
&lt;br /&gt;
#&amp;nbsp; vim /etc/mail/access &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Insert Connect:0.0.0.0/0.0.0.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RELAY&lt;br /&gt;
#&amp;nbsp; service sendmail restart&lt;br /&gt;
#&amp;nbsp; service dovecot restart&lt;br /&gt;
#&amp;nbsp; chkconfig sendmail on&lt;br /&gt;
#&amp;nbsp; chkconfig dovecot on&lt;br /&gt;
&lt;br /&gt;
ADDITIONAL RCHE QUES ANS.&lt;br /&gt;
&lt;br /&gt;
Q1. Implement a web proxy server bound to port 8080&lt;br /&gt;
&lt;br /&gt;
#&amp;nbsp; yum install squid*&lt;br /&gt;
#&amp;nbsp; vim /etc/squid/squid.conf&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Line no. 73&amp;nbsp; http_port 8080&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Line no. 2410 acl mynet src 192.168.0.0/255.255.255.0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; http_access allow mynet&lt;br /&gt;
#&amp;nbsp; service squid restart&lt;br /&gt;
#&amp;nbsp; chkconfig squid on&lt;br /&gt;
&lt;br /&gt;
Q2. Extend you web server to include a virtual host for site&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://wwwX.example.com&lt;br /&gt;
&lt;br /&gt;
#&amp;nbsp; mkdir -p /var/www/virtual&lt;br /&gt;
#&amp;nbsp; vim /etc/httpd/conf/httpd.conf&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Once again copy last line and configure for virtual host&lt;br /&gt;
&amp;nbsp; &lt;virtualhost wwwx.example.com:80=&quot;&quot;&gt;&lt;/virtualhost&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ServerAdmin root@stationX&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DocumentRoot /var/www/virtual&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ServerName wwwX.example.com&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ErrorLog logs/ access_log common&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
#&amp;nbsp; line no. 971 NameVirtualHost 192.168.0.X:80&lt;br /&gt;
#&amp;nbsp; service httpd restart&lt;br /&gt;
#&amp;nbsp; chkconfig httpd on&lt;br /&gt;
#&amp;nbsp; firefox&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; wwwX.example.com&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jitenjha.blogspot.com/feeds/5019399042300826478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1771611745557879832/5019399042300826478?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/5019399042300826478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/5019399042300826478'/><link rel='alternate' type='text/html' href='http://jitenjha.blogspot.com/2012/02/rhct-rhce-exam-solution.html' title='RHCT &amp; RHCE Exam Solution'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07663057837439208477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1771611745557879832.post-4638248869141115198</id><published>2012-02-15T17:46:00.002+05:30</published><updated>2012-02-16T15:05:18.436+05:30</updated><title type='text'>RHCT &amp; RHCE</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;Red Hat Certified Technician and &lt;/i&gt;&lt;/span&gt;&lt;span class=&quot;st&quot;&gt;&lt;i&gt;Red Hat Certified Engineer ( RHCT &amp;amp; RHCE)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;Exam Question and Solution&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;RHCT&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;Q1. Your system has a new 100MB physical partition mounted under&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /mnt/new with a 100MB ext3 filesystem.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;Note:because
 partition sizes are seldom exactly what is specified when they are 
created, anything within the range of 90 to 110MB is acceptable.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;Q2. Create the following users,groups and group memberships:&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;-&amp;nbsp;&amp;nbsp; A group named sysusers.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;-&amp;nbsp; A user andrew who belongs to sysusers as a secondary group.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;-&amp;nbsp; A user susan who also belongs to sysusers as a secondary group.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;-&amp;nbsp; A user brad who does not have access to an interactive shell on&amp;nbsp; the&amp;nbsp;&amp;nbsp;&amp;nbsp; system, and who is not a member of sysusers.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;- andrew, susan and brad should all have th password of password.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;Q3. Create a collaborative directory /shared/sysusers with the following characteristics.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;-&amp;nbsp; Group ownership of /shared/sysusers is sysusers.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;-&amp;nbsp; The directory should be readable, writable and accessible to member&amp;nbsp;&amp;nbsp; of sysusers, but not to any other user.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;&amp;nbsp;( it is understood that root has access to all o,less and directories on the system.)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;-&amp;nbsp; Files crated in /shared/sysusers automatically have group ownership set to the sysusers group.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;Q5. Set SELinux running in the Enforcing mode.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;Q6. Enable IP forwarding on your machine.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;Q7. Install th appropriate kernel update from&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ftp://server1.example.com/pub/update. the following criteria must&amp;nbsp; also be met:&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;- The updated kernel is the default kernel when the system is rebooted&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;- The original kernel remains available and bootable on the system .&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;Q8. The user andrew must configure a cron job that runs daily at 15:25 local time and ececutes&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;- /bin/echo hello&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;Q9. Bind to the NFS domain RHCE provided by 192.168.1.254 for user authentication.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;Note the following:&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;- nisuserx should be able to log into your system, where x is your station number.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;- but will not have a home directory untilll you have completed the autofs requirement below.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;- All NFS users have a password of password&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;Q10. Configure autofs to automount the home directories of NIS users.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;&amp;nbsp; Note the following:&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;- server1.example.com (192.168.1.254) NFS-exports /rhome/stationX to your system where X is your station Number.&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;nisuserX&#39;s home directory is&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;server1.example.com:/rhome/stationX/nisuserX&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;- nisuserX&#39;s home directory should be automounted locally beneath /rhome as /rhome/nisuserX&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;- Home directories must be writable by thier users.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;- While you are able to log in as any of the users nisuser1 through&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nisuser20, the only home.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;&amp;nbsp; directory that is accessible from your system is nisuserX.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;Q11. Copy the file /etc/fstab to /var/tmp. Configure the permissions of /var/tmp/fstab so that:&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;- The file /var/tmp/fstab is owned by the root user.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;- The file /var/tmp/fstab belongs to the group root.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;- The file /var/tmp/fstab should not be executable by anyone.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;- The user andrew is able to read and write /var/tmp/fastab.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;- The user susan can neither write nor rad /var/tmp/fstab.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;- All other users ( current or future ) have the ability to read /var/tmp/fstab.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;Q12. Configure your system so that it is an NTP client of server1.example.com.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;Q13. Set up the default local print queue to forward jobs to the IPP ( CUPS ) print queue stationX on server1.example.com,&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;- Where&amp;nbsp; X is your station number. Configure this printer as a &quot;Generic - test - only &quot; print queue.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;Note: The queue stationX on server1 dump print jobs into the file&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;http://server1.example.com:631/printers/stationX.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;- This file can be examined to confirm that you have configured the print queue correctly.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;&amp;nbsp; &lt;/i&gt;&lt;/span&gt;&lt;span class=&quot;st&quot;&gt;RHCE Requirement&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;Q1. Resize the lvm lv00 up to 100 MB.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;Q2. Implement user quota according to following criteria.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;- The user neo should be able to run the command&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;- dd if = /dev/zero of=/home/neo/somefile bs=1024k count=30&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;- and should not be able to run the command&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;- dd if=/dev/zero of=/home/neo/somefile bs=1024k count=70&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;Q3. Configure SSH access as follows:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp; susan has remote SSH access to your not have access to your machine from with in example.com.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;- Clients within my133t.org should not have access to ssh on your system.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;Q4. Configure POP3 email on your system according to these criteria;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;- brad must be able to retrieve email from your machine using POP3 from&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&amp;nbsp; within example.com&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;- Client within the my133t.org domain should&amp;nbsp; not have access to your POP3 services.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;Q5. Configure FTP access on your system:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp; Clients within the example.com domain should have anonymous FTP access&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&amp;nbsp;&amp;nbsp; to your machine.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp; Clients outside example.com should not have access to your FTP services .&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;Q6. Share the /share directory via SMB:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp; Your SMB server must be a member of the SMBGROUP workgroup&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp; The share&#39;s name must shared.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp; Theshared share must be available to example.com domain clients only.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp; Theshared share must be browseable.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp; susan must have read access to the share, authenticating with the sane password password, if necessary.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;Q7. Implement a web server for the site http://stationX.example.com, then&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; perform the following steps:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp; Download ftp://server1.example.com/pub/rhce/station.html&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp; Rename the downloaded file to index.html&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp; Copy this index.html to the DocumentRoot of your web server.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp; Do not nake any modification to the content of index.html&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;Q8. Export your /shared directory via NFS to the example.com domain only.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;Q9. Configure an email alias for your MTA such that mail sent to acctmgr is received by the local user andrew.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;Q10. Configure SMTP mail services according to the following requirements:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp; Your mail server should accept mail from remote hosts and localhsot.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp; susam must be able to receive mail from remote hosts.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp; Mail delivered to susan should spool into the default mail spool for susam,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&amp;nbsp;&amp;nbsp; /var/spool/mail/susan.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;Additional RHCE Requirements&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;Perform any two of the following steps.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;br /&gt;Completion of more than two will not result in extra credit.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;If time allows, you may wish to complete more than the minimum just in case one of your tasks does not meet our specio,cations.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;Please note that these additional items are part of your RHCE-specific score.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;Q1. Povide SSL-encapsulated IMAP access ( IMAPS ) :&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp; IMAPS must be available to bard from example.com&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp; IMAPS must not be available to other networks or domains.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp; The SSL certion,cate for the IMAPS server must be created as follows.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp;&amp;nbsp; Use the default for country, state, locality and organization name.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp;&amp;nbsp; Set organization unit to GLS.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp;&amp;nbsp; Set common name to stationX.example.com&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp;&amp;nbsp; Set Email address to root@stationX.example.com&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;Q2. Implement a web proxy server bound to port 8080.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp;&amp;nbsp; Clients within example.com should have access to your proxy server.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp;&amp;nbsp; Clients outside of example.com should not have access to your proxy server.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;Q3. Extend your web server to include a virtual host for the site&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://wwwX.example.com/, where X is &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp; Your station number, then perform the following steps:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp; Set the DocumentRoot to /var/www/virtual&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp; Download ftp://server1.example.com/pub/rhce/www.html&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp; Rename the downloaded file to index.html&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp; Place this index.html in the documentsroot of the virtual host&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp; Do not make any modification to the content of index.html&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;-&amp;nbsp; Ensure that susan is able to create content in /var/www/virtual&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;Note: The original web site http://stationX.example.com must still be accessable.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;DNS resolution for the hostname wwwX.example.com is already provided by the name server on server1.example.com&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;st&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;st&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jitenjha.blogspot.com/feeds/4638248869141115198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1771611745557879832/4638248869141115198?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/4638248869141115198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/4638248869141115198'/><link rel='alternate' type='text/html' href='http://jitenjha.blogspot.com/2012/02/rhct-rhce.html' title='RHCT &amp; RHCE'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07663057837439208477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1771611745557879832.post-8293580047766590531</id><published>2012-02-14T17:13:00.000+05:30</published><updated>2012-02-14T17:13:02.242+05:30</updated><title type='text'>Linux Mail Server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Configuring Linux Mail Server&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;i&gt;Configuring postfix &amp;amp; Sendmail.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;How postfix &amp;amp; Sendmail works.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Installing postfix &amp;amp; Sendmail.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Starting postfix &amp;amp; sendmail.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;How to Restart sendmail &amp;amp; postfix after editing your configuration files.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;The /etc/mail/sendmail.mc file.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Configuring DNS for sendmail.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;How to configure Linux Sendmail &amp;amp; postfix clients.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Converting from a mail client to a Mail server.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;The /etc/mail/relay-domains file.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;The /etc/mail/access file.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;The /etc/mail/local-host-names file.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Which user should really receive the mail?&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Sendmail Masquerading Explained.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Using Sendmail to change the sender&#39;s Email Address.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Troubleshooting Sendmail.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Fighting SPAM.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Using Public SPAM Blacklists with Sendmail.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Spamassassin.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;A simple PERL script to help stop SPAM.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Configuring your POP Mail Server.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Installing your POP Mail Server.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Starting your POP Mail Server.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;How to Configure your windows Mail programs.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Configuring Secure POP Mail.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;How to handle overlapping email addresses.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Troubleshooting POP Mail.&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jitenjha.blogspot.com/feeds/8293580047766590531/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1771611745557879832/8293580047766590531?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/8293580047766590531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/8293580047766590531'/><link rel='alternate' type='text/html' href='http://jitenjha.blogspot.com/2012/02/linux-mail-server.html' title='Linux Mail Server'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07663057837439208477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1771611745557879832.post-4601390892689057884</id><published>2012-02-14T11:13:00.002+05:30</published><updated>2012-02-14T11:13:21.632+05:30</updated><title type='text'>MySql,Squid,Network Based Installation and LVM, Quotas</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Controlling Web Usage with Squid&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;i&gt;Download and Install the squid package.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;The /etc/squid/squid.conf file.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Configuring web browsers to use your squid server.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;How to get squid started.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Squid and Firewalls.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;squid Disk usage.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Troubleshooting squid.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Other squid capabilities.&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Basic MySql Configuration&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;i&gt;Installing MySQL.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Starting MySQL.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;A common Fedora&amp;nbsp; MySQL startup error.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;The location of MySQL Databases.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Creating a MySQL &quot;root&quot; Account.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Accessing the MySQL command line.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Creating and Deleting MySQL Databases.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Recovering your MySQL Root password.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;MySQL granting privileges to users.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;MySQL database Backup.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;MySQL database restoration.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Very Basic MySQL Network Security.&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Networking Based Linux Installation&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;i&gt;Setting up th installation server.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Creating boot diskettes.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;The Networking Installation.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Troubleshooting the network installation.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Automating installation with RadHat Kickstart.&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;LVM (Logical Volume Manager )&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;i&gt;Expanding Linux Partitions with LVM.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;LVM Terminologies.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Configuring LVM Devices.&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Managing Disk Usage with Quotas&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;i&gt;Setting up Quotas.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Other Quota Topics.&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jitenjha.blogspot.com/feeds/4601390892689057884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1771611745557879832/4601390892689057884?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/4601390892689057884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/4601390892689057884'/><link rel='alternate' type='text/html' href='http://jitenjha.blogspot.com/2012/02/mysqlsquidnetwork-based-installation.html' title='MySql,Squid,Network Based Installation and LVM, Quotas'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07663057837439208477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1771611745557879832.post-8935538821972884882</id><published>2012-02-14T10:56:00.002+05:30</published><updated>2012-02-14T10:56:32.894+05:30</updated><title type='text'>SSH, DNS, Apache and NFS server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Secure Remote Logins &amp;amp; File Copying&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;i&gt;Using Secure Shell as a replacement for telnet.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Testing to see if SSH if running.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;The /etc/ssh/sshd_config file.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Using SSH to login to a remote machine.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;What you should expect to see when you log in.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Deactivating telnet once SSH is installed.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Using SCP as a more secure replacement for FTP.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Copying files using SCP without a password.&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Configuring DNS&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;i&gt;What is DNS?&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;What is BIND?&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;How DNS is critical to web hosting.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;When to use a DNS caching name server.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;When to use a regular DNS server.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;How to Download &amp;amp; install the BIND packages.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;How to get Bind started.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Configuring a caching name server.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;configure a regular name server.&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Web Hosting with the Apache Web Server&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;i&gt;Download &amp;amp; Install the Apache package.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;How to get Apache started.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Configuring DNS for Apache.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;General configuration steps.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;File Permission and Apache.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Virtual Hosting- Single IP Address - Many sites.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Apache Running on a server behind a firewell.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;How to protect web page Directories with passwords.&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Remote Disk Access with NFS&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;i&gt;Installing NFS.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;How to get NFS started.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;The /etc/exports file.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Activating modifications the exports file.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;NFS and DNS.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Configuring the NFS client.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Other NFS considerations. &lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jitenjha.blogspot.com/feeds/8935538821972884882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1771611745557879832/8935538821972884882?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/8935538821972884882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/8935538821972884882'/><link rel='alternate' type='text/html' href='http://jitenjha.blogspot.com/2012/02/ssh-dns-apache-and-nfs-server.html' title='SSH, DNS, Apache and NFS server'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07663057837439208477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1771611745557879832.post-3695807383836828880</id><published>2012-02-13T17:27:00.002+05:30</published><updated>2012-02-13T17:27:18.379+05:30</updated><title type='text'>FTP Server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;u&gt;&lt;b&gt;Configuring a Linux FTP Srever&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;i&gt;FTP Overview.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Problem with FTP and firewalls.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;How to Download and Install the VSFTP Package.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;How to get VSFTP started.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Testing to see if VSFTP is running.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;What is Anonymous FTP?&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;The /etc/vsftpd.conf file.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;How to configure VSFTPD to run with authenticated logins.&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;u&gt;Secure Remote Logins &amp;amp; File Copying&amp;nbsp;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;i&gt;Using Secure Shell as a replacement for Telnet.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Testing to see if SSH is running.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;The /etc/ssh/sshd_config file.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Using SSH to Login to a Remote Machine.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;What you should expect to see when you log in.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Deactivating telnet once SSH is installed.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Using SCP as a more secure replacement for FTP.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;copying files using SCP without a password.&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;u&gt;Configuring DNS&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;i&gt;What is DNS?&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;What is Bind?&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;How DNS is Critical to web Hosing.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;When to use DNS Caching Name Server.&amp;nbsp;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;When to use a regular DNS server.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;How to download &amp;amp; install the bind package.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;How to get BIND started.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Configuring A Caching Name Server.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Configuring A Regular Name Server.&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;u&gt;&lt;b&gt;Web Hosing with the Apache Web Server&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;i&gt;Download &amp;amp; Install the apache Package.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;How to get Apache started.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Configuring DNS for apache.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;General configuration steps.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;File Permissions And Apache.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Virtual Hosting - Single IP Address - Many Sites.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Apache Running on a server Behind a firewall.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;How to protect web page Directories with passwords.&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jitenjha.blogspot.com/feeds/3695807383836828880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1771611745557879832/3695807383836828880?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/3695807383836828880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/3695807383836828880'/><link rel='alternate' type='text/html' href='http://jitenjha.blogspot.com/2012/02/ftp-server.html' title='FTP Server'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07663057837439208477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1771611745557879832.post-1312420188633781667</id><published>2012-02-13T17:14:00.004+05:30</published><updated>2012-02-13T17:14:36.548+05:30</updated><title type='text'>Samba Server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;u&gt;&lt;b&gt;Configuring Samba Server&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;i&gt;How to install Samba packages.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;How to start Samba.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;The Samba Configuration file.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;How SWAT makes Samba Simpler.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Creating A starter configuration.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Fine tuning the configuration.&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;u&gt;&lt;b&gt;Sharing Resources with Samba&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;i&gt;Adding A printer to a Samba PDC.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Creating Group shares in SAMBA.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Windows Drive sharing with your SAMBA Server.&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;u&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;u&gt;&lt;b&gt;Linux Wireless Networking&amp;nbsp;&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;
&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;i&gt;Wireless Linux compatible NICs.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Common Wireless Networking Terms.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Networking with linux wireless-Tools.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Configuring 802.11g with linux incompatible NICs ( with an NDIS wrapper exam).&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Compiling ndiswrapper.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Networking with linux-WLAN.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Linux-WLAN Preparation.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Installing the linux-WLAN Drivers.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Post installation Steps.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Linux-WLAN Encryption for security.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Troubleshooting your Wireless LAN.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Wireless networking in businesses.&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jitenjha.blogspot.com/feeds/1312420188633781667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1771611745557879832/1312420188633781667?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/1312420188633781667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1771611745557879832/posts/default/1312420188633781667'/><link rel='alternate' type='text/html' href='http://jitenjha.blogspot.com/2012/02/samba-server.html' title='Samba Server'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07663057837439208477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>