Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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.

share|improve this answer
    
thanks, I'll think about first option. Maybe with a softlink from gid to groupname. –  Zhen Aug 2 '12 at 7:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.