lists.arthurdejong.org
RSS feed

Re: [nssldap] overwriting LDAP values locally

[Date Prev][Date Next] [Thread Prev][Thread Next]

Re: [nssldap] overwriting LDAP values locally



On Mittwoch, 2. April 2008, Defryn, Guy wrote:
> Hi guys,
>
> This might not be a question for this list but am trying my luck
> anyway.
>
> Our Linux boxes using LDAP/ AD authentication. This works fine and
> all as expected. Now I came across the need to modify one of those
> values locally, I need to change the home directory. I can't change
> the value in ldap as it would break on and other
>
> I tried the following, I added to /etc/passwd
>
> +userA:::::/home/u/userA
> +userB:::::/home/u/userB
>
> And in /etc/nsswitch.conf
>
> passwd: compat
> passwd_compat: ldap
>
> I have to have those home directories set for SSH logins to work.
> When I changed  it as explained above userA and userB get in fine.
> The problem is now that I get a permission denied for userC. Unlike
> userA and userB, userC has the correct home directory in LDAP .
>
> So fixing one thing breaks something else. In short how can I
> maintain LDAP functionality and overwrite certain values in
> /etc/passwd
IIRC you need to add a single line with:
+::::::
at the end of /etc/passwd. Probably only the '+' is enough.

-- 
regards,
        Ralf Haferkamp