[Samba] Make domain users/groups available locally through Winbind

Daniele Dario d.dario76 at gmail.com
Mon May 12 02:49:45 MDT 2014


Hi list,
trying to add a new DC on my samba AD domain, I noticed that wbinfo
-u/-g was working properly but getent, id and so on commands no.

The new DC is samba 4.1.7 on Ubuntu 12.04 LTS x64.

After digging for a while (the other DC was working properly and the
difference was that was running on a 32 bit machine) I found that when
running `id` command with strace libnss_winbind.so.2 was not found.

Seems that (at least on Ubuntu 12.04 LTS server) that search path for
that lib is 

open("/lib/x86_64-linux-gnu/tls/x86_64/libnss_winbind.so.2", O_RDONLY|
O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/tls/x86_64", 0x7fff8d3e55f0) = -1 ENOENT (No
such file or directory)
open("/lib/x86_64-linux-gnu/tls/libnss_winbind.so.2", O_RDONLY|
O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/tls", 0x7fff8d3e55f0) = -1 ENOENT (No such
file or directory)
open("/lib/x86_64-linux-gnu/x86_64/libnss_winbind.so.2", O_RDONLY|
O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/x86_64", 0x7fff8d3e55f0) = -1 ENOENT (No
such file or directory)
open("/lib/x86_64-linux-gnu/libnss_winbind.so.2", O_RDONLY|O_CLOEXEC) =
-1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu", {st_mode=S_IFDIR|0755,
st_size=12288, ...}) = 0
open("/usr/lib/x86_64-linux-gnu/tls/x86_64/libnss_winbind.so.2",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/tls/x86_64", 0x7fff8d3e55f0) = -1 ENOENT
(No such file or directory)
open("/usr/lib/x86_64-linux-gnu/tls/libnss_winbind.so.2", O_RDONLY|
O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/tls", 0x7fff8d3e55f0) = -1 ENOENT (No
such file or directory)
open("/usr/lib/x86_64-linux-gnu/x86_64/libnss_winbind.so.2", O_RDONLY|
O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/x86_64", 0x7fff8d3e55f0) = -1 ENOENT (No
such file or directory)
open("/usr/lib/x86_64-linux-gnu/libnss_winbind.so.2", O_RDONLY|
O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu", {st_mode=S_IFDIR|0755,
st_size=20480, ...}) = 0
open("/lib/tls/x86_64/libnss_winbind.so.2", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
stat("/lib/tls/x86_64", 0x7fff8d3e55f0) = -1 ENOENT (No such file or
directory)
open("/lib/tls/libnss_winbind.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No
such file or directory)
stat("/lib/tls", 0x7fff8d3e55f0)        = -1 ENOENT (No such file or
directory)
open("/lib/x86_64/libnss_winbind.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT
(No such file or directory)
stat("/lib/x86_64", 0x7fff8d3e55f0)     = -1 ENOENT (No such file or
directory)
open("/lib/libnss_winbind.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No
such file or directory)
stat("/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/tls/x86_64/libnss_winbind.so.2", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
stat("/usr/lib/tls/x86_64", 0x7fff8d3e55f0) = -1 ENOENT (No such file or
directory)
open("/usr/lib/tls/libnss_winbind.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT
(No such file or directory)
stat("/usr/lib/tls", 0x7fff8d3e55f0)    = -1 ENOENT (No such file or
directory)
open("/usr/lib/x86_64/libnss_winbind.so.2", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
stat("/usr/lib/x86_64", 0x7fff8d3e55f0) = -1 ENOENT (No such file or
directory)
open("/usr/lib/libnss_winbind.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No
such file or directory)

So maybe updating the wiki page "Setup a Samba AD Member Server" at
"Make domain users/groups available locally through Winbind" would solve
the problem also for others.

# ln -s /usr/local/samba/lib/libnss_winbind.so /lib64
# ln -s /lib64/libnss_winbind.so /lib64/libnss_winbind.so.2

ADD ALSO
# ln
-s /lib64/libnss_winbind.so /lib/x86_64-linux-gnu/libnss_winbind.so.2

# ldconfig

Many thanks for the great job you guys are doing,
Daniele.



More information about the samba mailing list