<?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-7597479095358859665</id><updated>2024-09-02T01:23:24.720-07:00</updated><category term="SOLARIS"/><category term="LDAP"/><category term="SCRIPTING"/><category term="BSD-UNIX"/><category term="MAIL SERVER"/><category term="MYSQL"/><category term="SED(Stream Editor)"/><category term="X11"/><category term="AD-LINUX"/><category term="BONDING"/><category term="KERBEROS"/><category term="NAMP"/><category term="OPENNMS"/><category term="OPENVZ"/><category term="SECURITY"/><category term="SQUID"/><category term="SYSLOG"/><category term="APACHE"/><category term="FTP"/><category term="KERNEL"/><category term="PAM"/><category term="RSYNC"/><category term="SAMBA"/><category term="SSH"/><category term="SSL/TSL"/><category term="VNC"/><title type='text'>Only for Geeks</title><subtitle type='html'>Home page of Linux and Unix admins</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://playingwithtux.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://playingwithtux.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Vasanth Muraleedahran</name><uri>http://www.blogger.com/profile/01757300712038207442</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>115</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7597479095358859665.post-5205595178247913285</id><published>2017-08-26T01:05:00.001-07:00</published><updated>2017-08-26T01:05:33.785-07:00</updated><title type='text'>SOLARIS DISK PARTITIONING</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;u&gt;DISK TERMINOLOGY&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Disk contain the following components.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Tracks&lt;br /&gt;
&lt;br /&gt;
2. Cylinders&lt;br /&gt;
&lt;br /&gt;
3.Sectors/Blocks&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tracks&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
Tracks are the concentric ring on the each paltter .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cylinder&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
Groups of tracks&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sectors/Blocks&lt;br /&gt;
&lt;br /&gt;
----------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
512 byte block. Which is the smallest unit represented in hardisk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Partition with Solaris is AKA slices&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To display the Slices with in the harddisk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#df -h&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
X86 PCS are limited to 4 primary partitions. Normally x86are divided in to 3 primary and 1 extended.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE:Solaris need one fdisk Partition for it&#39;s use.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want to add another harddrive disk1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Create fdisk partion for Solaris use&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Then Create&amp;nbsp; Slices&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE: Solaris uses a VTOC(VOLUME TABLE OF CONTENT) to represent the various slices with long fdisk partition on the disk. On the Sparc&amp;nbsp; Solaris uses VTOC to represent al the slices. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SLICE RULES USING VTOC&lt;br /&gt;
&lt;br /&gt;
---------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1, Slices may created using VTOC on X86&lt;br /&gt;
&lt;br /&gt;
2. These 10 slicers are represented by 0 to 9.&lt;br /&gt;
&lt;br /&gt;
3. Slices 2,8,9 are reserved. Slice 2 is reserverd for VTOC&lt;br /&gt;
&lt;br /&gt;
NOTE: VTOC Represent the disk label and occupying slice2&lt;br /&gt;
&lt;br /&gt;
4. Slices 0,1,3,6,7 are avilable for use.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Root file system is slice 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PRINT VROC/DISKLABEL USING&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# prtvtoc /dev/dsk/c0t0d0s0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
C0 - Controller Number ## 1st controller&lt;br /&gt;
&lt;br /&gt;
t0- Identifier for the bus orientated controller SCASI/SATA ### For IDE hardisk t0 is not present.&lt;br /&gt;
&lt;br /&gt;
d0 - Represents disk number.&lt;br /&gt;
&lt;br /&gt;
s0- Slice0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
VTOC information contain entair diskinformation. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;FORAMAT UTILITY &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. To open the format utility&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# format&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. To list the disk attached to the system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
format&amp;gt; disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. To select a disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enter the disk Number want to select and put enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. To discribe the current disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
format&amp;gt; Current&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The output of the above command is shown below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Current Disk = c1d0&lt;br /&gt;
&lt;br /&gt;
&lt;default 255=&quot;&quot; 2=&quot;&quot; 30398=&quot;&quot; 63=&quot;&quot; alt=&quot;&quot; cyl=&quot;&quot; hd=&quot;&quot; sec=&quot;&quot;&gt;&lt;br /&gt;&lt;br /&gt;/pci@0,0/pci-ide@1f,2/ide@1/cmdk@0,0&lt;/default&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5, In the format menu we can get help by pressing question mark or help&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Inside format tool there is a utilty called format. To format the a selected disk use the following steps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
format&amp;gt; disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
select the disk you want to format&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
format &amp;gt; format&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;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;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;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://playingwithtux.blogspot.com/feeds/5205595178247913285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://playingwithtux.blogspot.com/2017/08/solaris-disk-partitioning.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/5205595178247913285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/5205595178247913285'/><link rel='alternate' type='text/html' href='http://playingwithtux.blogspot.com/2017/08/solaris-disk-partitioning.html' title='SOLARIS DISK PARTITIONING'/><author><name>Vasanth Muraleedahran</name><uri>http://www.blogger.com/profile/01757300712038207442</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-7597479095358859665.post-9080826140253239209</id><published>2017-08-26T01:05:00.000-07:00</published><updated>2017-08-26T01:05:07.877-07:00</updated><title type='text'>Copy the perserving the file permissions.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Copy file from source to destination with preserve permissions in linux&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# cp -apvf source destination&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://playingwithtux.blogspot.com/feeds/9080826140253239209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://playingwithtux.blogspot.com/2017/08/copy-perserving-file-permissions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/9080826140253239209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/9080826140253239209'/><link rel='alternate' type='text/html' href='http://playingwithtux.blogspot.com/2017/08/copy-perserving-file-permissions.html' title='Copy the perserving the file permissions.'/><author><name>Vasanth Muraleedahran</name><uri>http://www.blogger.com/profile/01757300712038207442</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-7597479095358859665.post-3645240226827986203</id><published>2014-08-11T09:39:00.001-07:00</published><updated>2017-08-26T01:04:15.608-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SED(Stream Editor)"/><title type='text'></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;b&gt;&lt;u&gt;SED Search and Replace&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I am using /etc/nsswitch.conf file in below format&amp;nbsp; as and example.&lt;br /&gt;
&lt;br /&gt;
# cat&amp;nbsp; /etc/nsswitch.conf&lt;br /&gt;
&lt;br /&gt;
passwd:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; compat&lt;br /&gt;
group:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; compat&lt;br /&gt;
shadow:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; compat&lt;br /&gt;
&lt;br /&gt;
hosts:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; files&lt;br /&gt;
networks:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; files&lt;br /&gt;
&lt;br /&gt;
protocols:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; db files&lt;br /&gt;
services:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; db files &lt;br /&gt;
ethers:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; db files&lt;br /&gt;
rpc:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; db files&lt;br /&gt;
&lt;br /&gt;
netgroup:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nis&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. How to replace pattern with another using sed ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# sed &#39;s/netgroup/netgroup1/&#39; /etc/nsswitch.conf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. How to replace word with another&amp;nbsp; in line contain keyword using sed ?&lt;br /&gt;
&lt;br /&gt;
Below example will be replacing word files with ldap if the line contain the word&amp;nbsp; services.&lt;br /&gt;
&lt;br /&gt;
# sed&amp;nbsp; &#39;/services/s/files/ldap/&#39; /etc/nssswitch.conf&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;
&lt;b&gt;&lt;u&gt;GLOBAL FLAG&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3 . How to replace the 1st occurrence of lower case &quot;a&quot; with upper case &quot;A&quot; ?&lt;br /&gt;
&lt;br /&gt;
#&amp;nbsp; sed &#39;s/a/A/&#39;&amp;nbsp; /etc/nsswitch.conf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. How to replace all occurrences of lower case &quot;a&quot; with upper case &quot;A&quot; ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# sed &#39;s/a/A/g&#39;&amp;nbsp;  /etc/nsswitch.conf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;
&lt;u&gt;&lt;b&gt;Number Flag&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. How to replace the 2nd occurrence of lower case &quot;a&quot; to upper case &quot;A:&quot; ?&lt;br /&gt;
&lt;br /&gt;
#&amp;nbsp; sed &#39;s/a/A/2&#39; /etc/nsswitch.conf&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://playingwithtux.blogspot.com/feeds/3645240226827986203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://playingwithtux.blogspot.com/2014/08/sed-search-and-replace-here-i-am-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/3645240226827986203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/3645240226827986203'/><link rel='alternate' type='text/html' href='http://playingwithtux.blogspot.com/2014/08/sed-search-and-replace-here-i-am-using.html' title=''/><author><name>Vasanth Muraleedahran</name><uri>http://www.blogger.com/profile/01757300712038207442</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-7597479095358859665.post-2926286692029469930</id><published>2014-01-11T03:51:00.001-08:00</published><updated>2015-04-14T11:48:07.304-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SCRIPTING"/><title type='text'>Customizing Your  SHELL Prompt in Unix with TIME</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
How to display time in the bash promt ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# declare -x PS1=&quot; \@ Bash $ &quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;05:05 PM Bash $ &lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://playingwithtux.blogspot.com/feeds/2926286692029469930/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://playingwithtux.blogspot.com/2014/01/customizing-your-shell-prompt-in-unix.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/2926286692029469930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/2926286692029469930'/><link rel='alternate' type='text/html' href='http://playingwithtux.blogspot.com/2014/01/customizing-your-shell-prompt-in-unix.html' title='Customizing Your  SHELL Prompt in Unix with TIME'/><author><name>Vasanth Muraleedahran</name><uri>http://www.blogger.com/profile/01757300712038207442</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-7597479095358859665.post-9053901729460043681</id><published>2014-01-11T03:16:00.000-08:00</published><updated>2015-04-14T11:49:29.552-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SCRIPTING"/><title type='text'>Setting Permission while creating directories </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
How to set permission while creating creating directory in linux ?&lt;br /&gt;
&lt;br /&gt;
# &lt;span style=&quot;color: red;&quot;&gt;mkdir --parents --mode=550 vasanth/backup/january&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
--mode=m ( -m )—Sets the permission mode (as in chmod )&lt;br /&gt;
--parents ( -p )—Makes all necessary directories even if they don’t currently exist&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://playingwithtux.blogspot.com/feeds/9053901729460043681/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://playingwithtux.blogspot.com/2014/01/setting-permission-while-creating.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/9053901729460043681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/9053901729460043681'/><link rel='alternate' type='text/html' href='http://playingwithtux.blogspot.com/2014/01/setting-permission-while-creating.html' title='Setting Permission while creating directories '/><author><name>Vasanth Muraleedahran</name><uri>http://www.blogger.com/profile/01757300712038207442</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-7597479095358859665.post-5535388435442293394</id><published>2014-01-11T03:04:00.002-08:00</published><updated>2015-04-14T11:49:39.238-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SCRIPTING"/><title type='text'> How to classify files and directories in  &quot;ls&quot; command ?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;u&gt;&lt;br /&gt;&lt;/u&gt;
&lt;u&gt;How to classify in ls command ?&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;ls command can classify directories,files,programs,symbolic links and named pipes.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;# ls --color=never --classify&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;The –classify symbols are directories ( / ), programs ( * ), symbolic links ( @ ), pipes ( | ),and Unix domain socket files ( = ).&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://playingwithtux.blogspot.com/feeds/5535388435442293394/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://playingwithtux.blogspot.com/2014/01/classifying-files-in-ls-command.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/5535388435442293394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/5535388435442293394'/><link rel='alternate' type='text/html' href='http://playingwithtux.blogspot.com/2014/01/classifying-files-in-ls-command.html' title=' How to classify files and directories in  &quot;ls&quot; command ?'/><author><name>Vasanth Muraleedahran</name><uri>http://www.blogger.com/profile/01757300712038207442</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-7597479095358859665.post-692877128457492783</id><published>2014-01-11T02:33:00.002-08:00</published><updated>2015-04-14T11:49:48.475-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SCRIPTING"/><title type='text'>OR &amp; AND  conditions in  shell scripts</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;OR Statement in shell scripts&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
|| is known as OR statement in shell script.&lt;br /&gt;
&lt;br /&gt;
Eg:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# id user1 || useradd user1&lt;br /&gt;
&lt;br /&gt;
In the above example if the user1 exist in the system the second command will not be executed. If the user1 does not exist second command will be executed.&lt;br /&gt;
&lt;br /&gt;
If first command returns true second will not exist run. if the command is false second will be executed.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;AND Statement in shell scripts&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Eg:&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&amp;amp; is known as AND in shell script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#&amp;nbsp; [ -d /tmp/test ] &amp;amp;&amp;amp; rm -rf /tmp/test&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;If the first command is true the second command will be executed. If the first&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
false second command second will not executed.&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://playingwithtux.blogspot.com/feeds/692877128457492783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://playingwithtux.blogspot.com/2014/01/or-and-in-shell-script.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/692877128457492783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/692877128457492783'/><link rel='alternate' type='text/html' href='http://playingwithtux.blogspot.com/2014/01/or-and-in-shell-script.html' title='OR &amp; AND  conditions in  shell scripts'/><author><name>Vasanth Muraleedahran</name><uri>http://www.blogger.com/profile/01757300712038207442</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-7597479095358859665.post-3240003679495630260</id><published>2013-12-21T02:12:00.002-08:00</published><updated>2015-04-14T11:49:55.749-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SCRIPTING"/><title type='text'>ldapsearch using shell script</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Shell script to serach data in LDAP&lt;br /&gt;
&lt;br /&gt;
Below shell script can be used to search data in ldap. Modify the script accordingly for your needs.&lt;br /&gt;
&amp;nbsp;Have fun !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;#!/bin/bash
&lt;/pre&gt;
&lt;pre&gt;case &quot;$1&quot; in
# Searching LDAP name from full name 
ln)
LN=
# Group search
gs)
GID=`ldapsearch -x -b &quot;dc=test,dc=com&quot; &quot;(cn=$2)&quot; | sed -n -e &#39;/^gid/p&#39; | cut -d: -f2`;
if [  &quot;$GID&quot; = &quot;&quot; ]; then
echo &quot; The &quot;$2&quot; LDAP group does not  exist&quot;
else
echo &quot;GID OF the $2 group is $GID&quot;
MEM=`ldapsearch -x -b &quot;dc=test,dc=com&quot; &quot;(cn=$2)&quot; | sed -n -e &#39;/^member/p&#39; | cut -d: -f2`;
if [ &quot;$MEM&quot;  = &quot;&quot; ]; then
echo &quot; No users belong to this group &quot;
else
echo &quot;Following are the members of the $2 LDAP GROUP&quot;
echo &quot;$MEM&quot;
fi
fi
;;
# User Search
us)
USER1=`ldapsearch -x -b &quot;dc=test,dc=com&quot; &quot;(uid=$2)&quot; | sed -n -e &#39;/^dn/p&#39; | cut -d: -f2`;
if [ &quot;$USER1&quot; = &quot;&quot; ]; then
echo &quot;User does not exist&quot;
else
echo $USER1
MEM1=`ldapsearch -x -b &quot;dc=test,dc=com&quot; &quot;(memberUid=$2)&quot; | sed -n -e &#39;/^dn/p&#39; | cut -d: -f2`;
echo &quot;$MEM1&quot;
fi
;;
*)
echo &quot;lquery.sh &lt;gs&gt; &lt;groupname&gt;&quot;
echo &quot;lquery.sh &lt;us&gt; &lt;username&gt;&quot;
;;
esac
&lt;/username&gt;&lt;/us&gt;&lt;/groupname&gt;&lt;/gs&gt;&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://playingwithtux.blogspot.com/feeds/3240003679495630260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://playingwithtux.blogspot.com/2013/12/shell-script-to-serach-data-in-ldap.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/3240003679495630260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/3240003679495630260'/><link rel='alternate' type='text/html' href='http://playingwithtux.blogspot.com/2013/12/shell-script-to-serach-data-in-ldap.html' title='ldapsearch using shell script'/><author><name>Vasanth Muraleedahran</name><uri>http://www.blogger.com/profile/01757300712038207442</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-7597479095358859665.post-2648719301939315507</id><published>2013-12-21T02:09:00.000-08:00</published><updated>2015-04-14T11:50:06.459-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SED(Stream Editor)"/><title type='text'>SED- Stream Editor</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
1. How to Print all the lines in a file using sed
&lt;br /&gt;
&lt;pre&gt;# sed &#39;p&#39; test.txt
&lt;/pre&gt;
To print the Second line in a file 
&lt;br /&gt;
&lt;pre&gt;# sed -n &#39;2 p&#39; test.txt
&lt;/pre&gt;
To print from line 1 to line 4 
&lt;br /&gt;
&lt;pre&gt;# sed -n &#39;2 p&#39; test.txt
&lt;/pre&gt;
To Print from line 2 through the last line
&lt;br /&gt;
&lt;pre&gt;# sed -n &#39;2,$ p&#39; test.txt
&lt;/pre&gt;
To Print lines matching the pattern “vasanth”
&lt;br /&gt;
&lt;pre&gt;# sed -n &#39;/vasanth/ p&#39; test.txt
&lt;/pre&gt;
To Print lines starting from the 1st match of &quot;Vasanth&quot; until the 4th
&lt;br /&gt;
&lt;pre&gt;# sed -n &#39;/vasanth/,4 p&#39; test.txt
&lt;/pre&gt;
To Print lines starting from the 1st match of &quot;vasanth&quot; until the last line
&lt;br /&gt;
&lt;pre&gt;# sed -n &#39;/vasanth/,$ p&#39; test.txt
&lt;/pre&gt;
To Print lines starting from the line matching &quot;Vasanth&quot; until the line
matching &quot;Hemanth&quot;:
&lt;br /&gt;
&lt;pre&gt;# sed -n &#39;/Vasanth/,/Hemanth/ p&#39; test.txt
&lt;/pre&gt;
To Print the line matching &quot;Jason&quot; and 2 lines immediately after that
&lt;br /&gt;
&lt;pre&gt;# sed -n &#39;/Vasanth/,+2 p&#39; test.txt
&lt;/pre&gt;
DELETE LINES 
&lt;br /&gt;
To delete all the lines in a file
&lt;br /&gt;
&lt;pre&gt;# sed &#39;d&#39; test.txt
&lt;/pre&gt;
To delete only the two lines
&lt;br /&gt;
&lt;pre&gt;# sed &#39;2 d&#39; test.txt
&lt;/pre&gt;
To Delete from line 1 through 4
&lt;br /&gt;
&lt;pre&gt;# sed &#39;1,4 d&#39; test.txt
&lt;/pre&gt;
To Delete from line 2 through the last line
&lt;br /&gt;
&lt;pre&gt;# sed &#39;2,$ d&#39; employee.txt
&lt;/pre&gt;
To delete only odd number of lines
&lt;br /&gt;
&lt;pre&gt;# sed &#39;1~2 d&#39; test.txt
&lt;/pre&gt;
To delete lines matching the pattern &quot;Sysadmin&quot;
&lt;br /&gt;
&lt;pre&gt;# sed &#39;/Sysadmin/ d&#39; test.txt
&lt;/pre&gt;
To delete lines starting from the 1st match of &quot;Vasanth&quot; until the 4th line
&lt;br /&gt;
&lt;pre&gt;# sed &#39;/Vasanth/,4 d&#39; test.txt
&lt;/pre&gt;
To delete lines starting from the 1st match of &quot;Vasanth&quot; until the 4th line
&lt;br /&gt;
&lt;pre&gt;# sed &#39;/Vasanth/,4 d&#39; test.txt
&lt;/pre&gt;
To delete lines starting from the 1st match of &quot;Vasanth&quot; until the last line
&lt;br /&gt;
&lt;pre&gt;# sed &#39;/Vasanth/,$ d&#39; test.txt
&lt;/pre&gt;
To delete lines starting from the line matching &quot;Vasanth&quot; until the line
matching &quot;Hemanth&quot;:
&lt;br /&gt;
&lt;pre&gt;# sed &#39;/Vasanth/,/Hemanth/ d&#39; test.txt
&lt;/pre&gt;
To delete lines starting from the line matching &quot;Vasanth&quot; and 2 lines
immediately after that:
&lt;br /&gt;
&lt;pre&gt;# sed &#39;/Vasanth/,+2 d&#39; test.txt
&lt;/pre&gt;
Useful Delete Examples
&lt;br /&gt;
To delete all the empty lines from a file:
&lt;br /&gt;
&lt;pre&gt;# sed &#39;/^$/ d&#39; test.txt
&lt;/pre&gt;
To delete all comment lines (assuming the comment starts with
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;):
&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;# sed &#39;/^#/ d&#39; test.txt
&lt;/pre&gt;
To write the content of text.txt file to file test.txt
(and display on screen):
&lt;br /&gt;
&lt;pre&gt;# sed &#39;w test.txt&#39; text.txt
&lt;/pre&gt;
To write the content of employee.txt file to output.txt file but not
to screen:
&lt;br /&gt;
&lt;pre&gt;# sed -n &#39;w output.txt&#39; /etc/passwd
&lt;/pre&gt;
To write only the 2nd line:
&lt;br /&gt;
&lt;pre&gt;# sed -n &#39;2 w output.txt&#39; /etc/passwd
&lt;/pre&gt;
Write lines 1 through 4:
&lt;br /&gt;
&lt;pre&gt;# sed -n &#39;1,4 w output.txt&#39; /etc/passwd
&lt;/pre&gt;
&lt;br /&gt;
To write from line 2 through the last line:
&lt;br /&gt;
&lt;pre&gt;# sed -n &#39;2,$ w output.txt&#39; /etc/passwd
&lt;/pre&gt;
To write only odd numbered lines:
&lt;br /&gt;
&lt;pre&gt;# sed -n &#39;1~2 w output.txt&#39; /etc/passwd
&lt;/pre&gt;
To Write lines matching the pattern &quot;Vasanth&quot;:
&lt;br /&gt;
&lt;pre&gt;# sed -n &#39;/Vasanth/ w output.txt&#39; /etc/passwd
&lt;/pre&gt;
To write lines starting from the 1st match of &quot;root&quot; until the 4th
line:
&lt;br /&gt;
&lt;pre&gt;# sed -n &#39;/root/,4 w output.txt&#39; /etc/passwd
&lt;/pre&gt;
To write lines starting from the 1st match of &quot;Raj&quot; until the last
line:
&lt;br /&gt;
&lt;pre&gt;# sed -n &#39;/vasanth/,$ w output.txt&#39; /etc/passwd 
&lt;/pre&gt;
To write lines starting from the line matching &quot;vasanth&quot; until the line
matching &quot;hemanth&quot;:
&lt;br /&gt;
&lt;pre&gt;# sed -n &#39;/vasanth/,/hemanth/ w output.txt&#39; /etc/passwd
&lt;/pre&gt;
To write the line matching &quot;vasanth&quot; and the next 2 lines
immediately after that:
&lt;br /&gt;
&lt;pre&gt;# sed -n &#39;/vasanth/,+2 w output.txt&#39; /etc/passwd
&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://playingwithtux.blogspot.com/feeds/2648719301939315507/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://playingwithtux.blogspot.com/2013/12/sed-stream-editor.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/2648719301939315507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/2648719301939315507'/><link rel='alternate' type='text/html' href='http://playingwithtux.blogspot.com/2013/12/sed-stream-editor.html' title='SED- Stream Editor'/><author><name>Vasanth Muraleedahran</name><uri>http://www.blogger.com/profile/01757300712038207442</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-7597479095358859665.post-2363129061559571556</id><published>2013-12-21T02:06:00.004-08:00</published><updated>2015-04-14T11:52:55.601-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BONDING"/><title type='text'>Creating network bond in linux</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
ETHERNET CHANNEL BONDING CONFIGURATION IN LINUX ?&lt;br /&gt;
&lt;br /&gt;
How to create Ethernet channel bonding in Linux ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt; vi /etc/modprobe.conf
&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt; alias bond0 bonding 
 options bond0 mode=1 miimon=100 use_carrier=0
