This is the mail archive of the glibc-bugs@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nscd/489] New: nscd problem with multiple passwd databases


nscd's behavior is inconsistent when there are multiple passwd databases defined
in /etc/nsswitch.conf and the 2 database have different data for the same UID.

Consider the following:
/etc/nsswitch.conf contains:
    passwd:      compat ldap

the compat database (/etc/passwd) contains:
testuser:x:54366:54366:Fred Smith:/home/u54366:/bin/bash

the ldap passwd database contains:
u54366:x:54366:54366:Fred Smith:/home/u54366:/bin/bash


The behavior without nscd (correct):
# getent passwd 54366
testuser:x:54366:54366:Fred Smith:/home/u54366:/bin/bash
# su - u54366
$ exit
logout
# getent passwd 54366
testuser:x:54366:54366:Fred Smith:/home/u54366:/bin/bash

The behavior with nscd running (incorrect):
# getent passwd 54366
testuser:x:54366:54366:Fred Smith:/home/u54366:/bin/bash
# su - u54366
$ exit
logout
# getent passwd 54366
u54366:x:54366:54366:Fred Smith:/home/u54366:/bin/bash


When nscd is running, doing a "su" to a user causes nscd to cache the mapping of
their uid to userid, even though there is a different userid associated with
that uid in /etc/passwd.  Because "compat" is listed first in
/etc/nsswitch.conf, I expect the /etc/passwd entry to take precidence.

-- 
           Summary: nscd problem with multiple passwd databases
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nscd
        AssignedTo: drepper at redhat dot com
        ReportedBy: mhaverkamp at kcp dot com
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: i686-pc-linux-gnulibc2
  GCC host triplet: i686-pc-linux-gnulibc2
GCC target triplet: i686-pc-linux-gnulibc2


http://sources.redhat.com/bugzilla/show_bug.cgi?id=489

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]