From Mageia wiki
Jump to: navigation, search

Adding groups

In order to add a new group into the infrastructure, you need to challenge LDAP to a fight and beat it in hand-to-hand combat!

Firstly find the oldest posix group id and add 1 to it.

 [root@valstar ~]# ldapsearch -H ldaps://ldap.mageia.org -W -D uid=pterjan,ou=People,dc=mageia,dc=org -b ou=Group,dc=mageia,dc=org 2>/dev/null | grep ^gidNumber: | sort | tail -n 1
 gidNumber: 5019

Create a small file newgroup.ldif with the following contents:

 dn: cn=mga-newgroup,ou=Group,dc=mageia,dc=org
 cn: mga-newgroup
 objectClass: groupOfNames
 objectClass: posixGroup
 description: Mageia New Group
 gidNumber: 5020

If there are one or more specific owners of this group, add the following line as appropriate:

 owner: uid=owner,ou=People,dc=mageia,dc=org


Then run:

 [root@valstar ~]# ldapadd -H ldaps://ldap.mageia.org -D uid=colin,ou=People,dc=mageia,dc=org -W -f newgroup.ldif