Add users to groups with ldap

 in

I need to add an existing user to an existing group with my new ldap setup, which is running on a Debian lenny server. Here's what I've got for an ldif file:

dn: cn=johnstones,ou=Groups,dc=newcrossroads,dc=net
changetype: modify
add: uniquemember
uniquemember: cn=jess

and here is my command and output:

robert:~# ldapmodify -x -D cn=admin,dc=newcrossroads,dc=net -W -f /var/tmp/adduser.ldif
Enter LDAP Password:
modifying entry "cn=johnstones,ou=Groups,dc=newcrossroads,dc=net"
ldap_modify: Object class violation (65)
additional info: attribute 'uniqueMember' not allowed

I've also attempted to do the job with ldapscipts with the following results:

robert:~# ldapaddusertogroup jess johnstones
Group johnstones not found (or jess already member of johnstones)

That last in particular confuses me; the group exists and every attempt I've made to add the user has failed. So two questions:

How do I write a proper ldif file to add a user to a group?

How do I view group membership?

Please bear in mind that I really don't know what I'm doing. I got ldap running more through good luck than good practices. Unfortunately the online guides I've found assume that you do know what you're doing, and I've been fighting with this for three days. Can anyone help?

Webcast
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers

Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.

Learn More

Sponsored by AMD

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState