Re: Question about map option
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
Re: Question about map option
- From: Bas van der Vlies <basv [at] sara.nl>
- To: <nss-pam-ldapd-users [at] lists.arthurdejong.org>
- Subject: Re: Question about map option
- Date: Fri, 15 Jul 2011 12:04:20 +0200
On 07-07-11 19:51, Arthur de Jong wrote:
On Tue, 2011-07-05 at 11:38 +0200, Bas van der Vlies wrote:
But what i really want is only for some users/groups to override the
homedirectory setting. Is this possible?
You could use something like:
map passwd homeDirectory "${homeDirectory:-/home_fs8/$uid}"
to use the homeDirectory attribute by default and only use the uid-based
one if it is absent. You could also do:
map passwd homeDirectory "${someatt:+/home_fs8/$uid}"
to use the mapping when someatt is present (and leave it blank
otherwise). You should be able to nest ${..:-..} and ${..:+..} to form
complex expressions.
Hope this helps. If you need a more powerful expression syntax, patches
that implement more features from the POSIX shell syntax (or similar)
are welcome.
Thanks for the answer,
I solved it by using automount maps in LDAP in stead of file. The
question was a bit short but here is a brief explanation. All our users
are in LDAP and have /home/$uid as home direcory.
No one one cluster we have 3 home file servers. For one file server the
mount options are different. So we wanted to create an separate automount
map that is triggered via /home_fs8.
This trigger is only for certain users that all belong to a group. That is
why i asked if it is possible to only rewrite the homeDirectory for certain
groups or users.
The solution would be to create an LDAP attribute for these users and if it
is not present use /home/$uid.
--
********************************************************************
* Bas van der Vlies e-mail: basv@sara.nl *
* SARA - Academic Computing Services Amsterdam, The Netherlands *
********************************************************************
--
To unsubscribe send an email to
nss-pam-ldapd-users-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-users