Removing memberUid from OpenLDAP group

The following syntax can be used to remove a user from an OpenLDAP group:

$ ldapmodify -x -D "cn=manager,dc=example,dc=com" -W <<EOF
> dn: cn=sshusers,ou=groups,dc=example,dc=com
> changetype: modify
> delete: memberUid
> memberUid: previousMember
> EOF

Comments

2 responses to “Removing memberUid from OpenLDAP group”

  1. James Richardson Avatar
    James Richardson

    I’ve tried this as well as add: memberUid to delete or add a memberUid from a group. Neither appear to modify the group. No errors are reported.

    Any ideas as to what might be going on?

    ldapmodify -D “cn=MainID,dc=testDC,dc=com” -W <<EOF
    cn: cn=testGroup,ou=groups,dc=testDC,dc=com
    changetype: modify
    delete: memberUid
    memberUid: test123
    EOF

  2. dn: cn=testGroup,ou=groups,dc=testDC,dc=com

Leave a Reply

Your email address will not be published. Required fields are marked *