Is there any way to use one of LDAP's DN-based groups for linux groups instead of using the uid-based posixGroup objectclass?
More broadly, is there any way I can avoid having one set of groups for supporting linux accounts and a parallel set of groups that's used by everything else?
Yes.
In your nss_ldap configuration file, set nss_schema:
On your server in the schema, make sure the posixGroup object class is auxiliary instead of structural.
Then you can use both the groupofmembers(new) or groupofnames(old) and posixgroup objectclasses for each group. Each member will be in a member attribute:
To get the
groupOfMembers
schema, you can either extract it from the rfc, or use this one that's been done for you, and save it to/etc/openldap/schema/rfc2307bis.schema
. This schema supersedes thenis
schema, so remove that one first.If you're using the
cn=config
backendconvert-schema.conf
containing/tmp/converted
slaptest -f convert-schema.conf -F /tmp/convert/
slaptest
succeeds/tmp/convert/cn=config/cn=schema/cn={2}rfc2307bis.ldif
to/etc/openldap/rfc2307bis.ldif
rfc2307bis.ldif
dn: cn=rfc2307bis,cn=schema,cn=config
cn: rfc2307bis
structuralObjectClass
throughmodifyTimestamp
)ldapadd -f rfc2307bis.ldif -D "cn=admin,cn=config" -W