&lt;/pre&gt;
Save the file
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;mode=0|balanced_rr provides load balancing and fault tolerance
mode=1|active-ackup provides fault tolerance
primary= Specify which NIC is primary (eg:eth0)
use_carrier= How to dittermine link status 
miimon - Link monitoring frquency in milliseconds
&lt;/pre&gt;
&lt;br /&gt;
BONDING INTERFACE CONFIGURATIONS FILE ( /etc/sysconfig/network-scripts )
&lt;br /&gt;
&lt;pre&gt;# cd /etc/sysconfig/network-scripts
&lt;/pre&gt;
&lt;pre&gt;# vi ifcfg-bond0
DEVICE=bond0
IPADDR=192.168.56.3
BOOTPROTO=none
NETMASK=255.255.255.0
GATEWAY=192.168.56.1
ONBOOT=yes
TYPE=Ethernet&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;# cat /etc/sysconfig/network-scripts/ifcg-eth0&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;
DEVICE=eth0
MASTER=bond0
SLAVE=yes
BOOTPRO=static
ONBOOT=yes&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;# cat /etc/sysconfig/network-scripts/ifcg-eth1&amp;nbsp; 
DEVICE=eth1
MASTER=bond0
SLAVE=yes
BOOTPRO=static
ONBOOT=yes&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://playingwithtux.blogspot.com/feeds/2363129061559571556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://playingwithtux.blogspot.com/2013/12/network-bonding.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/2363129061559571556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/2363129061559571556'/><link rel='alternate' type='text/html' href='http://playingwithtux.blogspot.com/2013/12/network-bonding.html' title='Creating network bond in linux'/><author><name>Vasanth Muraleedahran</name><uri>http://www.blogger.com/profile/01757300712038207442</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-7597479095358859665.post-903389590011180351</id><published>2013-12-21T02:04:00.002-08:00</published><updated>2015-04-11T22:54:04.713-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AD-LINUX"/><title type='text'>AD-Linux authentication</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;This article explains the steps to needed to add a Linux server or
 work stations as a domain member in Windows Active directory (2008) 
