Add users to groups with ldap
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:
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?
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- Server Hardening
- EnterpriseDB's EDB Postgres Advanced Server and EDB Postgres Enterprise Manager
- The Death of RoboVM
- BitTorrent Inc.'s Sync
- The US Government and Open-Source Software
- The Humble Hacker?
- Open-Source Project Secretly Funded by CIA
- New Container Image Standard Promises More Portable Apps
- AdaCore's SPARK Pro
- ACI Worldwide's UP Retail Payments
In modern computer systems, privacy and security are mandatory. However, connections from the outside over public networks automatically imply risks. One easily available solution to avoid eavesdroppers’ attempts is SSH. But, its wide adoption during the past 21 years has made it a target for attackers, so hardening your system properly is a must.
Additionally, in highly regulated markets, you must comply with specific operational requirements, proving that you conform to standards and even that you have included new mandatory authentication methods, such as two-factor authentication. In this ebook, I discuss SSH and how to configure and manage it to guarantee that your network is safe, your data is secure and that you comply with relevant regulations.Get the Guide