This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
getent not working on nss db passwd files:
- From: Tjernlund <tjernlund at tjernlund dot se>
- To: libc-help at sourceware dot org
- Date: Tue, 25 Aug 2015 20:43:56 +0200
- Subject: getent not working on nss db passwd files:
- Authentication-results: sourceware.org; auth=none
# > cd /var/db/
# > echo "clue:x:1005:987:added by portage for clue:/var/tmp:/sbin/nologin" | makedb -o passwd.db -
# > makedb -u passwd.db
clue:x:1005:987:added by portage for clue:/var/tmp/:/sbin/nologin
cat /etc/nsswitch.conf
# /etc/nsswitch.conf:
# $Header: /var/cvsroot/gentoo/src/patchsets/glibc/extra/etc/nsswitch.conf,v 1.1 2006/09/29 23:52:23 vapier Exp $
passwd: compat db
shadow: compat
group: compat
.....
# > getent passwd clue
< No output from getent >
# > strace getent passwd clue
.....
open("/var/db/passwd.db", O_RDONLY|O_CLOEXEC) = 3
read(3, "\1\6\21\335\1\0\0\0@\0\0\0\0\0\0\0,\0\0\0\0\0\0\0\200\0\0\0\0\0\0\0", 32) = 32
mmap(NULL, 128, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f6ed6f08000
close(3) = 0
munmap(0x7f6ed6f08000, 128) = 0
exit_group(2) = ?
+++ exited with 2 +++
I am doing something wrong or is it an bug?
Jocke
Version: glibc 2.20 on amd64