1 2 Previous Next 19 Replies Latest reply: Jul 13, 2013 3:54 AM by Suraj.R Go to original post RSS
      • 15. Re: Unable to create user under appropriate LDAP group
        Suraj.R

        Hi Delhi,

         

        Thanks.

         

        My user import has worked out successfully. Only concern now is to assign the users to the correct group.

         

        I've created an ldif file like you mentioned earlier:

        dn: cn=group2, o=Your Company

        objectclass: groupOfUniqueNames

        cn: group2

        uniquemember: cn=tom, o=Your Company

        uniquemember: cn=dan,o=Your Company

        uniquemember: cn=sam,o=Your Company

         

        Now how to import it? I used the same ldapadd command but it gives: ldap_add: Already exists.

        Do I need to use ldapmodify...do you have the proper command/syntax for it?

         

        regards.

        • 16. Re: Unable to create user under appropriate LDAP group
          delhi

          use ldapmodify with same syntax:

           

          ldapmodify -h host -p port -D "cn=Directory Manager" -w Password -v -f group.ldif

          • 17. Re: Unable to create user under appropriate LDAP group
            Suraj.R

            Hi Delhi,

             

            Here is what I get when I run the command:

             

            # ldapmodify -h ldapd01 -p 389 -D "cn=Directory Manager" -w test1234 -v -f members.ldif -c

             

            ldapmodify: started Fri Jul 12 15:52:22 2013

             

            ldap_init( sapldapd01, 389 )

            ldapmodify: Missing changetype operation specification.

                    The dn line must be followed by "changetype: operation"

                    (unless ldapmodify is called with -a option)

                    where operation is add|delete|modify|modrdn|moddn|rename

                    "cn" is not a valid changetype operation specification

                    (line 2 of entry cn=etax_itp,ou=groups,dc=mra,dc=mu)

             

            I'm trying different syntax but unable to get it right. Please suggest if ever you know of some other possibility.

             

            regards.

            • 18. Re: Unable to create user under appropriate LDAP group
              delhi

              if groups doesn't exist, then use this LDIF sample:

               

              dn: cn=group2, o=Your Company

              objectclass: groupOfUniqueNames

              cn: group2

              uniquemember: cn=tom, o=Your Company

              uniquemember: cn=dan,o=Your Company

              uniquemember: cn=sam,o=Your Company

               

              and if above group already exist and you want some users to be part of the above group, then use this:

               

              dn: cn=group2,dc=mra,dc=mu

              changetype: modify

              add: uniquemember

              uniquemember: uid=14300013,ou=users,dc=mra,dc=mu

               

              and run ldapmodify command

              • 19. Re: Unable to create user under appropriate LDAP group
                Suraj.R

                Thanks Delhi,

                 

                the above has worked successfully (the case where the group already exists).

                 

                regards.

                1 2 Previous Next