Can't help you on your first question, but on the second:
```
Another question: is there a way to import/export only the RDN attribute from the memberof (or similar attribute, imported from LDAP, that is, only "admin" and not "cn=admin,ou=groups,dc=example,dc=com"?
```
If you are syncing from AD, you can use the cache-refresh custom interception script: you can iterate through the `memberOf` attributes, split the dn group on `,` and `cn=`... that should leave you with the admin by itself.