server.&lt;/b&gt; 
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I am using centos5x as linux client. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SYNC THE DATE AND TIME WITH THE PDC
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;# /ect/init.d/ntpd stop
&lt;/pre&gt;
&lt;pre&gt;# ntpdate ip.address.of.yourPDC
&lt;/pre&gt;
&lt;pre&gt;# /etc/init.d/ntpd start

# chkconfig ntpd on 
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Install kerberos in the local server/machine
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;CONFIGURE THE KERBEROS&lt;/b&gt;
&lt;br /&gt;
&lt;pre&gt;NOTE: Please follow the exact syntax of the krb5.conf file given here.
&lt;/pre&gt;
&lt;pre&gt;# vi /etc/krb5.conf
&lt;/pre&gt;
&lt;pre&gt;[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log
&lt;/pre&gt;
&lt;pre&gt;[libdefaults]
default_realm = 
dns_lookup_realm = yes
dns_lookup_kdc = yes
&lt;/pre&gt;
&lt;pre&gt;[realms]
EXAMPLE = {
kdc = server.example.com
default_domain = example.com
}
&lt;/pre&gt;
&lt;pre&gt;[domain_realm]
.example.com = EXAMPLE.COM
mydomain.com = EXAMPLE.COM
&lt;/pre&gt;
&lt;pre&gt;[kdc]
profile = /var/kerberos/krb5kdc/kdc.conf
&lt;/pre&gt;
[appdefaults]
&lt;br /&gt;
&lt;pre&gt;pam = {
debug = false
ticket_lifetime = 36000
renew_lifetime = 36000
forwardable = true
krb4_convert = false
} 
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Install SAMABA and wind bind&lt;/b&gt;
&lt;br /&gt;
&lt;pre&gt;# yum install samba-*
&lt;/pre&gt;
&lt;pre&gt;# yum install winbind

&lt;/pre&gt;
&lt;pre&gt;# service smb start
#chkconfig smb on 
&lt;/pre&gt;
&lt;pre&gt;# service winbind start 
# chkconfig winbind on
&lt;/pre&gt;
&lt;b&gt;Enter the following entries in /etc/samba/smb.conf&lt;/b&gt;

&lt;br /&gt;
&lt;pre&gt;# /etc/smmba/smb.conf
&lt;/pre&gt;
&lt;pre&gt;[global]
# NT Workgroup Settings
netbios name = CENTOS1
workgroup = EXAMPLE.COM
server string = Centos Server
&lt;/pre&gt;
&lt;pre&gt;# Samba Performance Settings
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
client schannel = no
&lt;/pre&gt;
&lt;pre&gt;# Network Browsing Settings
local master = no
domain master = no
preferred master = no
wins support = no
dns proxy = no
wins proxy = no
&lt;/pre&gt;
&lt;pre&gt;# Active Directory Member
realm = EXAMPLE.COM
security = ads
ads server = X.X.X.X (Ip address of your seerver)
password server = server.example.com
&lt;/pre&gt;
&lt;pre&gt;# Winbind Settings
winbind separator = +
winbind use default domain = yes
idmap uid = 10000-20000
idmap gid = 10000-20000
winbind enum users = yes
winbind enum groups = yes
winbind cache time = 10
&lt;/pre&gt;
&lt;pre&gt;#winbind gid = 10000-20000
#winbind trusted domains only = no
&lt;/pre&gt;
&lt;pre&gt;# Defaults for local accounts created by winbind
#template shell = /bin/bash
template shell = /usr/local/bin/bash-wrapper
template homedir = /home/%U
&lt;/pre&gt;
&lt;pre&gt;# Logging Settings
max log size = 50
log file = /var/log/samba/%m.log
&lt;/pre&gt;
&lt;br /&gt;
Save and exit the smb.conf file
&lt;br /&gt;
&lt;br /&gt;
Edit /etc/nsswitch.conf and add the following lines
&lt;br /&gt;
passwd:     compat winbind files
shadow:     compat winbind files
group:      compat winbind files
hosts:      files dns
bootparams: nisplus [NOTFOUND=return] files
ethers:     files
netmasks:   files
networks:   files
protocols:  files winbind
rpc:        files
services:   files winbind
netgroup:   files winbind
publickey:  nisplus
automount:  files winbind
aliases:    files nisplus
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;INITIALIZE KERBEROS&lt;/b&gt;
&lt;br /&gt;
&lt;pre&gt;# kinit administrator@EXAMPLE.COM 
&lt;/pre&gt;
The exist status of the above command should be 0
&lt;br /&gt;
&lt;br /&gt;
NOW RUN THE FOLLOWING COMMAND IN SHELL 
&lt;br /&gt;
&lt;pre&gt;# system-config-authentication 
&lt;/pre&gt;
Please follow the screen shots given below 
&lt;br /&gt;
After these steps your machine will be added in to the DOMIAN  and you ca ping the system using the machine name 
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;To list all the users&lt;/b&gt; 
&lt;br /&gt;
&lt;pre&gt;# wbinfo -u
&lt;/pre&gt;
&lt;b&gt;To list all the  groups&lt;/b&gt;
&lt;br /&gt;
&lt;pre&gt;# wbinfo -g
&lt;/pre&gt;
&lt;b&gt;Check RPC communication&lt;/b&gt;
&lt;br /&gt;
&lt;pre&gt;# # wbinfo -t
&lt;/pre&gt;
Change the PAM settings for login and ssh 
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt; cat /etc/pam.d/sshd
&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;#%PAM-1.0
auth       required     pam_stack.so service=system-auth
auth       required     pam_nologin.so
auth       sufficient   pam_winbind.so
account    required     pam_stack.so service=system-auth
account    sufficient   pam_winbind.so
password   required     pam_stack.so service=system-auth
session    required     pam_stack.so service=system-auth
&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt; cat /etc/pam.d/login
&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;#%PAM-1.0
auth       required     pam_securetty.so
auth       sufficient   pam_winbind.so
auth       required     pam_stack.so service=system-auth
auth       required     pam_nologin.so
account    sufficient   pam_winbind.so
account    required     pam_stack.so service=system-auth
password   required     pam_stack.so service=system-auth
# pam_selinux.so close should be the first session rule
session    required     pam_selinux.so close
session    required     pam_stack.so service=system-auth
session    optional     pam_console.so
# pam_selinux.so open should be the last session rule
session    required     pam_selinux.so multiple open
&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://playingwithtux.blogspot.com/feeds/903389590011180351/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://playingwithtux.blogspot.com/2013/12/ad-linux-authentication.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/903389590011180351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/903389590011180351'/><link rel='alternate' type='text/html' href='http://playingwithtux.blogspot.com/2013/12/ad-linux-authentication.html' title='AD-Linux authentication'/><author><name>Vasanth Muraleedahran</name><uri>http://www.blogger.com/profile/01757300712038207442</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-7597479095358859665.post-5630368726683145504</id><published>2013-12-21T02:01:00.002-08:00</published><updated>2015-04-14T11:50:39.869-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="KERBEROS"/><title type='text'>LDAP server with Kerberos</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;OpenLDAP server: krbserver1.fireblade.com
Kerberos Server: krbserver1.fireblade.com
DNS Server: krbserver1.fireblade.com
Client machine: station13.fireblade.com
&lt;/pre&gt;
&lt;br /&gt;
INITIAL SETUP
&lt;br /&gt;
&lt;pre&gt;Setup DNS using bind in krbserver1.fireblade.com. Both forward and reverse record should be set up properly. Kerberos need both forward and reverse dns record to work properly.
&lt;/pre&gt;
&lt;br /&gt;
LDAP SERVER SETUP
&lt;br /&gt;
Setup a LDAP server with the domain fireblade.com in krbserver1.fireblade.com.
&lt;br /&gt;
&lt;pre&gt;# yum install openldap-*
&lt;/pre&gt;
Setup LDAP directory manager password
&lt;br /&gt;
&lt;pre&gt;# slapasswd
&lt;/pre&gt;
Open the configuration file and make the following changes.
&lt;br /&gt;
&lt;pre&gt;# vim /etc/openldap/slapd.conf

database        bdb
suffix          &quot;dc=fireblade,dc=com&quot;
rootdn          &quot;cn=Manager,dc=fireblade,dc=com&quot;
rootpw          {SSHA}1j20X9NC+axyGp2IzcS086C7MZ6dyCQj
&lt;/pre&gt;
Save the configuration file and restart start the service.
&lt;br /&gt;
&lt;pre&gt;# service ldap start
&lt;/pre&gt;
&lt;pre&gt;# chkconfig ldap on

&lt;/pre&gt;
Create LDAP entries by using the following ldif file.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;# cat initial.ldif
&lt;/pre&gt;
&lt;pre&gt;dn: dc=fireblade,dc=com
objectclass: dcObject
objectclass: organization
o: fireblade.com
dc: fireblade
&lt;/pre&gt;
&lt;pre&gt;dn: ou=People,dc=fireblade,dc=com
objectClass: organizationalUnit
objectClass: top
ou: People
&lt;/pre&gt;
&lt;pre&gt;dn: ou=Groups,dc=fireblade,dc=com
objectClass: organizationalUnit
objectClass: top
ou: Groups
&lt;/pre&gt;
&lt;br /&gt;
Add the intial OU with People and Groups
&lt;br /&gt;
&lt;pre&gt;# ldapadd -x -W -D &quot;cn=Manager,dc=fireblade,dc=com&quot; -f initial.ldif
&lt;/pre&gt;
&lt;br /&gt;
Create some test users using the following ldif file
&lt;br /&gt;
&lt;pre&gt;# cat firstuser.ldif
&lt;/pre&gt;
&lt;pre&gt;dn: uid=vasanth,ou=People,dc=example,dc=com
objectClass: top
objectClass: account
objectClass: posixAccount
objectClass: shadowAccount
cn: Tammy Something
uid: tammysomething
uidNumber: 3000
gidNumber: 3000
homeDirectory: /home/vasanth
loginShell: /bin/bash
gecos: Tammy Something,Karate Instructor,Room 37A,435-555-555,801-555-555
userPassword: {crypt}x
shadowLastChange: 0
shadowMax: 0
shadowWarning: 0
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Add the test user to ldap
&lt;br /&gt;
&lt;pre&gt; # ldapadd -x -D &quot;cn=manager,dc=fireblade,dc=com&quot; -w redhat -f firestuser.ldif
&lt;/pre&gt;
&lt;br /&gt;
Configuring KDC
&lt;br /&gt;
&lt;pre&gt;# yum install -y krb5-server krb5-workstation
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;# vi /etc/krb5.conf
&lt;/pre&gt;
&lt;pre&gt;[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log
&lt;/pre&gt;
[libdefaults]
&lt;br /&gt;
&lt;pre&gt;default_realm = FIREBLADE.COM
dns_lookup_realm = false
dns_lookup_kdc = false
 ticket_lifetime = 24h
 forwardable = yes
&lt;/pre&gt;
&lt;pre&gt;[realms]
FIREBLADE.COM = {
 kdc = server1.fireblade.com:88
 admin_server = server1.fireblade.com:749
 default_domain = fireblade.com
}
&lt;/pre&gt;
&lt;pre&gt;EXAMPLE.COM = {
 kdc = server.example.com
}
&lt;/pre&gt;
[domain_realm]
&lt;br /&gt;
&lt;pre&gt;.fireblade.com = FIREBLADE.COM
 fireblade.com = FIREBLADE.COM
 station13.fireblade.com = FIREBLADE.COM
&lt;/pre&gt;
[appdefaults]
&lt;br /&gt;
&lt;pre&gt;pam = {
  validate = true
  debug = false
  ticket_lifetime = 36000
  renew_lifetime = 36000
  forwardable = true
  krb4_convert = false
}
&lt;/pre&gt;
&lt;br /&gt;
Save the save file.
&lt;br /&gt;
Edit /var/kerberos/krb5kdc/kdc.conf
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;# vi  /var/kerberos/krb5kdc/kdc.conf
&lt;/pre&gt;
&lt;pre&gt;[kdcdefaults]
v4_mode = nopreauth
kdc_tcp_ports = 88
&lt;/pre&gt;
&lt;pre&gt;[realms]
FIREBLADE.COM = {
#  master_key_type = des3-hmac-sha1
  acl_file = /var/kerberos/krb5kdc/kadm5.acl
  dict_file = /usr/share/dict/words
  admin_keytab = /var/kerberos/krb5kdc/kadm5.keytab
  supported_enctypes = des3-hmac-sha1:normal arcfour-hmac:normal des-hmac-sha1:normal des-cbc-md5:normal des-cbc-crc:normal des-cbc-crc:v4 des-cbc-crc:afs3
  default_principal_flags = +preauth
}
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;# vi /var/kerberos/krb5kdc/kadm5.acl
&lt;/pre&gt;
&lt;pre&gt;*/admin@FIREBLADE.COM   *
&lt;/pre&gt;
&lt;br /&gt;
Making the KDC to hold the kerberos data
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;# kdb5_util create -r FIREBLADE.COM -s
&lt;/pre&gt;
&lt;pre&gt;Loading random data
Initializing database &#39;/var/kerberos/krb5kdc/principal&#39; for realm &#39;FIREBLADE.COM&#39;,
master key name &#39;K/M@FIREBLADE.COM&#39;
You will be prompted for the database Master Password.
It is important that you NOT FORGET this password.
Enter KDC database master key: 
Re-enter KDC database master key to verify: 
[root@krb-kdc1 ~]# ls /var/kerberos/krb5kdc/*
/var/kerberos/krb5kdc/kadm5.acl  /var/kerberos/krb5kdc/principal        /var/kerberos/krb5kdc/principal.kadm5.lock
/var/kerberos/krb5kdc/kdc.conf   /var/kerberos/krb5kdc/principal.kadm5  /var/kerberos/krb5kdc/principal.ok
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Create a principal for the admin user as well as vasanth. Export the admin details to the kadmind key tab
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;Authenticating as principal root/admin@FIREBLADE.COM with password.
kadmin.local:  addprinc root/admin
WARNING: no policy specified for root/admin@FIREBLADE.COM; defaulting to no policy
Enter password for principal &quot;root/admin@FIREBLADE.COM&quot;: 
Re-enter password for principal &quot;root/admin@FIREBLADE.COM&quot;: 
Principal &quot;root/admin@FIREBLADE.COM&quot; created.
kadmin.local:  addprinc vasanth
WARNING: no policy specified for vasanth@FIREBLADE.COM; defaulting to no policy
Enter password for principal &quot;vasanth@FIREBLADE.COM&quot;: 
Re-enter password for principal &quot;vasanth@FIREBLADE.COM&quot;: 
Principal &quot;vasanth@FIREBLADE.COM&quot; created.
kadmin.local:  ktadd -k /var/kerberos/krb5kdc/kadm5.keytab kadmin/admin
Entry for principal kadmin/admin with kvno 3, encryption type AES-256 CTS mode with 96-bit SHA-1 HMAC added to keytab WRFILE:/var/kerberos/krb5kdc/kadm5.keytab.
Entry for principal kadmin/admin with kvno 3, encryption type AES-128 CTS mode with 96-bit SHA-1 HMAC added to keytab WRFILE:/var/kerberos/krb5kdc/kadm5.keytab.
Entry for principal kadmin/admin with kvno 3, encryption type Triple DES cbc mode with HMAC/sha1 added to keytab WRFILE:/var/kerberos/krb5kdc/kadm5.keytab.
Entry for principal kadmin/admin with kvno 3, encryption type ArcFour with HMAC/md5 added to keytab WRFILE:/var/kerberos/krb5kdc/kadm5.keytab.
Entry for principal kadmin/admin with kvno 3, encryption type DES with HMAC/sha1 added to keytab WRFILE:/var/kerberos/krb5kdc/kadm5.keytab.
Entry for principal kadmin/admin with kvno 3, encryption type DES cbc mode with RSA-MD5 added to keytab WRFILE:/var/kerberos/krb5kdc/kadm5.keytab.
kadmin.local:  ktadd -k /var/kerberos/krb5kdc/kadm5.keytab kadmin/changepw
Entry for principal kadmin/changepw with kvno 3, encryption type AES-256 CTS mode with 96-bit SHA-1 HMAC added to keytab WRFILE:/var/kerberos/krb5kdc/kadm5.keytab.
Entry for principal kadmin/changepw with kvno 3, encryption type AES-128 CTS mode with 96-bit SHA-1 HMAC added to keytab WRFILE:/var/kerberos/krb5kdc/kadm5.keytab.
Entry for principal kadmin/changepw with kvno 3, encryption type Triple DES cbc mode with HMAC/sha1 added to keytab WRFILE:/var/kerberos/krb5kdc/kadm5.keytab.
Entry for principal kadmin/changepw with kvno 3, encryption type ArcFour with HMAC/md5 added to keytab WRFILE:/var/kerberos/krb5kdc/kadm5.keytab.
Entry for principal kadmin/changepw with kvno 3, encryption type DES with HMAC/sha1 added to keytab WRFILE:/var/kerberos/krb5kdc/kadm5.keytab.
Entry for principal kadmin/changepw with kvno 3, encryption type DES cbc mode with RSA-MD5 added to keytab WRFILE:/var/kerberos/krb5kdc/kadm5.keytab.
kadmin.local:  exit
&lt;/pre&gt;
&lt;pre&gt;# /etc/init.d/krb5kdc start; /etc/init.d/kadmin start&amp;nbsp;; chkconfig krb5kdc on; chkconfig kadmin on
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;Copy krb5.conf file to the client machine station13.fireblade.com
&lt;/pre&gt;
&lt;pre&gt;# scp -r /etc/krb5.conf root@station13.fireblade.com:/etc
&lt;/pre&gt;
&lt;br /&gt;
Add host pricipals on KDC and on the client.
&lt;br /&gt;
&lt;br /&gt;
Go to krbserver1.fireblade.com and kadmin.local
&lt;br /&gt;
&lt;br /&gt;
on krbserver1
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;  # kadmin.local
  Authenticating as principal root/admin@FIREBLADE.COM with password.
  kadmin.local:  addprinc -randkey host/krbserver1.fireblade.com
  WARNING: no policy specified for host/krbserver1.fireblade.com@FIREBLADE.COM; defaulting to no policy
  Principal &quot;host/krbserver1.fireblade.com@FIREBLADE.COM&quot; created.
  kadmin.local:  ktadd host/krbserver1.fireblade.com
&lt;/pre&gt;
&lt;pre&gt;  kadmin.local:  exit
&lt;/pre&gt;
&lt;br /&gt;
on station13
&lt;br /&gt;
&lt;pre&gt;   # kadmin
&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://playingwithtux.blogspot.com/feeds/5630368726683145504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://playingwithtux.blogspot.com/2013/12/ldap-server-with-kerberos.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/5630368726683145504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/5630368726683145504'/><link rel='alternate' type='text/html' href='http://playingwithtux.blogspot.com/2013/12/ldap-server-with-kerberos.html' title='LDAP server with Kerberos'/><author><name>Vasanth Muraleedahran</name><uri>http://www.blogger.com/profile/01757300712038207442</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-7597479095358859665.post-6129173371712046528</id><published>2013-12-21T01:59:00.002-08:00</published><updated>2015-04-14T12:20:27.796-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="NAMP"/><title type='text'>NAMP</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
To list all open ports in our local machine
&lt;br /&gt;
&lt;pre&gt;# nmap -v localhost
&lt;/pre&gt;
&lt;br /&gt;
Namp database of ports to the service 
&lt;br /&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;# /usr/share/namp/nmap-service
&lt;/pre&gt;
&lt;br /&gt;
To save nmap scan to a file 
&lt;br /&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;# nmap -V -oN namp.scan.1 localhost
&lt;/pre&gt;
&lt;br /&gt;
Nmap usually scans TCP ports to scan UDP based ports 
&lt;br /&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;# namp -v -sU localhost
&lt;/pre&gt;
&lt;br /&gt;
To check a purticular port is listening or not
&lt;br /&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;# namp -v -p 631 localhost
&lt;/pre&gt;
&lt;br /&gt;
To get OS finger print of a remote system
&lt;br /&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;# nmap -v -o remoteserver
&lt;/pre&gt;
&lt;br /&gt;
To scan an ip range in a file 
&lt;br /&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;# namp iL filename 
&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;To list all the machine that are up and running in the current networl
&lt;/pre&gt;
&lt;pre&gt;# namp -iL uu
&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://playingwithtux.blogspot.com/feeds/6129173371712046528/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://playingwithtux.blogspot.com/2013/12/to-list-all-open-ports-in-our-local.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/6129173371712046528'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/6129173371712046528'/><link rel='alternate' type='text/html' href='http://playingwithtux.blogspot.com/2013/12/to-list-all-open-ports-in-our-local.html' title='NAMP'/><author><name>Vasanth Muraleedahran</name><uri>http://www.blogger.com/profile/01757300712038207442</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-7597479095358859665.post-9006943280831673808</id><published>2013-12-21T01:57:00.002-08:00</published><updated>2013-12-21T01:57:33.298-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SYSLOG"/><title type='text'>SYSLOG(Print system messages to console and /var/logmessages)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
To print system messages to both /var/log/messgaes and to console do the following
&lt;br /&gt;

&lt;pre&gt;# vi /etc/syslog.conf

&lt;/pre&gt;
Add the following lines 
&lt;br /&gt;

&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;kern.*                                                  /dev/console&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;*.info;mail,authpriv,cron,kern.none                     /dev/console
&lt;/pre&gt;
&lt;br /&gt;
save the file and restart the service 
&lt;br /&gt;

&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;# /etc/init.d/syslogd restart
&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://playingwithtux.blogspot.com/feeds/9006943280831673808/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://playingwithtux.blogspot.com/2013/12/syslogprint-system-messages-to-console.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/9006943280831673808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/9006943280831673808'/><link rel='alternate' type='text/html' href='http://playingwithtux.blogspot.com/2013/12/syslogprint-system-messages-to-console.html' title='SYSLOG(Print system messages to console and /var/logmessages)'/><author><name>Vasanth Muraleedahran</name><uri>http://www.blogger.com/profile/01757300712038207442</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-7597479095358859665.post-6930281441708243438</id><published>2013-12-20T23:44:00.003-08:00</published><updated>2013-12-20T23:55:18.228-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="VNC"/><title type='text'>Configuring VNC Server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
Install the vnc server package in the server (192.168.56.2)
&lt;br /&gt;

&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;# yum install vnc-server
&lt;/pre&gt;
&lt;br /&gt;
Open the configuration file and enter the following 
&lt;br /&gt;

&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;# vi /etc/sysconfig/vncservers
  VNCSERVERS=&quot;1:root&quot;
  
&amp;nbsp;:wq
&lt;/pre&gt;
&lt;br /&gt;
The Xdisplay session will run as root.
&lt;br /&gt;
For security just put a password.
&lt;br /&gt;

&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;# vncpasswd 
&lt;/pre&gt;
&lt;br /&gt;
From the client machine test the connection using the following 
&lt;br /&gt;

&lt;pre&gt;# vncviewer 192.168.56.2:1
&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://playingwithtux.blogspot.com/feeds/6930281441708243438/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://playingwithtux.blogspot.com/2013/12/configuring-vnc-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/6930281441708243438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/6930281441708243438'/><link rel='alternate' type='text/html' href='http://playingwithtux.blogspot.com/2013/12/configuring-vnc-server.html' title='Configuring VNC Server'/><author><name>Vasanth Muraleedahran</name><uri>http://www.blogger.com/profile/01757300712038207442</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-7597479095358859665.post-3436086869995451244</id><published>2013-08-07T00:23:00.000-07:00</published><updated>2013-08-12T02:37:10.120-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BSD-UNIX"/><title type='text'>CCD - FreeBSD - CCD1 - How to</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Configuring ccd1 on freeBSD with fourdisks&lt;br /&gt;
&lt;br /&gt;
1. To remove the existing configuration. run the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;# ccdconfig -v -U&lt;br /&gt;
&lt;br /&gt;
2. Configure the Mirroring using the below command&lt;br /&gt;
&lt;br /&gt;
# ccdconfig ccd0 32 CCDF_MIRROR&amp;nbsp; /dev/ada2 /dev/ada3 /dev/ada4 /dev/ada5&lt;br /&gt;
&lt;br /&gt;
3. Construct the file system using the below command&lt;br /&gt;
&lt;br /&gt;
# newfs /dev/ccd0&lt;br /&gt;
&lt;br /&gt;
4 .Mount our mirrored disk and make it persistent &lt;br /&gt;
&lt;br /&gt;
/dev/ccd0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /work0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ufs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rw&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
5. Run # mount -a&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://playingwithtux.blogspot.com/feeds/3436086869995451244/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://playingwithtux.blogspot.com/2013/08/ccd-freebsd-ccd1-how-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/3436086869995451244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/3436086869995451244'/><link rel='alternate' type='text/html' href='http://playingwithtux.blogspot.com/2013/08/ccd-freebsd-ccd1-how-to.html' title='CCD - FreeBSD - CCD1 - How to'/><author><name>Vasanth Muraleedahran</name><uri>http://www.blogger.com/profile/01757300712038207442</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-7597479095358859665.post-1245495269538629118</id><published>2013-08-06T08:28:00.001-07:00</published><updated>2013-08-06T21:29:11.277-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BSD-UNIX"/><title type='text'>Configuring CCD in FreeBSD  - How to </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
In this how to I am explaining briefly about CCD ( Concatenated Disk Driver)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; 1. To Configure CCD I am adding&amp;nbsp; 4 new disks. System should be shutdown before adding to the disks&lt;br /&gt;
&lt;br /&gt;
2. To confirm the detection of new disk check the kernel messages using dmesg command&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;# dmesg&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv-G5t8YeMh_0Mj7fjbjKFGQM3D8DWC3wcxqN9-3TXJQHsjRTvSQVBlq__iUqwsQwE2o6AJUmIveb9ElNzUMmaK3x8JHiDo7yus0Yoo_GAGGlO5d_28ZSsXp4fZf0rQkVIdp7bfbPBwPNk/s1600/disk_added.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;193&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv-G5t8YeMh_0Mj7fjbjKFGQM3D8DWC3wcxqN9-3TXJQHsjRTvSQVBlq__iUqwsQwE2o6AJUmIveb9ElNzUMmaK3x8JHiDo7yus0Yoo_GAGGlO5d_28ZSsXp4fZf0rQkVIdp7bfbPBwPNk/s320/disk_added.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&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;
From the above output it&#39;s clear that 4 new disk has been added to the system with the names ada2,ada3,ada4;ada5.&lt;br /&gt;
&lt;br /&gt;
3. Label the disks using the bsdlabel command&lt;br /&gt;
&lt;br /&gt;
#&amp;nbsp; bsdlabel -w ada2&lt;br /&gt;
&lt;br /&gt;
# bsdlabel -w ada3&lt;br /&gt;
&lt;br /&gt;
# bsdlabel -w ada4&lt;br /&gt;
&lt;br /&gt;
# bsdlabel -w ada5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Further label the disks using the bsdlabel -e&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#&amp;nbsp; bsdlabel -e ada2&lt;br /&gt;
&lt;br /&gt;
When you run the above command a file will be open in your default editor(Defined in the Editor Variable)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhppIjwSt5QZn-cbW8BWAIPiV8kCwJCm73ReYmvU0xcpB9i_-2r1IFf_0bHx1YA8X35xim_5JHGtbriAbOmsfqPmH2dKMAAS9f_9HVGFe16C9oOBsnTJuzp0hT-qIzCAIHPp8cX8BP0jN_r/s1600/bsdlabel.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;61&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhppIjwSt5QZn-cbW8BWAIPiV8kCwJCm73ReYmvU0xcpB9i_-2r1IFf_0bHx1YA8X35xim_5JHGtbriAbOmsfqPmH2dKMAAS9f_9HVGFe16C9oOBsnTJuzp0hT-qIzCAIHPp8cX8BP0jN_r/s320/bsdlabel.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add a new line starts with e: at the end of the file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwdX8gihnrhfrnYBYemBhB210Y7ppZQH_HvmLKbnQygKqRvG8wnGi0g_gzP0_LccaqWTnvWUHhXyFyHOlob3fmvjFksgxs4B-HdUmkkYG-BTG3cT82ibCgHlAjAuAeamHyvsIg1YzYW1jT/s1600/bsdlebal.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;56&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwdX8gihnrhfrnYBYemBhB210Y7ppZQH_HvmLKbnQygKqRvG8wnGi0g_gzP0_LccaqWTnvWUHhXyFyHOlob3fmvjFksgxs4B-HdUmkkYG-BTG3cT82ibCgHlAjAuAeamHyvsIg1YzYW1jT/s320/bsdlebal.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Save the file( If it ask for the y/n question while saving please give &#39;n&#39; and continue).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Repeat the same steps for all the disk ad3,ada4,ad5.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;5. Configure the CCD by running the below command.&lt;br /&gt;
&lt;br /&gt;
# ccdconfig ccd0 32 0 ada2 ada3 ada4 ada5&lt;br /&gt;
&lt;br /&gt;
Stripe size: Stripe size is the number defined x 512 bytes. In our case 32x512 =&amp;nbsp; 16384 Bytes = 16KB&lt;br /&gt;
&lt;br /&gt;
0 indicate the CCD level. level 0 is stripping and level 1 is mirroring&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Generating UFS in the /dev/ccd0&lt;br /&gt;
&lt;br /&gt;
# newfs /dev/ccd0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. Create a mount point /work0 and mount our new ccd devise.&lt;br /&gt;
&lt;br /&gt;
# mkdir /work0&lt;br /&gt;
&lt;br /&gt;
# mount /dev/ccd0 /work0&lt;br /&gt;
&lt;br /&gt;
4. To make the configuration become persistent across the reboot run&lt;br /&gt;
&lt;br /&gt;
# ccdconfig -g&amp;nbsp; &amp;gt; /etc/ccd.conf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. To make the mounting persistent across the reboot add line like shown below to /etc/fstab.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs-v7ekLYsM6kYItWom2Mk-0SvsKQFhnFXFSWjP3FITvF3ZuqcYUAfk6R84lz7JK3w_wN-U_9mCRnhMWCmwT7hTQF4jiJh_U2-4Bo8gKQLJ6koKOUNxXHDPGweKhSajqZbzAqn98AFsMq6/s1600/fastab_new.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;97&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs-v7ekLYsM6kYItWom2Mk-0SvsKQFhnFXFSWjP3FITvF3ZuqcYUAfk6R84lz7JK3w_wN-U_9mCRnhMWCmwT7hTQF4jiJh_U2-4Bo8gKQLJ6koKOUNxXHDPGweKhSajqZbzAqn98AFsMq6/s320/fastab_new.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&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;
Run mount command&lt;br /&gt;
&lt;br /&gt;
# mount -a&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To test the I/O run the below command. The command create a 1 GB file in /work0 directory which is already mounted by /dev/ccd0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
dd if=/dev/zero bs=1M count=1024 of=/work0/testfile.text&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enjoy !&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://playingwithtux.blogspot.com/feeds/1245495269538629118/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://playingwithtux.blogspot.com/2013/08/ccd-freebsd.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/1245495269538629118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/1245495269538629118'/><link rel='alternate' type='text/html' href='http://playingwithtux.blogspot.com/2013/08/ccd-freebsd.html' title='Configuring CCD in FreeBSD  - How to '/><author><name>Vasanth Muraleedahran</name><uri>http://www.blogger.com/profile/01757300712038207442</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><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv-G5t8YeMh_0Mj7fjbjKFGQM3D8DWC3wcxqN9-3TXJQHsjRTvSQVBlq__iUqwsQwE2o6AJUmIveb9ElNzUMmaK3x8JHiDo7yus0Yoo_GAGGlO5d_28ZSsXp4fZf0rQkVIdp7bfbPBwPNk/s72-c/disk_added.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7597479095358859665.post-3003483612907111931</id><published>2013-07-20T05:25:00.001-07:00</published><updated>2013-07-20T05:25:48.181-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="LDAP"/><title type='text'>Openldap Replication- Multimaster</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Below are the LDAP server participating in multimaster configuration. Operating System used is Centos6.3 
&lt;br /&gt;
masterldap1.fireblade.com - 192.168.56.191
&lt;br /&gt;
masterldap2.fireblade.com - 192.168.56.192
&lt;br /&gt;
masterldap3.fireblade.com - 192.168.56.193 
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install Openldap  in all the Machines(192.168.56.191.192.168.56.192,192.168.56,193) 
&lt;br /&gt;

&lt;pre&gt;# yum install openldap-*
&lt;/pre&gt;
&lt;br /&gt;
Setup Openldap configuration environment 
&lt;br /&gt;

&lt;pre&gt;# cp /usr/share/openldap-servers/slapd.conf.obsolete /etc/openldap/slapd.conf
&lt;/pre&gt;
&lt;pre&gt;# cp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB_CONFIG
&lt;/pre&gt;
&lt;pre&gt;# chown ldap.ldap /var/lib/ldap/DB_CONFIG
&lt;/pre&gt;
&lt;pre&gt;# rm -rf /etc/openldap/slapd.d/*
&lt;/pre&gt;
&lt;br /&gt;
Configure the Domain and set Manager password in all the systems.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;pre&gt;# vim /etc/openldap/slapd.conf 
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt; 
&lt;br /&gt;

&lt;pre&gt;database        bdb
suffix          &quot;dc=fireblade,dc=com&quot;
checkpoint      1024 15
rootdn          &quot;cn=Manager,dc=fireblade,dc=com&quot;
 
&lt;/pre&gt;
&lt;pre&gt;rootpw          redhat
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Save and above in all the three servers.
&lt;br /&gt;
&lt;br /&gt;
Enable syncprov module by commenting it in /etc/openldap/slapd.conf in all the three servers 
&lt;br /&gt;

&lt;pre&gt;moduleload syncprov.la
&lt;/pre&gt;
Save the configuration file.
&lt;br /&gt;
&lt;br /&gt;
Go to masterldap1.fireblade,com(192.168.56.191) and enter the below configuration at the end of the file.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;ol&gt;
&lt;li&gt;&lt;ol&gt;
&lt;li&gt;&lt;ol&gt;
&lt;li&gt;&lt;ol&gt;
&lt;li&gt;&lt;ol&gt;
&lt;li&gt;&lt;ol&gt;
&lt;li&gt;&lt;ol&gt;
&lt;li&gt;&lt;ol&gt;
&lt;li&gt;&lt;ol&gt;
&lt;li&gt;&lt;ol&gt;
&lt;li&gt;&lt;ol&gt;
&lt;li&gt;REPLICATION CONFIGURATION###################
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;serverID 001
syncrepl rid=000
 provider=ldap://192.168.56.192
 type=refreshAndPersist
 retry=&quot;5 5 300 +&quot;
 searchbase=&quot;dc=fireblade,dc=com&quot;
 attrs=&quot;*,+&quot;
 bindmethod=simple
 binddn=&quot;cn=manager,dc=fireblade,dc=com&quot;
 credentials=redhat
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;pre&gt;syncrepl rid=001
 provider=ldap://192.168.56.193
 type=refreshAndPersist
 retry=&quot;5 5 300 +&quot;
 searchbase=&quot;dc=fireblade,dc=com&quot;
 attrs=&quot;*,+&quot;
 bindmethod=simple
 binddn=&quot;cn=manager,dc=fireblade,dc=com&quot;
 credentials=redhat
&lt;/pre&gt;
&lt;pre&gt;index entryCSN eq
index entryUUID eq
&lt;/pre&gt;
&lt;pre&gt;mirrormode TRUE
&lt;/pre&gt;
&lt;pre&gt;overlay syncprov
&lt;/pre&gt;
&lt;pre&gt;syncprov-checkpoint 100 10
&lt;/pre&gt;
&lt;br /&gt; 
Save the configuration.
&lt;br /&gt;
&lt;br /&gt;
Go to second server masterldap2.fireblade.com (192.168.56.192) and  
write the below configuration in /etc/openldap/slapd.conf at the end of 
it.
&lt;br /&gt;

&lt;pre&gt;serverID 002
syncrepl rid=000
 provider=ldap://192.168.56.191
 type=refreshAndPersist
 retry=&quot;5 5 300 +&quot;
 searchbase=&quot;dc=fireblade,dc=com&quot;
 attrs=&quot;*,+&quot;
 bindmethod=simple
 binddn=&quot;cn=manager,dc=fireblade,dc=com&quot;
 credentials=redhat
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;pre&gt;syncrepl rid=001
 provider=ldap://192.168.56.193
 type=refreshAndPersist
 retry=&quot;5 5 300 +&quot;
 searchbase=&quot;dc=fireblade,dc=com&quot;
 attrs=&quot;*,+&quot;
 bindmethod=simple
 binddn=&quot;cn=manager,dc=fireblade,dc=com&quot;
 credentials=redhat
&lt;/pre&gt;
&lt;pre&gt;index entryCSN eq
index entryUUID eq
&lt;/pre&gt;
&lt;pre&gt;mirrormode TRUE
&lt;/pre&gt;
&lt;pre&gt;overlay syncprov
&lt;/pre&gt;
&lt;pre&gt;syncprov-checkpoint 100 10
&lt;/pre&gt;
&lt;br /&gt;
Save the above configuration.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Go to Third server and write the below configuration at the end of configuration file /etc/openldap/slapd.conf
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
serverID 003
syncrepl rid=000
&lt;br /&gt;

&lt;pre&gt; provider=ldap://192.168.56.191
 type=refreshAndPersist
 retry=&quot;5 5 300 +&quot;
 searchbase=&quot;dc=fireblade,dc=com&quot;
 attrs=&quot;*,+&quot;
 bindmethod=simple
 binddn=&quot;cn=manager,dc=fireblade,dc=com&quot;
 credentials=redhat
&lt;/pre&gt;
&lt;br /&gt;
syncrepl rid=001
&lt;br /&gt;

&lt;pre&gt; provider=ldap://192.168.56.192
 type=refreshAndPersist
 retry=&quot;5 5 300 +&quot;
 searchbase=&quot;dc=fireblade,dc=com&quot;
 attrs=&quot;*,+&quot;
 bindmethod=simple
 binddn=&quot;cn=manager,dc=fireblade,dc=com&quot;
 credentials=redhat
&lt;/pre&gt;
index entryCSN eq
index entryUUID eq
&lt;br /&gt;
mirrormode TRUE
&lt;br /&gt;

&lt;pre&gt;overlay syncprov
&lt;/pre&gt;
syncprov-checkpoint 100 10
&lt;br /&gt;
&lt;br /&gt;
Save the configuration.
&lt;br /&gt;
&lt;br /&gt;
Start LDAP in all the servers by running below command 
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;pre&gt;# /etc/init.d/slapd start
&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://playingwithtux.blogspot.com/feeds/3003483612907111931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://playingwithtux.blogspot.com/2013/07/openldap-replication-multimaster.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/3003483612907111931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/3003483612907111931'/><link rel='alternate' type='text/html' href='http://playingwithtux.blogspot.com/2013/07/openldap-replication-multimaster.html' title='Openldap Replication- Multimaster'/><author><name>Vasanth Muraleedahran</name><uri>http://www.blogger.com/profile/01757300712038207442</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>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7597479095358859665.post-6020972454426330055</id><published>2013-07-20T05:24:00.000-07:00</published><updated>2013-07-20T05:24:02.769-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="LDAP"/><title type='text'>Openldap Replication with syncrepl</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;Syncrepl RefreshOnly Style replication&lt;/b&gt; 
&lt;br /&gt;
Theory
&lt;br /&gt;

&lt;pre&gt;In refreshOnly type of replication the consumer (1) initiates a connection (2) with the provider (2) - synchronization of DITs takes places and the connection is broken. Periodically the consumer (1) re-connects (2) with the provider (3) and re-synchronizes. refreshOnly synchronization may be viewed as operating in burst mode and the replication cycle time is the time between re-connections.
&lt;/pre&gt;
Master LDAP server - ldap-master.fireblade.com - Provider
&lt;br /&gt;
Slave LDAP server - ldap1.fireblade.com - Consumer
&lt;br /&gt;
&lt;br /&gt;
In Provider LDAP ldap-master.fireblade.com configuration ile  add the below configuration and save.
&lt;br /&gt;

&lt;pre&gt;# NOTE: 
# the provider configuration contains no reference to any consumers
&lt;/pre&gt;
&lt;pre&gt;# define the provider to use the syncprov overlay
# (last directives in database section)
overlay syncprov
# allows contextCSN to saves to database every 100 updates or ten minutes
syncprov-ch
syncprov-checkpoint 100 10
&lt;/pre&gt;
&lt;br /&gt;
In Consumer LDAP ldap1.fireblade.com configuration   add the below configuration and save.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;pre&gt;# provider is ldap://master-ldap.example.com:389, sync interval 
# every 1 hour, whole DIT (searchbase), all user attributes synchronized
# simple security with cleartext password
# NOTE: comments inside the syncrepl directive are rejected by OpenLDAP
#       and are included only to carry further explanation. They MUST NOT
#       appear in an operational file
syncrepl rid=000 
 provider=ldap://ldap-master.fireblade.com
 type=refreshOnly
 #re-connect/re-sync every hour
 interval=00:1:00:00
 retry=&quot;5 5 300 +&quot; 
 searchbase=&quot;dc=example,dc=com&quot;
 #both user (*) and operational (+) attributes required
 attrs=&quot;*,+&quot;
 bindmethod=simple
 binddn=&quot;cn=Manager,dc=fireblade,dc=com&quot;
 #Warning: password sent in clear - insecure
 credentials=dirtysecret
&lt;/pre&gt;
&lt;br /&gt;
Restart ldap service in both Consumer and provider.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;pre&gt;# service ldap restart 
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Test the configuration by creating a new entry in the Provider.
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://playingwithtux.blogspot.com/feeds/6020972454426330055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://playingwithtux.blogspot.com/2013/07/openldap-replication-with-syncrepl.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/6020972454426330055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/6020972454426330055'/><link rel='alternate' type='text/html' href='http://playingwithtux.blogspot.com/2013/07/openldap-replication-with-syncrepl.html' title='Openldap Replication with syncrepl'/><author><name>Vasanth Muraleedahran</name><uri>http://www.blogger.com/profile/01757300712038207442</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-7597479095358859665.post-3416626750546317539</id><published>2013-07-20T05:23:00.000-07:00</published><updated>2013-07-20T05:23:02.606-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="LDAP"/><title type='text'>Openldap Replication with Slurpd</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Here I am using Master-Slave replication using Slurpd. Below are the participating systems 
&lt;br /&gt;

&lt;pre&gt;1. ldap-master.fireblade.com (Master Server)

2. ldap1.fireblade.com (client Server)
&lt;/pre&gt;
&lt;br /&gt;
Replication to work properly Master and salve system initially should 
have exact number of entries. Take a dump of all the entries in the 
Master server using the below command and import it to the slave.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;pre&gt;# slapcat &amp;gt; master.ldif 
&lt;/pre&gt;
&lt;br /&gt;
Go to the salve ldap1.fireblade.com and import it using ldapadd. 
&lt;br /&gt;

&lt;pre&gt;#  ldapadd -D &quot;cn=Manager,dc=dc1,dc=fireblade,dc=com&quot; -W -x -f initial.ldif
&lt;/pre&gt;
At this point both master and slave has the exact amount of data. Let&#39;s start the  replication configuration. 
&lt;br /&gt;
&lt;br /&gt;
Open /etc/openldap/sldapd.conf in master server ldap-master.fireblade.com and add the below entries
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;ol&gt;
&lt;li&gt; Replication will happen in the every 5 minutes.
&lt;/li&gt;
&lt;/ol&gt;
replicationinterval 300
&lt;br /&gt;

&lt;pre&gt;# Keep the sapce in front of binddn as it is bbecause 
replica uri=ldap://ldap1.fireblade.com bindmethod=simple
 binddn=&quot;cn=manager,dc=fireblade,dc=com&quot; credentials=redhat
&lt;/pre&gt;
&lt;br /&gt;
save the configuration and exit the file. 
&lt;br /&gt;
&lt;br /&gt;
Open /etc/openldap/sldapd.conf in the salve server ldap1.fireblade.com and add the following entries. 
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;pre&gt;updatedn &quot;cn=manager,dc=fireblade,dc=com&quot;
&lt;/pre&gt;
&lt;pre&gt;updateref ldap://ldap-master.fireblade.com:389
&lt;/pre&gt;
&lt;br /&gt;
Save the configuration and restart the ldap service in both the server and client 
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;pre&gt;# service ldap restart 
&lt;/pre&gt;
&lt;br /&gt;
Test the configuration by create a new user in the master server and test whether it appears in the slave with in 5 minutes. 
&lt;br /&gt;
&lt;br /&gt;
Debugging 
&lt;br /&gt;
Statrt slapd and slurpd in debug mode to troubleshoot the issues
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;pre&gt;# slapd -d 1 
&lt;/pre&gt;
&lt;pre&gt;# slurpd -d 1
&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://playingwithtux.blogspot.com/feeds/3416626750546317539/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://playingwithtux.blogspot.com/2013/07/openldap-replication-with-slurpd.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/3416626750546317539'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/3416626750546317539'/><link rel='alternate' type='text/html' href='http://playingwithtux.blogspot.com/2013/07/openldap-replication-with-slurpd.html' title='Openldap Replication with Slurpd'/><author><name>Vasanth Muraleedahran</name><uri>http://www.blogger.com/profile/01757300712038207442</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-7597479095358859665.post-6993679182100538189</id><published>2013-07-20T05:22:00.001-07:00</published><updated>2013-07-20T05:22:10.151-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="LDAP"/><title type='text'>Openldap referral</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
In Openldap we can delegate the responsibility to maintain a 
purticular part of directory to Other LDAP server. I am using two LDAP 
server hosting the domain dc=fireblade,dc=com. 
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;pre&gt;1. master-ldap.fireblade.com - 192.168.56.10
&lt;/pre&gt;
&lt;pre&gt;2. ldap1.fireblade.com - 192.168.56.21
&lt;/pre&gt;
&lt;br /&gt;
In this scenario we are going to delegate all the requests for 
ou=us,dc=fireblade,dc=com to the master-ldap.fireblade.com to 
ldap1.fireblade.com
&lt;br /&gt;
Go to ou=us,dc=fireblade,dc=com create a new.ldif with below entries.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;pre&gt;dn: ou=us,dc=fireblade,dc=com
ref: ldap://master-ldap.fireblade.com/ou=us,dc=fireblade,dc=com
ou: us
objectClass: referral
objectClass: extensibleObject
objectClass: top
&lt;/pre&gt;
Add the new entry to LDAP using the below command
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;pre&gt;# ldapadd -D &quot;cn=Manager,dc=fireblade,dc=com&quot; -W -x -f new.ldif

&lt;/pre&gt;
&lt;br /&gt;
Go to Deligated server ldap1.fireblade.com and configure the domain 
fireblade.com in slapd.conf and create the ou us and user nagaraj under 
it.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;ol&gt;
&lt;li&gt; vi /etc/openldap/slapd.conf
&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;suffix          &quot;dc=fireblade,dc=com&quot;
rootdn          &quot;cn=Manager,dc=fireblade,dc=com&quot;
rootpw          {SSHA}U0DavqxmDkhcPK9qpaJzxRM7r/GFtptM
&lt;/pre&gt;
&lt;br /&gt;
Create DIT using the following LDAP and add it using ldap add
&lt;br /&gt;

&lt;pre&gt;# vim add.ldif
&lt;/pre&gt;
&lt;pre&gt;dn: dc=fireblade,dc=com
objectclass: dcObject
objectclass: organization
o: fireblade.com
dc: fireblade
&lt;/pre&gt;
&lt;pre&gt;dn: ou=us,dc=fireblade,dc=com
objectClass: organizationalUnit
objectClass: top
ou: us
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;pre&gt; dn: cn=nagaraj,ou=People,dc=fireblade,dc=com
 objectClass: posixAccount
 objectClass: top
 objectClass: person
 objectClass: organizationalPerson
 objectClass: inetOrgPerson
 cn: nagaraj
 gidNumber: 20001
 homeDirectory: /home/nagaraj
 sn: Sulthan Munaver
 uid: sulthan
 uidNumber: 20000
 manager: uid=suresh,ou=People,dc=fireblade,dc=com
 telephoneNumber: 666677777777
 userPassword:: e1NIQX1QSFo4UWEreEt0b1VBWkR0Z3RzLzJURGk3Nk09
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;pre&gt;# ldapadd -D &quot;cn=Manager,dc=fireblade,dc=com&quot; -W -x -f add.ldif
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;pre&gt;Now the ldap1.fireblade.com server configured with cn=nagaraj,ou=us,dc=fireblade,dc=com
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please go to any other machine with Openldap client and search 
the nagaraj entry in master-ldap.fireblade.com using the below command.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;pre&gt;# ldapsearch -C -h master-ldap.fireblade.com -x -b &quot;ou=us,dc=fireblade,dc=com&quot; &quot;(uid=nagaraj)&quot;
&lt;/pre&gt;
&lt;br /&gt;
Even though the entry is not there in the master-ldap.fireblade.com due 
to referral, it will consult the ldap1.fireblade.com and returns the 
output.
&lt;br /&gt;
&lt;br /&gt; 
&lt;br /&gt;

&lt;pre&gt;# ngaraj, us, fireblade.com
dn: cn=ngaraj,ou=us,dc=fireblade,dc=com
uid: nagaraj
gidNumber: 5010
sn: Nagraj Nagmangala
cn: ngaraj
homeDirectory: /home/nagraj
objectClass: posixAccount
objectClass: top
objectClass: person
objectClass: inetOrgPerson
objectClass: organizationalPerson
uidNumber: 5010
&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://playingwithtux.blogspot.com/feeds/6993679182100538189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://playingwithtux.blogspot.com/2013/07/openldap-referral.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/6993679182100538189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/6993679182100538189'/><link rel='alternate' type='text/html' href='http://playingwithtux.blogspot.com/2013/07/openldap-referral.html' title='Openldap referral'/><author><name>Vasanth Muraleedahran</name><uri>http://www.blogger.com/profile/01757300712038207442</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-7597479095358859665.post-5676737394724747466</id><published>2013-07-20T05:01:00.003-07:00</published><updated>2013-07-20T05:02:11.344-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="LDAP"/><title type='text'>Configuring Multiple DIT in a Single server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Let&#39;s say if we have one domain called fireblade.com and we need to 
configure fireblade.net in the same server please follow the following 
steps.
&lt;br /&gt;
&lt;br /&gt;
Note: fireblade.com domain already exist and we are configuring the 
fireblade.net domian in addition and adding a OU called people OU.
&lt;br /&gt;
My LDAP server&#39;s hostname is 
&lt;br /&gt;

&lt;pre&gt;master-ldap1.fireblade.com - 192.168.56.22
&lt;/pre&gt;
&lt;br /&gt;
Open the configuration file and define the second domain
&lt;br /&gt;

&lt;pre&gt;# vim /etc/openldap/slapd.conf 
&lt;/pre&gt;
add the below lines.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;pre&gt;database       bdb
suffix         dc=fireblade,dc=net&quot;
rootdn         &quot;cn=Manager,dc=fireblade,dc=net&quot;
rootpw         redhat
&lt;/pre&gt;
&lt;pre&gt;directory       /var/lib/ldap/firenix-net
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;pre&gt;index objectClass                       eq,pres
index ou,cn,mail,surname,givenname      eq,pres,sub
index uidNumber,gidNumber,loginShell    eq,pres
index uid,memberUid                     eq,pres,sub
index nisMapName,nisMapEntry            eq,pres,sub
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Save and restart LDAP 
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;pre&gt;# /etc/init.d/ldap restart
&lt;/pre&gt;
&lt;br /&gt;
Create ldif called test.ldif
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;ol&gt;
&lt;li&gt; vim test.ldif 
&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;pre&gt;dn: dc=fireblade,dc=net
dc: fireblade
description: Example Network Operations
objectClass: dcObject
objectClass: organization
o: Firenix, Inc.
&lt;/pre&gt;
&lt;pre&gt;dn: ou=people, dc=fireblade,dc=net
ou: people
description: All people in organisation
objectClass: organizationalUnit
&lt;/pre&gt;
&lt;br /&gt;
Add the ldif to the DATABASE
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;pre&gt;#  ldapadd -D &quot;cn=Manager,dc=fireblade,dc=net&quot; -W -x -f test.ldif
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now the server contains two domains fireblade.com and fireblade.net
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enjoy&amp;nbsp;!!!
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://playingwithtux.blogspot.com/feeds/5676737394724747466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://playingwithtux.blogspot.com/2013/07/configuring-multiple-dit-in-single.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/5676737394724747466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/5676737394724747466'/><link rel='alternate' type='text/html' href='http://playingwithtux.blogspot.com/2013/07/configuring-multiple-dit-in-single.html' title='Configuring Multiple DIT in a Single server'/><author><name>Vasanth Muraleedahran</name><uri>http://www.blogger.com/profile/01757300712038207442</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-7597479095358859665.post-6943339398491938424</id><published>2013-07-20T05:00:00.003-07:00</published><updated>2013-07-20T05:02:14.277-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="LDAP"/><title type='text'>Openldap ACL Key word examples</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;pre&gt;0: o=suffix
   1: cn=Manager,o=suffix
   2: ou=people,o=suffix
   3: uid=kdz,ou=people,o=suffix
   4: cn=addresses,uid=kdz,ou=people,o=suffix
   5: uid=hyc,ou=people,o=suffix
&lt;/pre&gt;
Then:
&lt;br /&gt;

&lt;pre&gt;   dn.base=&quot;ou=people,o=suffix&quot; match 2;
   dn.one=&quot;ou=people,o=suffix&quot; match 3, and 5;
   dn.subtree=&quot;ou=people,o=suffix&quot; match 2, 3, 4, and 5; and
   dn.children=&quot;ou=people,o=suffix&quot; match 3, 4, and 5.
&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://playingwithtux.blogspot.com/feeds/6943339398491938424/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://playingwithtux.blogspot.com/2013/07/openldap-acl-key-word-examples.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/6943339398491938424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/6943339398491938424'/><link rel='alternate' type='text/html' href='http://playingwithtux.blogspot.com/2013/07/openldap-acl-key-word-examples.html' title='Openldap ACL Key word examples'/><author><name>Vasanth Muraleedahran</name><uri>http://www.blogger.com/profile/01757300712038207442</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-7597479095358859665.post-5759362612766732024</id><published>2013-07-20T04:59:00.001-07:00</published><updated>2013-07-20T04:59:30.187-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="LDAP"/><title type='text'>OpenLDAP group ACL</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
In this scenario all the members in a particular group can update the Directory server data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create group called administrators add suresh as user  under &quot;dc=fireblade,dc=com&quot; usingthe&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
following LDIF
&lt;br /&gt;

&lt;pre&gt;dn: cn=administrators,dc=fireblade,dc=com
objectClass: groupOfNames
cn: administrators
member: cn=suresh,ou=People,dc=fireblade,dc=com
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
LDIF for suresh is given below
&lt;br /&gt;

&lt;pre&gt;dn: cn=suresh,ou=People,dc=fireblade,dc=com
objectClass: posixAccount
objectClass: top
objectClass: person
cn: suresh
gidNumber: 3001
homeDirectory: /home/suresh
sn: suresh
uid: suresh
uidNumber: 3000
userPassword:: e1NIQX1QSFo4UWEreEt0b1VBWkR0Z3RzLzJURGk3Nk09
&lt;/pre&gt;
&lt;br /&gt;
Open the openldap configuration file and add the following configuration
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;pre&gt;access to dn.children=&quot;dc=fireblade,dc=com&quot;
       by self write
       by group.exact=&quot;cn=administrators,dc=fireblade,dc=com&quot; write
       by * auth
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Save and exit the configuration and restart the service. 
&lt;br /&gt;

&lt;pre&gt;/etc/init.d/ldap restart
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Connect to LDAP as suresh and try to modify the filed. Now you can modify the fields. 
&lt;br /&gt;
&lt;br /&gt;
Enjoy&amp;nbsp;!!!!!
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://playingwithtux.blogspot.com/feeds/5759362612766732024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://playingwithtux.blogspot.com/2013/07/openldap-group-acl.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/5759362612766732024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/5759362612766732024'/><link rel='alternate' type='text/html' href='http://playingwithtux.blogspot.com/2013/07/openldap-group-acl.html' title='OpenLDAP group ACL'/><author><name>Vasanth Muraleedahran</name><uri>http://www.blogger.com/profile/01757300712038207442</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-7597479095358859665.post-1065100331111623063</id><published>2013-07-20T04:51:00.003-07:00</published><updated>2013-07-20T04:51:45.658-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="LDAP"/><title type='text'>Openldap ACL Implimentation</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;Giving Permission to change password for the authenticated current user&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;
&lt;br /&gt;
By using this configuration only currently authenticated user can
 change the password themselves. He can&#39;t view or change the others 
passwords. 
&lt;br /&gt;
&lt;br /&gt;
Open /etc/openldap/slapd.conf
&lt;br /&gt;

&lt;pre&gt;# vim /etc/openldap/slapd.conf
&lt;/pre&gt;
&lt;pre&gt;After the line rootdn          &quot;cn=Manager,dc=fireblade,dc=com&quot; enter the below configurations.
&lt;/pre&gt;
&lt;pre&gt;access to attrs=userPassword
    by self write
    by * auth
&lt;/pre&gt;
&lt;pre&gt;access to *
      by * read
&lt;/pre&gt;
Save the configuration and restart the openldap
&lt;br /&gt;

&lt;pre&gt;# /etc/init.d/openldap restart
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Giving permission to the Manager to update the filed of his Employee&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;pre&gt;# vi /etc/openldap/slap.conf
&lt;/pre&gt;
After the line rootdn          &quot;cn=Manager,dc=fireblade,dc=com&quot; enter the below configurations.
&lt;br /&gt;
&lt;br /&gt;
access to dn.exact=&quot;uid=sulthan,ou=People,dc=fireblade,dc=com&quot;
&lt;br /&gt;

&lt;pre&gt;   attrs=carLicense,homePhone,mobile,pager,telephoneNumber
   by self write
   by set=&quot;this/manager &amp;amp; user&quot; write
   by * read
&lt;/pre&gt;
&lt;br /&gt;
Save the configuration file and restart the ldap using th below command
&lt;br /&gt;

&lt;pre&gt;# /etc/init.d/ldap restart
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE: Create user sulthan with objectClass: IntetOrgPerson and 
suresh as his manager using any of the LDAP client like Apache Directory
 Studio.
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;LDIF for both sulthan and suresh are given below.&lt;/b&gt;
&lt;br /&gt;

&lt;pre&gt;dn: cn=sulthan,ou=People,dc=fireblade,dc=com
objectClass: posixAccount
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
cn: sulthan
gidNumber: 20001
homeDirectory: /home/smunaver
sn: Sulthan Munaver
uid: sulthan
uidNumber: 20000
manager: uid=suresh,ou=People,dc=fireblade,dc=com
telephoneNumber: 666677777777
userPassword:: e1NIQX1QSFo4UWEreEt0b1VBWkR0Z3RzLzJURGk3Nk09
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;pre&gt;dn: cn=suresh,ou=People,dc=fireblade,dc=com
objectClass: posixAccount
objectClass: top
objectClass: person
cn: suresh
gidNumber: 3001
homeDirectory: /home/suresh
sn: suresh
uid: suresh
uidNumber: 3000
userPassword:: e1NIQX1QSFo4UWEreEt0b1VBWkR0Z3RzLzJURGk3Nk09
&lt;/pre&gt;
&lt;br /&gt;
Suresh is the Manager for Sulthan and he can update the fields such as carLicense,homePhone,mobile,pager,telephoneNumber.
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://playingwithtux.blogspot.com/feeds/1065100331111623063/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://playingwithtux.blogspot.com/2013/07/openldap-acl-implimentation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/1065100331111623063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7597479095358859665/posts/default/1065100331111623063'/><link rel='alternate' type='text/html' href='http://playingwithtux.blogspot.com/2013/07/openldap-acl-implimentation.html' title='Openldap ACL Implimentation'/><author><name>Vasanth Muraleedahran</name><uri>http://www.blogger.com/profile/01757300712038207442</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>