Skip to content

Instantly share code, notes, and snippets.

@kamituel
Created January 14, 2013 09:23
Show Gist options
  • Save kamituel/4528840 to your computer and use it in GitHub Desktop.
Save kamituel/4528840 to your computer and use it in GitHub Desktop.
Add users group to LDAP
$ cat > group.ldif <<EOM
dn: cn=john,ou=Group,dc=example,dc=com
cn: john
userPassword: {crypt}x
gidNumber: 2001
objectClass: posixGroup
objectClass: top
EOM
$ ldapmodify -a -h localhost \
-D "cn=Manager,dc=example,dc=com" \
-w secret \
-f group.ldif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment