Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 890421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:43:48+00:00 2026-05-15T13:43:48+00:00

Attempting to set up Samba + OpenLDAP using nss_ldap. After joining Windows7 to Samba

  • 0

Attempting to set up Samba + OpenLDAP using nss_ldap.

After joining Windows7 to Samba stand alone PDC, I can not login with a domain account unless that account is also added to the /etc/passwd file.

I get: user in passdb, but getpwnam() fails!

Everything I’ve read points to an NSS_LDAP issue yet, getent passwd shows users perfectly fine and I am able to ssh into the same Linux host using a user account that is only in the LDAP database.

Additionally, if I crack open the /etc/passwd file and add a line for the user in question, I can then login.

I’m not using PAM. I added the two Windows7 registry updates required per the Samba.org site.

Software stack is as follows:
Samba 3.5.3
OpenLDAP 2.4.21
nss_ldap 264

Thoughts/suggestions?

——————————— UPDATE ———————————

Getting closer! My nsswitch.conf did have files ldap so I reversed the order (now ldap files) and something odd happen. Notice, before, I said I could login with SSH and getent passwd dumped users in both ldap and files. After making the nsswitch.conf change, ldap before files, simple commands like ls took a long time. Additionally I observed nss_ldap errors as follows:

ls: nss_ldap: could not search LDAP server – Server is unavailable

and

ls: nss_ldap: failed to bind to LDAP server ldap://tsrvr.example.corp: Invalid credentials

I commented out the rootbinddn line in ldap.conf and these errors went away and getent passwd immediately began working again. The order of the output changed also: ldap entries listed before files entries.

Still, though, my Windows7 client will not login to the domain and I continue to get the same Samba error message

User test in passdb, but getpwnam() fails!

In my smb.conf, I tried removing ldapsam:trusted = yes line and when I do, I get domain authentication errors.

I’m not using SSL/TLS with OpenLDAP and I have the SSL = no setting. I also have the ldap.secret file set. I’m running slapd under the root account. My rootbinddn, before commenting out, referenced an LDAP root user of uid=root,ou=Users,dc=example,dc=corp. root’s userPassword using CRYPT matches the bindpw as well as the one in /etc/shadow.

Looking at LDAP log activity for when I get the Samba error, it appears as if LDAP is returning the correct result against a Samba query:

Jun 19 14:20:14 tsrvr slapd[3803]: conn=1025 op=15 SRCH base=”dc=example,dc=corp” scope=2 deref=0 filter=”(&(uid=test)(objectClass=sambaSamAccount))”
Jun 19 14:20:14 tsrvr slapd[3803]: conn=1025 op=15 SRCH attr=uid uidNumber gidNumber homeDirectory sambaPwdLastSet sambaPwdCanChange sambaPwdMustChange sambaLogonTime sambaLogoffTime
sambaKickoffTime cn sn displayName sambaHomeDrive sambaHomePath sambaLogonScript sambaProfilePath description sambaUserWorkstations sambaSID sambaPrimaryGroupSID sambaLMPassword sam
baNTPassword sambaDomainName objectClass sambaAcctFlags sambaMungedDial sambaBadPasswordCount sambaBadPasswordTime sambaPasswordHistory modifyTimestamp sambaLogonHours modifyTimestam
p uidNumber gidNumber homeDirectory loginShell gecos
Jun 19 14:20:14 tsrvr slapd[3803]: conn=1025 op=15 SEARCH RESULT tag=101 err=0 nentries=1 text=

Any other suggestions?

Much appreciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T13:43:49+00:00Added an answer on May 15, 2026 at 1:43 pm

    Sounds like a problem with /etc/nsswitch.conf. Specifically, the passwd and group lines should refer to ldap before compat or file. Have you looked at this Samba wiki entry?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Attempting to set up an automated texting service for customers, where people can text
I am attempting to set up my own project using a third party library
I'm attempting to set up a simple Mac-based 2D tiling engine, using a 2D
I am attempting to set a revprop using svnadmin setrevprop /path/to/repos propname propfile -r
I am attempting to set up a simple Morse encoder using a hashmap in
I'm attempting to set a property on an object using reflection. The property is
I'm attempting to set up a symbol proxy using symproxy.dll from Debugging Tools for
I'm attempting to set up a low-level keyboard hook using P/Invoke in an F#
I'm attempting to set up a windows-based FTP server using Apache FTPServer, however I
I am attempting to set a value in a textarea field using jquery with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.