Включить gid в карту домашнего каталога с помощью nslcd

1670
Zhen

Мне нужно указать путь к домашним каталогам на конкретном сервере, отличный от LDAP. Я знаю, как изменить, используя карту в /etc/nslcd.conf:

map passwd homeDirectory "/otherhome/$uid" 

Но я хочу что-то вроде "/otherhome/$group/$uid"этого, но не понимаю $gidни $groupпеременных.

Какую переменную я должен использовать, чтобы задать имя группы в пути к новому домашнему каталогу?

Я использую openldap и Scientific Linux 6.2

1

1 ответ на вопрос

1
xiaq

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.

спасибо, подумаю о первом варианте. Может быть, с мягкой ссылкой от GID на имя группы. Zhen 11 лет назад 0

Похожие вопросы