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