<p>Try this:</p>
<p>ldapadd -xZZ -D "cn=Directory Manager" -W -f add.ldif </p>
<p>Greg.</p>
<p>wiadomosc wyslana z htc desire z</p>
<div class="gmail_quote">04-08-2012 20:20, "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">
My ldap serch (This works fine):<br>
<br>
ldapsearch -xZZ -D "cn=Directory Manager" -w 'testtest' -b<br>
"ou=users,l=uk,dc=fosiul,dc=lan" uidNumber=1000<br>
<br>
I have tried 2 way :<br>
<br>
ldapadd -xZZ -D "cn=Directory Manager,l=uk,dc=fosiul,dc=lan" -w<br>
testtest -f add.ldif<br>
ldap_bind: No such object (32)<br>
matched DN: l=uk,dc=fosiul,dc=lan<br>
<br>
ldapadd -xZZ -D "cn=Directory Manager,l=uk,dc=fosiul,dc=lan" -w<br>
testtest -f add.ldif<br>
ldap_bind: No such object (32)<br>
matched DN: l=uk,dc=fosiul,dc=lan<br>
<br>
<br>
On Sat, Aug 4, 2012 at 7:05 PM, Grzegorz Dwornicki <<a href="mailto:gd1100@gmail.com">gd1100@gmail.com</a>> wrote:<br>
> Look what account you typed in ldapsearch and ldapadd. Both should be<br>
> "cn=Directory Manager". But in ldapadd you use other perhaps non existing<br>
> account.<br>
><br>
> Greg.<br>
><br>
> Send from htc desire z<br>
><br>
> 04-08-2012 19:41, "Fosiul Alam" <<a href="mailto:fosiul@gmail.com">fosiul@gmail.com</a>> napisał(a):<br>
><br>
>> Hi thanks for reply.<br>
>> can you please explain litlte bit<br>
>> I am still confused.<br>
>> Thanks<br>
>><br>
>><br>
>><br>
>> On Sat, Aug 4, 2012 at 6:31 PM, Grzegorz Dwornicki <<a href="mailto:gd1100@gmail.com">gd1100@gmail.com</a>><br>
>> wrote:<br>
>> > Sorry for empty message.<br>
>> ><br>
>> > You are close. When you use "cn=Directory Manager" for ldapsearch, then<br>
>> > you<br>
>> > use same "cn=Directory Manager" as -D paameter for ldapadd aswell not<br>
>> > "cn=Directory Manager,l=UK,dc=fasiul,dc=lan" like you used in ldapadd.<br>
>> ><br>
>> > Greg.<br>
>> ><br>
>> > Send from htc desire z<br>
>> ><br>
>> > 04-08-2012 19:27, "Grzegorz Dwornicki" <<a href="mailto:gd1100@gmail.com">gd1100@gmail.com</a>> napisał(a):<br>
>> ><br>
>> >> wiadomosc wyslana z htc desire z<br>
>> >><br>
>> >> 04-08-2012 18:47, "Fosiul Alam" <<a href="mailto:fosiul@gmail.com">fosiul@gmail.com</a>> napisał(a):<br>
>> >>><br>
>> >>> Hi Thanks for reply<br>
>> >>> If you see the search<br>
>> >>> ldapsearch -xZZ -D "cn=Directory Manager" -w 'testtest' -b<br>
>> >>> "ou=users,l=uk,dc=fosiul,dc=lan" uidNumber=1000<br>
>> >>><br>
>> >>> its returns fine. Which means the authentication is fine<br>
>> >>> But dont know how to crete the ldif file for that user.<br>
>> >>><br>
>> >>> Thanks<br>
>> >>><br>
>> >>> On Sat, Aug 4, 2012 at 5:00 PM, Grzegorz Dwornicki <<a href="mailto:gd1100@gmail.com">gd1100@gmail.com</a>><br>
>> >>> wrote:<br>
>> >>> > It looks like you are using wrong directory manager DN. Maybe you<br>
>> >>> > have<br>
>> >>> > administrator named just "cn=Directory Manager"?<br>
>> >>> ><br>
>> >>> > Greg.<br>
>> >>> ><br>
>> >>> > Send from htc desire z<br>
>> >>> ><br>
>> >>> > 04-08-2012 15:52, "Fosiul Alam" <<a href="mailto:fosiul@gmail.com">fosiul@gmail.com</a>> napisał(a):<br>
>> >>> >><br>
>> >>> >> Hi for bellow search i get this :<br>
>> >>> >><br>
>> >>> >><br>
>> >>> >> ldapsearch -xZZ -D "cn=Directory Manager" -w 'testtest' -b<br>
>> >>> >> "ou=users,l=uk,dc=fosiul,dc=lan" uidNumber=1000<br>
>> >>> >> # extended LDIF<br>
>> >>> >> #<br>
>> >>> >> # LDAPv3<br>
>> >>> >> # base <ou=users,l=uk,dc=fosiul,dc=lan> with scope subtree<br>
>> >>> >> # filter: uidNumber=1000<br>
>> >>> >> # requesting: ALL<br>
>> >>> >> #<br>
>> >>> >><br>
>> >>> >> # falam, users, UK, fosiul.lan<br>
>> >>> >> dn: uid=falam,ou=users,l=UK,dc=fosiul,dc=lan<br>
>> >>> >> givenName: Fosiul<br>
>> >>> >> sn: Alam<br>
>> >>> >> loginShell: /bin/bash<br>
>> >>> >> uidNumber: 1000<br>
>> >>> >> gidNumber: 6000<br>
>> >>> >> objectClass: top<br>
>> >>> >> objectClass: person<br>
>> >>> >> objectClass: organizationalPerson<br>
>> >>> >> objectClass: inetorgperson<br>
>> >>> >> objectClass: posixAccount<br>
>> >>> >> uid: falam<br>
>> >>> >> cn: Fosiul Alam<br>
>> >>> >> homeDirectory: /home/falam<br>
>> >>> >> userPassword:: e1NTSEF9MSG1kOVcxdjFVUFVHMVA3eXI0dFQvZ2c9PQ=<br>
>> >>> >> =<br>
>> >>> >><br>
>> >>> >> # search result<br>
>> >>> >> search: 3<br>
>> >>> >> result: 0 Success<br>
>> >>> >><br>
>> >>> >> # numResponses: 2<br>
>> >>> >> # numEntries: 1<br>
>> >>> >><br>
>> >>> >> NOw i am trying to create ldif file so that i can add entry<br>
>> >>> >> manually .<br>
>> >>> >><br>
>> >>> >><br>
>> >>> >><br>
>> >>> >> -----------------------------------------------------------------------------------------<br>
>> >>> >><br>
>> >>> >> adding a new user :<br>
>> >>> >><br>
>> >>> >> dn: uid=yalam,ou=users,l=UK,dc=fosiul,dc=lan<br>
>> >>> >> objectClass: top<br>
>> >>> >> objectClass: person<br>
>> >>> >> objectClass: organizationalPerson<br>
>> >>> >> objectClass: inetorgperson<br>
>> >>> >> objectClass: posixAccount<br>
>> >>> >> cn: Yafali Alam<br>
>> >>> >> uid: salam<br>
>> >>> >> uidNumber: 1001<br>
>> >>> >> gidNumber: 6000<br>
>> >>> >> homeDirectory: /home/yalam<br>
>> >>> >> loginShell: /bin/bash<br>
>> >>> >> gecos: Yafali Alam,Karate Instructor,Room<br>
>> >>> >> 37A,435-555-555,801-555-555<br>
>> >>> >> userPassword: {crypt}x<br>
>> >>> >> shadowLastChange: 0<br>
>> >>> >> shadowMax: 0<br>
>> >>> >> shadowWarning: 0<br>
>> >>> >><br>
>> >>> >> but wh en i do this :<br>
>> >>> >> =======================================<br>
>> >>> >> ldapadd -xZZ -D "cn=Directory Manager,l=UK,dc=fosiul,dc=lan" -w<br>
>> >>> >> testtest -f add.ldif<br>
>> >>> >> I get bellow error :<br>
>> >>> >><br>
>> >>> >> dap_bind: No such object (32)<br>
>> >>> >> matched DN: l=uk,dc=fosiul,dc=lan<br>
>> >>> >><br>
>> >>> >> Can any one please help me to build the ldif ??<br>
>> >>> >> Thanks<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>
> --<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>