Samba Locating the libnss_winbind.so.2 Library - nsswitch setup











up vote
0
down vote

favorite












Ubuntu server 18.04 - Samba installed and configured (almost)



Kerberos functioning. wbinfo --ping-dc successfully contacts domain server



Browse server from windows client sees printer share



The problem is that getenv does not return any domain users or groups. From much research this seems to be because nsswitch is not setup for Samba.



The Libnss winbind Links Wiki says to do this:



# smbd -b | grep LIBDIR
LIBDIR: /usr/local/samba/lib/
# ln -s /usr/local/samba/lib/libnss_winbind.so.2 /lib/x86_64-linux-gnu/
# ln -s /lib/x86_64-linux-gnu/libnss_winbind.so.2 /lib/x86_64-linux-gnu/libnss_winbind.so
# ldconfig


Although as seen below there doesn't seem to be a LIBDIR entry, it seemed as if it might be /usr/lib/x86_64-linux-gnu/samba so I ran the above ln commands with this in mind. It didn't work. I also appended files windbind to the 2 entries in nsswitch.conf.



smdb... doesn't work but samba -b does work:



~$ samba -b
Samba version: 4.7.6-Ubuntu
Build environment:
Paths:

BINDIR: /usr/bin
SBINDIR: /usr/sbin
CONFIGFILE: /etc/samba/smb.conf
NCALRPCDIR: /var/run/samba/ncalrpc
LOGFILEBASE: /var/log/samba
LMHOSTSFILE: /etc/samba/lmhosts
DATADIR: /usr/share
MODULESDIR: /usr/lib/x86_64-linux-gnu/samba
LOCKDIR: /var/run/samba
STATEDIR: /var/lib/samba
CACHEDIR: /var/cache/samba
PIDDIR: /var/run/samba
PRIVATE_DIR: /var/lib/samba/private
CODEPAGEDIR: /usr/share/samba/codepages
SETUPDIR: /usr/share/samba/setup
WINBINDD_SOCKET_DIR: /var/run/samba/winbindd
NTP_SIGND_SOCKET_DIR: /var/lib/samba/ntp_signd


It doesn't seem there is a LIBDIR. Not sure what to do about that. The folder /usr/local/samba/lib does not exist.



~$ locate libnss_winbind
/lib/x86_64-linux-gnu/libnss_winbind.so.2


Samba config:



[global]
dns forwarder = my.DNS.ip.address
dns proxy = No
log file = /var/log/samba/log.%m
logging = syslog@1 /var/log/samba/log.%m
map to guest = Bad User
max log size = 1000
panic action = /usr/share/samba/panic-action %d
realm = DOMAIN.COM
security = ADS
server role = member server
server string = %h server (Samba, Ubuntu)
template shell = /bin/bash
usershare allow guests = Yes
winbind enum groups = Yes
winbind enum users = Yes
winbind nss info = rfc2307
winbind use default domain = Yes
workgroup = DOMAIN
idmap config DOMAIN : range = 50000-1000000
idmap config DOMAIN : backend = ad
idmap config * : range = 3000-7999
idmap config * : backend = tbd
map acl inherit = Yes
store dos attributes = Yes
vfs objects = acl_xattr

[printers]
browseable = No
comment = All Printers
create mask = 0700
path = /var/spool/samba
printable = Yes


[print$]
comment = Printer Drivers
path = /var/lib/samba/printers










share|improve this question









New contributor




