It will look like this:<br><br>dn: cn=ops-uk,ou=groups,l=UK,dc=fosiul,dc=lan<br>changetype: modify<br>add: memberuid<br>memberuid: yalam<br><br>Greg.<br><br><div class="gmail_quote">2012/8/4 Fosiul Alam <span dir="ltr"><<a href="mailto:fosiul@gmail.com" target="_blank">fosiul@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">HI thanks<br>
Just one more question .. then i should be able to finish ..<br>
<br>
<br>
Adding user is fine .<br>
So when I have added a user by default its going to to<br>
gidNumber: 6001<br>
<br>
now i want to add this user into another Group(6000)<br>
<br>
what would be my ldif for this ??<br>
Current Group entry is like this<br>
<br>
dn: cn=ops-uk,ou=groups,l=UK,dc=fosiul,dc=lan<br>
gidNumber: 6000<br>
objectClass: top<br>
objectClass: groupofuniquenames<br>
objectClass: posixgroup<br>
uniqueMember: uid=falam,ou=users,l=UK,dc=fosiul,dc=lan<br>
cn: ops-uk<br>
<br>
<br>
So what would be the ldif if i want to add user "alam" into this groups<br>
<br>
thanks for your great help<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
On Sat, Aug 4, 2012 at 8:33 PM, Grzegorz Dwornicki <<a href="mailto:gd1100@gmail.com">gd1100@gmail.com</a>> wrote:<br>
> In ldif format you must use:<br>
><br>
> Attribute: value<br>
><br>
> Soo not<br>
><br>
> Sn=some_value<br>
><br>
> But<br>
> Sn: some_value<br>
><br>
> -D require account DN, tthe same DN is valid in all ldap* commands. In your<br>
> case directory manager has DN "cn=Directory Manager". It is normal, nothing<br>
> strange here because directory manager does not need entry in ldap tree.<br>
><br>
> Greg.<br>
><br>
> Send from htc desire z<br>
><br>
> 04-08-2012 21:06, "Fosiul Alam" <<a href="mailto:fosiul@gmail.com">fosiul@gmail.com</a>> napisał(a):<br>
><br>
>> Hi<br>
>> this is strange , this syntax works<br>
>><br>
>> ldapmodify -xZZ -a -D "cn=Directory Manager" -w testtest -f add.ldif<br>
>><br>
>><br>
>><br>
>> On Sat, Aug 4, 2012 at 7:27 PM, Fosiul Alam <<a href="mailto:fosiul@gmail.com">fosiul@gmail.com</a>> wrote:<br>
>> > Hi Thanks for quick reply<br>
>> ><br>
>> > ldapadd -xZZ -D "cn=Directory Manager" -W -f add.ldif<br>
>> > Enter LDAP Password:<br>
>> > ldapadd: invalid format (line 7) entry:<br>
>> > "uid=yalam,ou=users,l=UK,dc=fosiul,dc=lan"<br>
>> ><br>
>> > Bellow is my add.ldif file<br>
>> ><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>
>> > sn=Alam<br>
>> > cn: Yafali Alam<br>
>> > uid: salam<br>
>> > uidNumber: 1001<br>
>> > gidNumber: 6000<br>
>> > homeDirectory: /home/yalam<br>
>> > loginShell: /bin/bash<br>
>> > gecos: Yçafali Alam,Karate Instructor,Room 37A,435-555-555,801-555-555<br>
>> > userPassword: {crypt}x<br>
>> > shadowLastChange: 0<br>
>> > shadowMax: 0<br>
>> > shadowWarning: 0<br>
>> ><br>
>> > On Sat, Aug 4, 2012 at 7:22 PM, Grzegorz Dwornicki <<a href="mailto:gd1100@gmail.com">gd1100@gmail.com</a>><br>
>> > wrote:<br>
>> >> Try this:<br>
>> >><br>
>> >> ldapadd -xZZ -D "cn=Directory Manager" -W -f add.ldif<br>
>> >><br>
>> >> Greg.<br>
>> >><br>
>> >> wiadomosc wyslana z htc desire z<br>
>> >><br>
>> >> 04-08-2012 20:20, "Fosiul Alam" <<a href="mailto:fosiul@gmail.com">fosiul@gmail.com</a>> napisał(a):<br>
>> >><br>
>> >>> 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>><br>
>> >>> wrote:<br>
>> >>> > Look what account you typed in ldapsearch and ldapadd. Both should<br>
>> >>> > be<br>
>> >>> > "cn=Directory Manager". But in ldapadd you use other perhaps non<br>
>> >>> > 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<br>
>> >>> >> <<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<br>
>> >>> >> > ldapsearch,<br>
>> >>> >> > then<br>
>> >>> >> > you<br>
>> >>> >> > use same "cn=Directory Manager" as -D paameter for ldapadd aswell<br>
>> >>> >> > not<br>
>> >>> >> > "cn=Directory Manager,l=UK,dc=fasiul,dc=lan" like you used in<br>
>> >>> >> > 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>><br>
>> >>> >> > 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<br>
>> >>> >> >>> <<a href="mailto:gd1100@gmail.com">gd1100@gmail.com</a>><br>
>> >>> >> >>> wrote:<br>
>> >>> >> >>> > It looks like you are using wrong directory manager DN. Maybe<br>
>> >>> >> >>> > 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>><br>
>> >>> >> >>> > 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>
>> >>> >> >>> >> -----------------------------------------------------------------------------------------<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<br>
>> >>> >> >>> >> 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><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>
>><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></div></div></blockquote></div><br>