2

I need to specify a different path to home directories on a particular server than different from LDAP one. I know ho to change using map in /etc/nslcd.conf:

map passwd homeDirectory "/otherhome/$uid"

But I want something like "/otherhome/$group/$uid" instead but it doesn't understand $gid nor $group variables.

What's the variable I should use to set group name in the path of new home directory?

I'm using openldap and Scientific Linux 6.2

xiaq
  • 496
Zhen
  • 903

1 Answers1

2

According to nslcd.conf(5) the $var syntax in map refers to the LDAP attribute name. Be noted that if you are setting OpenLDAP with the standard NIS schema the LDAP tree doesn't store the name of the user's primary group but rather the gidNumber.

You can either

  • use standard (NIS schema) $gidNumber, ie.

    map passwd homeDirectory "/otherhome/$gidNumber/$uid"

  • add group attributes for users to store the name of their primary groups. You may have to create your custom schema file to achieve this.

xiaq
  • 496