Ben Stienstra

Linux, Unix, network, radio and more...

User Tools

Site Tools


ldap:create_group

~~TOC~~

OpenLDAP - create group

  • Create LDIF for new group
    # vim newgroup.ldif
    dn: cn=admins,ou=groups,dc=<domain>,dc=<tld>
    objectClass: top
    objectClass: posixGroup
    gidNumber: 3000
  • Add LDIF to LDAP:
    ldapadd -H ldaps://<FQDN> -x -W -D "<Manager DN>" -f newgroup.ldif
  • To add a user to a group, create LDIF:
    # vim addusertogroup.ldif
    dn: cn=admins,ou=Group,dc=<domain>,dc=<tld>
    changetype: modify
    add: memberuid
    memberuid: newuser
  • Load LDIF in LDAP:
    ldapadd -H ldaps://<FQDN> -x -W -D "<Manager DN>" -f addusertogroup.ldif 
ldap/create_group.txt · Last modified: 2015/09/03 15:04 by admin