musl-nscd package: nsswitch.conf not working with Samba 4 winbind nss entries
I added winbind nss config lines to /etc/nsswitch.conf as follows
hosts: files dns passwd: files winbind group: files winbind
When having only the first line the service starts OK.
When trying to start nscd daemon with added two nss lines it fails with this error:
nscd: libnss_files.so: Error loading shared library libnss_files.so: No such file or directory
Tried to examine with
strace nscd
execve("/usr/sbin/nscd", ["nscd"], 0x7ffc879baa50 /* 11 vars */) = 0
arch_prctl(ARCH_SET_FS, 0x7fe061f6bd48) = 0
set_tid_address(0x7fe061f6c31c) = 10783
mprotect(0x7fe061f68000, 4096, PROT_READ) = 0
mprotect(0x55e07d209000, 4096, PROT_READ) = 0
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[], sa_flags=SA_RESTORER|SA_R ESTART, sa_restorer=0x7fe061f1c27d}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0 }, 8) = 0
open("/etc/nsswitch.conf", O_RDONLY) = 3
brk(NULL) = 0x55e07d341000
brk(0x55e07d346000) = 0x55e07d346000
ioctl(3, TIOCGWINSZ, 0x7ffe68553958) = -1 ENOTTY (Not a tty)
readv(3, [{iov_base="hosts: files dns\npasswd: files w"..., iov_len=8191}, {iov_ base="", iov_len=1024}], 2) = 61
readv(3, [{iov_base="", iov_len=8130}, {iov_base="", iov_len=1024}], 2) = 0
ioctl(3, TIOCGWINSZ, 0x7ffe68553958) = -1 ENOTTY (Not a tty)
open("/etc/ld-musl-x86_64.path", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file o r directory)
open("/lib/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No suc h file or directory)
open("/usr/lib/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libnss_files.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or di rectory)
open("/usr/local/lib/libnss_files.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libnss_files.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file o r directory)
writev(2, [{iov_base="nscd: ", iov_len=6}, {iov_base=NULL, iov_len=0}], 2nscd: ) = 6
writev(2, [{iov_base="libnss_files.so: ", iov_len=17}, {iov_base="Error loading shared library lib"..., iov_len=71}], 2libnss_files.so: Error loading shared lib rary libnss_files.so: No such file or directory) = 88
writev(2, [{iov_base="", iov_len=0}, {iov_base=NULL, iov_len=0}], 2) = 0
writev(2, [{iov_base="", iov_len=0}, {iov_base="\n", iov_len=1}], 2
) = 1
exit_group(1) = ?
+++ exited with 1 +++
Alpinelinux Samba 4 is not functional as a fileserver with Windows ACL without NSS support, so it is practically useless... I hope that musl-nscd is an workaround to have functional NSS for samba winbind. Thanks!