Little Mitch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
























    up vote
    0
    down vote

    favorite












    Ubuntu server 18.04 - Samba installed and configured (almost)



    Kerberos functioning. wbinfo --ping-dc successfully contacts domain server



    Browse server from windows client sees printer share



    The problem is that getenv does not return any domain users or groups. From much research this seems to be because nsswitch is not setup for Samba.



    The Libnss winbind Links Wiki says to do this:



    # smbd -b | grep LIBDIR
    LIBDIR: /usr/local/samba/lib/
    # ln -s /usr/local/samba/lib/libnss_winbind.so.2 /lib/x86_64-linux-gnu/
    # ln -s /lib/x86_64-linux-gnu/libnss_winbind.so.2 /lib/x86_64-linux-gnu/libnss_winbind.so
    # ldconfig


    Although as seen below there doesn't seem to be a LIBDIR entry, it seemed as if it might be /usr/lib/x86_64-linux-gnu/samba so I ran the above ln commands with this in mind. It didn't work. I also appended files windbind to the 2 entries in nsswitch.conf.



    smdb... doesn't work but samba -b does work:



    ~$ samba -b
    Samba version: 4.7.6-Ubuntu
    Build environment:
    Paths:

    BINDIR: /usr/bin
    SBINDIR: /usr/sbin
    CONFIGFILE: /etc/samba/smb.conf
    NCALRPCDIR: /var/run/samba/ncalrpc
    LOGFILEBASE: /var/log/samba
    LMHOSTSFILE: /etc/samba/lmhosts
    DATADIR: /usr/share
    MODULESDIR: /usr/lib/x86_64-linux-gnu/samba
    LOCKDIR: /var/run/samba
    STATEDIR: /var/lib/samba
    CACHEDIR: /var/cache/samba
    PIDDIR: /var/run/samba
    PRIVATE_DIR: /var/lib/samba/private
    CODEPAGEDIR: /usr/share/samba/codepages
    SETUPDIR: /usr/share/samba/setup
    WINBINDD_SOCKET_DIR: /var/run/samba/winbindd
    NTP_SIGND_SOCKET_DIR: /var/lib/samba/ntp_signd


    It doesn't seem there is a LIBDIR. Not sure what to do about that. The folder /usr/local/samba/lib does not exist.



    ~$ locate libnss_winbind
    /lib/x86_64-linux-gnu/libnss_winbind.so.2


    Samba config:



    [global]
    dns forwarder = my.DNS.ip.address
    dns proxy = No
    log file = /var/log/samba/log.%m
    logging = syslog@1 /var/log/samba/log.%m
    map to guest = Bad User
    max log size = 1000
    panic action = /usr/share/samba/panic-action %d
    realm = DOMAIN.COM
    security = ADS
    server role = member server
    server string = %h server (Samba, Ubuntu)
    template shell = /bin/bash
    usershare allow guests = Yes
    winbind enum groups = Yes
    winbind enum users = Yes
    winbind nss info = rfc2307
    winbind use default domain = Yes
    workgroup = DOMAIN
    idmap config DOMAIN : range = 50000-1000000
    idmap config DOMAIN : backend = ad
    idmap config * : range = 3000-7999
    idmap config * : backend = tbd
    map acl inherit = Yes
    store dos attributes = Yes
    vfs objects = acl_xattr

    [printers]
    browseable = No
    comment = All Printers
    create mask = 0700
    path = /var/spool/samba
    printable = Yes


    [print$]
    comment = Printer Drivers
    path = /var/lib/samba/printers










    share|improve this question









    New contributor




    Little Mitch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      Ubuntu server 18.04 - Samba installed and configured (almost)



      Kerberos functioning. wbinfo --ping-dc successfully contacts domain server



      Browse server from windows client sees printer share



      The problem is that getenv does not return any domain users or groups. From much research this seems to be because nsswitch is not setup for Samba.



      The Libnss winbind Links Wiki says to do this:



      # smbd -b | grep LIBDIR
      LIBDIR: /usr/local/samba/lib/
      # ln -s /usr/local/samba/lib/libnss_winbind.so.2 /lib/x86_64-linux-gnu/
      # ln -s /lib/x86_64-linux-gnu/libnss_winbind.so.2 /lib/x86_64-linux-gnu/libnss_winbind.so
      # ldconfig


      Although as seen below there doesn't seem to be a LIBDIR entry, it seemed as if it might be /usr/lib/x86_64-linux-gnu/samba so I ran the above ln commands with this in mind. It didn't work. I also appended files windbind to the 2 entries in nsswitch.conf.



      smdb... doesn't work but samba -b does work:



      ~$ samba -b
      Samba version: 4.7.6-Ubuntu
      Build environment:
      Paths:

      BINDIR: /usr/bin
      SBINDIR: /usr/sbin
      CONFIGFILE: /etc/samba/smb.conf
      NCALRPCDIR: /var/run/samba/ncalrpc
      LOGFILEBASE: /var/log/samba
      LMHOSTSFILE: /etc/samba/lmhosts
      DATADIR: /usr/share
      MODULESDIR: /usr/lib/x86_64-linux-gnu/samba
      LOCKDIR: /var/run/samba
      STATEDIR: /var/lib/samba
      CACHEDIR: /var/cache/samba
      PIDDIR: /var/run/samba
      PRIVATE_DIR: /var/lib/samba/private
      CODEPAGEDIR: /usr/share/samba/codepages
      SETUPDIR: /usr/share/samba/setup
      WINBINDD_SOCKET_DIR: /var/run/samba/winbindd
      NTP_SIGND_SOCKET_DIR: /var/lib/samba/ntp_signd


      It doesn't seem there is a LIBDIR. Not sure what to do about that. The folder /usr/local/samba/lib does not exist.



      ~$ locate libnss_winbind
      /lib/x86_64-linux-gnu/libnss_winbind.so.2


      Samba config:



      [global]
      dns forwarder = my.DNS.ip.address
      dns proxy = No
      log file = /var/log/samba/log.%m
      logging = syslog@1 /var/log/samba/log.%m
      map to guest = Bad User
      max log size = 1000
      panic action = /usr/share/samba/panic-action %d
      realm = DOMAIN.COM
      security = ADS
      server role = member server
      server string = %h server (Samba, Ubuntu)
      template shell = /bin/bash
      usershare allow guests = Yes
      winbind enum groups = Yes
      winbind enum users = Yes
      winbind nss info = rfc2307
      winbind use default domain = Yes
      workgroup = DOMAIN
      idmap config DOMAIN : range = 50000-1000000
      idmap config DOMAIN : backend = ad
      idmap config * : range = 3000-7999
      idmap config * : backend = tbd
      map acl inherit = Yes
      store dos attributes = Yes
      vfs objects = acl_xattr

      [printers]
      browseable = No
      comment = All Printers
      create mask = 0700
      path = /var/spool/samba
      printable = Yes


      [print$]
      comment = Printer Drivers
      path = /var/lib/samba/printers










      share|improve this question









      New contributor




      Little Mitch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      Ubuntu server 18.04 - Samba installed and configured (almost)



      Kerberos functioning. wbinfo --ping-dc successfully contacts domain server



      Browse server from windows client sees printer share



      The problem is that getenv does not return any domain users or groups. From much research this seems to be because nsswitch is not setup for Samba.



      The Libnss winbind Links Wiki says to do this:



      # smbd -b | grep LIBDIR
      LIBDIR: /usr/local/samba/lib/
      # ln -s /usr/local/samba/lib/libnss_winbind.so.2 /lib/x86_64-linux-gnu/
      # ln -s /lib/x86_64-linux-gnu/libnss_winbind.so.2 /lib/x86_64-linux-gnu/libnss_winbind.so
      # ldconfig


      Although as seen below there doesn't seem to be a LIBDIR entry, it seemed as if it might be /usr/lib/x86_64-linux-gnu/samba so I ran the above ln commands with this in mind. It didn't work. I also appended files windbind to the 2 entries in nsswitch.conf.



      smdb... doesn't work but samba -b does work:



      ~$ samba -b
      Samba version: 4.7.6-Ubuntu
      Build environment:
      Paths:

      BINDIR: /usr/bin
      SBINDIR: /usr/sbin
      CONFIGFILE: /etc/samba/smb.conf
      NCALRPCDIR: /var/run/samba/ncalrpc
      LOGFILEBASE: /var/log/samba
      LMHOSTSFILE: /etc/samba/lmhosts
      DATADIR: /usr/share
      MODULESDIR: /usr/lib/x86_64-linux-gnu/samba
      LOCKDIR: /var/run/samba
      STATEDIR: /var/lib/samba
      CACHEDIR: /var/cache/samba
      PIDDIR: /var/run/samba
      PRIVATE_DIR: /var/lib/samba/private
      CODEPAGEDIR: /usr/share/samba/codepages
      SETUPDIR: /usr/share/samba/setup
      WINBINDD_SOCKET_DIR: /var/run/samba/winbindd
      NTP_SIGND_SOCKET_DIR: /var/lib/samba/ntp_signd


      It doesn't seem there is a LIBDIR. Not sure what to do about that. The folder /usr/local/samba/lib does not exist.



      ~$ locate libnss_winbind
      /lib/x86_64-linux-gnu/libnss_winbind.so.2


      Samba config:



      [global]
      dns forwarder = my.DNS.ip.address
      dns proxy = No
      log file = /var/log/samba/log.%m
      logging = syslog@1 /var/log/samba/log.%m
      map to guest = Bad User
      max log size = 1000
      panic action = /usr/share/samba/panic-action %d
      realm = DOMAIN.COM
      security = ADS
      server role = member server
      server string = %h server (Samba, Ubuntu)
      template shell = /bin/bash
      usershare allow guests = Yes
      winbind enum groups = Yes
      winbind enum users = Yes
      winbind nss info = rfc2307
      winbind use default domain = Yes
      workgroup = DOMAIN
      idmap config DOMAIN : range = 50000-1000000
      idmap config DOMAIN : backend = ad
      idmap config * : range = 3000-7999
      idmap config * : backend = tbd
      map acl inherit = Yes
      store dos attributes = Yes
      vfs objects = acl_xattr

      [printers]
      browseable = No
      comment = All Printers
      create mask = 0700
      path = /var/spool/samba
      printable = Yes


      [print$]
      comment = Printer Drivers
      path = /var/lib/samba/printers







      18.04 samba






      share|improve this question









      New contributor




      Little Mitch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      Little Mitch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited Nov 16 at 0:08





















      New contributor




      Little Mitch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked Nov 15 at 17:59









      Little Mitch

      63




      63




      New contributor




      Little Mitch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Little Mitch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Little Mitch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.



























          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          Little Mitch is a new contributor. Be nice, and check out our Code of Conduct.










           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1093249%2fsamba-locating-the-libnss-winbind-so-2-library-nsswitch-setup%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Little Mitch is a new contributor. Be nice, and check out our Code of Conduct.










           

          draft saved


          draft discarded


















          Little Mitch is a new contributor. Be nice, and check out our Code of Conduct.













          Little Mitch is a new contributor. Be nice, and check out our Code of Conduct.












          Little Mitch is a new contributor. Be nice, and check out our Code of Conduct.















           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1093249%2fsamba-locating-the-libnss-winbind-so-2-library-nsswitch-setup%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Mont Emei

          Province de Neuquén

          Journaliste