<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MemoSoup &#187; ldap</title>
	<atom:link href="http://www.memosoup.com/tag/ldap/feed" rel="self" type="application/rss+xml" />
	<link>http://www.memosoup.com</link>
	<description>Mix of the things I always forget</description>
	<lastBuildDate>Tue, 07 Feb 2012 00:03:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Manupulating Oracle LDAP entries</title>
		<link>http://www.memosoup.com/20090912/manupulating-oracle-ldap-entries.html</link>
		<comments>http://www.memosoup.com/20090912/manupulating-oracle-ldap-entries.html#comments</comments>
		<pubDate>Sat, 12 Sep 2009 15:29:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[ldap]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=48</guid>
		<description><![CDATA[<p>Examples for changing the Oracle LDAP entries. Warning! Put the space after every ldif command! Check the version of ldapmodify (it should be Oracle binary, not the OS standard one)</p> <p>#### modify.sh ####</p> ldapmodify -D 'cn=orcladmin' -w $LDAP_PASS -h $LDAP_HOST -p $LDAP_PORT -v -f modify.ldif <p>#### modify.ldif #### dn: cn=SOME_ORACLE_SID,cn=OracleContext,dc=ny,dc=company,dc=com changetype: modify replace:orclnetdescstring orclnetdescstring: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=456.456.456.456) [...]]]></description>
			<content:encoded><![CDATA[<p>Examples for changing the Oracle LDAP entries.<br />
<strong>Warning! </strong><br />
Put the space after every ldif command!<br />
Check the version of ldapmodify (it should be Oracle binary, not the OS standard one)</p>
<p>#### <strong>modify.sh</strong> ####</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ldapmodify <span style="color: #660033;">-D</span> <span style="color: #ff0000;">'cn=orcladmin'</span> <span style="color: #660033;">-w</span> <span style="color: #007800;">$LDAP_PASS</span> <span style="color: #660033;">-h</span> <span style="color: #007800;">$LDAP_HOST</span> <span style="color: #660033;">-p</span> <span style="color: #007800;">$LDAP_PORT</span> <span style="color: #660033;">-v</span> <span style="color: #660033;">-f</span> modify.ldif</div></div>
<p>#### <strong>modify.ldif </strong>####<br />
dn: cn=SOME_ORACLE_SID,cn=OracleContext,dc=ny,dc=company,dc=com<br />
changetype: modify<br />
replace:orclnetdescstring<br />
orclnetdescstring: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=456.456.456.456)<br />
(PORT=1521))(CONNECT_DATA=(SID=SOME_ORACLE_SID) (GLOBAL_DBNAME=SOME_ORACLE_SID.ny.company.com)))</p>
<p>#### <strong>add.sh</strong> ####</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ldapmodify <span style="color: #660033;">-D</span> <span style="color: #ff0000;">'cn=orcladmin'</span> <span style="color: #660033;">-w</span> <span style="color: #007800;">$LDAP_PASS</span> <span style="color: #660033;">-h</span> <span style="color: #007800;">$LDAP_HOST</span> <span style="color: #660033;">-p</span> <span style="color: #007800;">$LDAP_PORT</span> <span style="color: #660033;">-v</span> <span style="color: #660033;">-f</span> add.ldif</div></div>
<p>### add.ldif ###<br />
dn: cn=SOME_ORACLE_SID,cn=OracleContext,dc=ny,dc=company,dc=com<br />
orclnetdescstring: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=456.456.456.456)<br />
(PORT=1521))(CONNECT_DATA=(SID=SOME_ORACLE_SID) (GLOBAL_DBNAME=SOME_ORACLE_SID.ny.company.com)))<br />
objectclass: top<br />
objectclass: orclNetService<br />
cn: SOME_ORACLE_SID<br />
orclnetdescname: 000:cn=DESCRIPTION_0</p>
<p>### <strong>unload.sh</strong> ###</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/ksh</span><br />
<span style="color: #000000; font-weight: bold;">if</span> &nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-z</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> ; <span style="color: #000000; font-weight: bold;">then</span><br />
&nbsp;<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-z</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$CONTEXT</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> ; <span style="color: #000000; font-weight: bold;">then</span><br />
&nbsp; print &nbsp;<span style="color: #ff0000;">&quot;Examples of context: ny.company.com or dc=ny,dc=company,dc=com&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">2</span><br />
&nbsp; <span style="color: #7a0874; font-weight: bold;">printf</span> <span style="color: #ff0000;">&quot;Enter context (Enter for default): &quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">2</span><br />
&nbsp; <span style="color: #c20cb9; font-weight: bold;">read</span> CONTEXT<br />
&nbsp;<span style="color: #000000; font-weight: bold;">fi</span><br />
&nbsp;<span style="color: #007800;">CONTEXT</span>=<span style="color: #800000;">${CONTEXT:-&quot;dc=world&quot;}</span><br />
<span style="color: #000000; font-weight: bold;">else</span><br />
&nbsp;<span style="color: #007800;">CONTEXT</span>=<span style="color: #800000;">${1:-&quot;dc=world&quot;}</span><br />
<span style="color: #000000; font-weight: bold;">fi</span><br />
<br />
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$CONTEXT</span>&quot;</span> <span style="color: #000000; font-weight: bold;">in</span> <br />
&nbsp;<span style="color: #ff0000;">&quot;dc=&quot;</span><span style="color: #000000; font-weight: bold;">*</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">;;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #007800;">CONTEXT</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${CONTEXT}</span>&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s#\([^.]*\)$#dc=\1#;s#\([^.]*\)\.#dc=\1,#g'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">;;</span><br />
<span style="color: #000000; font-weight: bold;">esac</span><br />
<br />
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;# CONTEXT: <span style="color: #007800;">$CONTEXT</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">2</span><br />
<br />
ldapsearch <span style="color: #660033;">-h</span> <span style="color: #007800;">$LDAP_HOST</span> <span style="color: #660033;">-p</span> <span style="color: #007800;">$LDAP_PORT</span> <span style="color: #660033;">-D</span> <span style="color: #ff0000;">&quot;cn=orcladmin&quot;</span> <span style="color: #660033;">-w</span> <span style="color: #007800;">$LDAP_PASS</span> <span style="color: #660033;">-L</span> <span style="color: #660033;">-s</span> sub <span style="color: #660033;">-b</span> <span style="color: #ff0000;">&quot;cn=OracleContext,<span style="color: #007800;">${CONTEXT}</span>&quot;</span> <span style="color: #ff0000;">&quot;(objectclass=orclnetService)&quot;</span> <span style="color: #ff0000;">&quot;*&quot;</span></div></div>
<div style="height:33px; padding-top:2px; padding-bottom:2px; clear:both;" class="zare366"><div style="float:left; width:100px; " class="zare366_facebook_like"> 
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.memosoup.com%2F20090912%2Fmanupulating-oracle-ldap-entries.html&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=27" 
					scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:27px;" allowTransparency="true"></iframe>
			</div><div style="float:left; width:90px; padding-left:10px;" class="zare366_google1"> 
				<g:plusone size="medium" href="http://www.memosoup.com/20090912/manupulating-oracle-ldap-entries.html" ></g:plusone>
			</div><div style="float:left; width:110px; padding-left:10px;" class="zare366_twitter"> 
				<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
					data-text="Manupulating Oracle LDAP entries" data-url="http://www.memosoup.com/20090912/manupulating-oracle-ldap-entries.html">Tweet</a> 
			</div></div>
		<div style="display:none;"><a href="http://www.news365live.com">news and informations</a>&nbsp;<a href="http://news365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a><a href="http://worldnews365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a></div><div style="clear:both;"></div>]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20090912/manupulating-oracle-ldap-entries.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

