<p>Hi</p>
<p>I had to be sure soo i looked in other your topic. You are using uniquemember attibute? Try this:</p>
<p>Ldapsearch -x &#39;(uniquemember=jsmith)&#39;</p>
<p>Greg.</p>
<p>Send from htc desire z</p>
<div class="gmail_quote">08-08-2012 16:23, &quot;Fosiul Alam&quot; &lt;<a href="mailto:fosiul@gmail.com">fosiul@gmail.com</a>&gt; napisa³(a):<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi thanks<br>
but thats not giving me result of all the groups this user belong to ??<br>
<br>
will really appropriate your help.<br>
Fosiul.<br>
<br>
<br>
On Wed, Aug 8, 2012 at 2:36 PM, Grzegorz Dwornicki &lt;<a href="mailto:gd1100@gmail.com">gd1100@gmail.com</a>&gt; wrote:<br>
&gt; Ldapsearch -x &#39;(memberuid=jsmith)&#39;<br>
&gt;<br>
&gt; This will not return user primary group.<br>
&gt;<br>
&gt; Greg.<br>
&gt;<br>
&gt; Send from htc desire z<br>
&gt;<br>
&gt; 08-08-2012 15:27, &quot;Fosiul Alam&quot; &lt;<a href="mailto:fosiul@gmail.com">fosiul@gmail.com</a>&gt; napisa³(a):<br>
&gt;<br>
&gt;&gt; Hi thanks<br>
&gt;&gt;<br>
&gt;&gt; Just  a quick qustion<br>
&gt;&gt; is there any ldapcommand which will give me a list of groups a user belong<br>
&gt;&gt; to ??<br>
&gt;&gt;<br>
&gt;&gt; Supppose I want to see all the groups list a user call jonh smith belong<br>
&gt;&gt; to ??<br>
&gt;&gt; thanks<br>
&gt;&gt;<br>
&gt;&gt; On Wed, Aug 8, 2012 at 2:05 PM, Michael R. Gettes &lt;<a href="mailto:gettes@pobox.com">gettes@pobox.com</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt; &gt; to get a backup of just the data - the simplest thing to do is to use<br>
&gt;&gt; &gt; db2ldif (documented well in the various versions).  you can use the GUI<br>
&gt;&gt; &gt; to<br>
&gt;&gt; &gt; do an export which uses db2ldif under the covers.  db2ldif has various<br>
&gt;&gt; &gt; capabilities to include and exclude portions of the tree.  ldif2db is to<br>
&gt;&gt; &gt; import.  also well documented.  i do this all the time.  it&#39;s really<br>
&gt;&gt; &gt; easy.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; /mrg<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Aug 8, 2012, at 9:01, Grzegorz Dwornicki wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; You can run this in many ways for example:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Ldapsearch -D &quot;cn=Directory Manager&quot; -W -b<br>
&gt;&gt; &gt; ou=Users,l=uk,dc=fosiul,dc=lan<br>
&gt;&gt; &gt; Ldapsearch -D &quot;cn=Directory Manager&quot; -W -b<br>
&gt;&gt; &gt; ou=Groups,l=uk,dc=fosiul,dc=lan<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; This way you get 2 results in ldif format. But you can try something<br>
&gt;&gt; &gt; like<br>
&gt;&gt; &gt; this:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Ldapsearch -D &quot;cn=Directory Manager&quot; -W -b l=uk,dc=fosiul,dc=lan<br>
&gt;&gt; &gt; &#39;(I(objectclass=person)(ou=Groups)(ou=Users)(objectclass=posixgroup))&#39;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I used &quot;I&quot; in ldapfilter because could not find pipe character on my<br>
&gt;&gt; &gt; phone<br>
&gt;&gt; &gt; please use pipe character known from bash instead. Sorry for trouble.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; This command should give the same result as ones provided ealier, but in<br>
&gt;&gt; &gt; one<br>
&gt;&gt; &gt; query. I am asking for all ldap content and filter it aginst persons,<br>
&gt;&gt; &gt; posixgroups and users/groups containers.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; What i ment is you can do this task in many ways :)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Greg.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Send from z htc desire z<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; 08-08-2012 14:35, &quot;Fosiul Alam&quot; &lt;<a href="mailto:fosiul@gmail.com">fosiul@gmail.com</a>&gt; napisa³(a):<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Hi thanks<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; my ldap is like this<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; l=uk,dc=fosiul,dc=lan<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; then it has OU=Users<br>
&gt;&gt; &gt;&gt; OU=Grups<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; what shall be the command  for bellow ?<br>
&gt;&gt; &gt;&gt; (Just run ldapseach as dirctory manger with criteria/filters/basedn you<br>
&gt;&gt; &gt;&gt; want. )<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; On Wed, Aug 8, 2012 at 1:33 PM, Grzegorz Dwornicki &lt;<a href="mailto:gd1100@gmail.com">gd1100@gmail.com</a>&gt;<br>
&gt;&gt; &gt;&gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt; Yes i told you how in ealier mail.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; Just run ldapseach as dirctory manger with criteria/filters/basedn<br>
&gt;&gt; &gt;&gt; &gt; you<br>
&gt;&gt; &gt;&gt; &gt; want.<br>
&gt;&gt; &gt;&gt; &gt; Next pipe or copy results to file. Maybe use sed on the file to make<br>
&gt;&gt; &gt;&gt; &gt; litle<br>
&gt;&gt; &gt;&gt; &gt; changes of needed. Copy it to second server and use ldapadd on it.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; Greg.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; Send from z htc desire z<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; 08-08-2012 14:25, &quot;Fosiul Alam&quot; &lt;<a href="mailto:fosiul@gmail.com">fosiul@gmail.com</a>&gt; napisa³(a):<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; Hi<br>
&gt;&gt; &gt;&gt; &gt;&gt; Is there any way to make ldif from production server<br>
&gt;&gt; &gt;&gt; &gt;&gt; then  run this on this test server??<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; Fosiul<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; On Wed, Aug 8, 2012 at 1:03 PM, Grzegorz Dwornicki<br>
&gt;&gt; &gt;&gt; &gt;&gt; &lt;<a href="mailto:gd1100@gmail.com">gd1100@gmail.com</a>&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; Hi<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; I&#39;m not sure about your second server, does it need to have same<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; base<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; tree.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; I think yes it needs. Because admin console and shell 389 backup<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; tools<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; make<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; copy of database files not in ldif format. If your second server<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; have<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; diferent tree you can use sed + ldapsearch to extract data.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; Consider also this: The best way to sync two or more ldap servers<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; is<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; replication.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; Greg.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; wiadomosc wyslana z htc desire z<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; 08-08-2012 13:41, &quot;Fosiul Alam&quot; &lt;<a href="mailto:fosiul@gmail.com">fosiul@gmail.com</a>&gt; napisa³(a):<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; Hi<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; I have a running Fedora 389 Server<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; I want to create a test server but i want to have the same data<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; from<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; My production server<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; So i am thinking<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; if i take a backup of production server<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; then create a a new 389 instances then restore from that backup<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; in<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; to<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; new 389 instance<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; will it work ??<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; Thanks for your help.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; Fosiul<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; --<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; 389 users mailing list<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; <a href="mailto:389-users@lists.fedoraproject.org">389-users@lists.fedoraproject.org</a><br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; <a href="https://admin.fedoraproject.org/mailman/listinfo/389-users" target="_blank">https://admin.fedoraproject.org/mailman/listinfo/389-users</a><br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; --<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; 389 users mailing list<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; <a href="mailto:389-users@lists.fedoraproject.org">389-users@lists.fedoraproject.org</a><br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; <a href="https://admin.fedoraproject.org/mailman/listinfo/389-users" target="_blank">https://admin.fedoraproject.org/mailman/listinfo/389-users</a><br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; --<br>
&gt;&gt; &gt;&gt; &gt;&gt; Regards<br>
&gt;&gt; &gt;&gt; &gt;&gt; Fosiul Alam<br>
&gt;&gt; &gt;&gt; &gt;&gt; 07877100621<br>
&gt;&gt; &gt;&gt; &gt;&gt; <a href="http://www.fosiul.co.uk" target="_blank">http://www.fosiul.co.uk</a><br>
&gt;&gt; &gt;&gt; &gt;&gt; --<br>
&gt;&gt; &gt;&gt; &gt;&gt; 389 users mailing list<br>
&gt;&gt; &gt;&gt; &gt;&gt; <a href="mailto:389-users@lists.fedoraproject.org">389-users@lists.fedoraproject.org</a><br>
&gt;&gt; &gt;&gt; &gt;&gt; <a href="https://admin.fedoraproject.org/mailman/listinfo/389-users" target="_blank">https://admin.fedoraproject.org/mailman/listinfo/389-users</a><br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; --<br>
&gt;&gt; &gt;&gt; &gt; 389 users mailing list<br>
&gt;&gt; &gt;&gt; &gt; <a href="mailto:389-users@lists.fedoraproject.org">389-users@lists.fedoraproject.org</a><br>
&gt;&gt; &gt;&gt; &gt; <a href="https://admin.fedoraproject.org/mailman/listinfo/389-users" target="_blank">https://admin.fedoraproject.org/mailman/listinfo/389-users</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; --<br>
&gt;&gt; &gt;&gt; Regards<br>
&gt;&gt; &gt;&gt; Fosiul Alam<br>
&gt;&gt; &gt;&gt; 07877100621<br>
&gt;&gt; &gt;&gt; <a href="http://www.fosiul.co.uk" target="_blank">http://www.fosiul.co.uk</a><br>
&gt;&gt; &gt;&gt; --<br>
&gt;&gt; &gt;&gt; 389 users mailing list<br>
&gt;&gt; &gt;&gt; <a href="mailto:389-users@lists.fedoraproject.org">389-users@lists.fedoraproject.org</a><br>
&gt;&gt; &gt;&gt; <a href="https://admin.fedoraproject.org/mailman/listinfo/389-users" target="_blank">https://admin.fedoraproject.org/mailman/listinfo/389-users</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; --<br>
&gt;&gt; &gt; 389 users mailing list<br>
&gt;&gt; &gt; <a href="mailto:389-users@lists.fedoraproject.org">389-users@lists.fedoraproject.org</a><br>
&gt;&gt; &gt; <a href="https://admin.fedoraproject.org/mailman/listinfo/389-users" target="_blank">https://admin.fedoraproject.org/mailman/listinfo/389-users</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; --<br>
&gt;&gt; &gt; 389 users mailing list<br>
&gt;&gt; &gt; <a href="mailto:389-users@lists.fedoraproject.org">389-users@lists.fedoraproject.org</a><br>
&gt;&gt; &gt; <a href="https://admin.fedoraproject.org/mailman/listinfo/389-users" target="_blank">https://admin.fedoraproject.org/mailman/listinfo/389-users</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Regards<br>
&gt;&gt; Fosiul Alam<br>
&gt;&gt; 07877100621<br>
&gt;&gt; <a href="http://www.fosiul.co.uk" target="_blank">http://www.fosiul.co.uk</a><br>
&gt;&gt; --<br>
&gt;&gt; 389 users mailing list<br>
&gt;&gt; <a href="mailto:389-users@lists.fedoraproject.org">389-users@lists.fedoraproject.org</a><br>
&gt;&gt; <a href="https://admin.fedoraproject.org/mailman/listinfo/389-users" target="_blank">https://admin.fedoraproject.org/mailman/listinfo/389-users</a><br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; 389 users mailing list<br>
&gt; <a href="mailto:389-users@lists.fedoraproject.org">389-users@lists.fedoraproject.org</a><br>
&gt; <a href="https://admin.fedoraproject.org/mailman/listinfo/389-users" target="_blank">https://admin.fedoraproject.org/mailman/listinfo/389-users</a><br>
<br>
<br>
<br>
--<br>
Regards<br>
Fosiul Alam<br>
07877100621<br>
<a href="http://www.fosiul.co.uk" target="_blank">http://www.fosiul.co.uk</a><br>
--<br>
389 users mailing list<br>
<a href="mailto:389-users@lists.fedoraproject.org">389-users@lists.fedoraproject.org</a><br>
<a href="https://admin.fedoraproject.org/mailman/listinfo/389-users" target="_blank">https://admin.fedoraproject.org/mailman/listinfo/389-users</a></blockquote></div>