Skip to main content

Questions tagged [nsswitch]

Name Service Switch, an modular interface built in to the GNU C library that handles data retrieval from system databases, e.g., password, group, etc.

Filter by
Sorted by
Tagged with
1 vote
1 answer
310 views

Fedora 38: need persistent changes in nsswitch.conf

I've got Fedora 38 KDE Spin. To access corporate VPN resources in .local zone I need to make queries to the DNS server after establishing connection. Default nsswitch.conf hosts section looks like ...
PocketSam's user avatar
  • 113
2 votes
1 answer
18k views

How do I permanently configure the DNS resolution in Ubuntu for ALL programs/layers for specific interfaces

Is there a way I can permanently set the DNS preference of my Ubuntu laptop for specific network interfaces? I am relying on a wifi network that is not that predictable. I don't have access to the ...
TPPZ's user avatar
  • 557
0 votes
2 answers
300 views

Difference between *LK* in /etc/shadow and /usr/sbin/nologon in /etc/passwd

What is the practical difference between setting *LK* in /etc/shadow and setting /usr/sbin/nologon in /etc/passwd? When would we choose one over the other? When would we combine them?
Lyubomir's user avatar
  • 113
1 vote
1 answer
985 views

Difference between nsswitch, nslcd and sssd?

I'm trying to configure sssd instead of nslcd for my Rhel system, and then I came across nsswitch. What's the difference between these three?
N. J's user avatar
  • 167
1 vote
1 answer
4k views

'getent passwd' not showing LDAP users, athough users can log in

I have an administration node running LDAP and a login node which uses LDAP on the other node to authorize users. Users are able to log into the login node successfully. When I run getent passwd, on ...
loris's user avatar
  • 195
0 votes
1 answer
499 views

Can't ping server that resolves using avahi-resolve

I have a server I've discovered from a Manjaro client using avahi named unaha-closp. However, when I ping it I get: ping: unaha-closp.local: Name or service not known In /etc/nsswitch.conf my hosts ...
Nate's user avatar
  • 154
1 vote
2 answers
2k views

avahi-resolve works but mdns

I have an updated Debian 11 (bullseye) setup and want to use avahi to connect to locally connected computers. avahi works, for example: avahi-resolve -n4 prag11mono.local gives prag11mono.local 10.0....
user855443's user avatar
0 votes
1 answer
68 views

When was NSS (Name Service Switch) introduced in Solaris?

I was not able to find a date or a Solaris release number... Also, beside Ultrix's svc.conf system (mentionned in NSS's Wikipedia article), did other comparable systems exist in other Unices, before ...
Eusebius's user avatar
  • 184
1 vote
0 answers
126 views

How to configure /etc/pam.d/sshd and nsswitch.conf in order to avoid all remote calls for ssh with local user?

I have created an NSS and a PAM module in order to authenticate and get users and groups from a custom remote server. In order to get them used by the system I am adding a line in /etc/pam.d/sshd: ...
sotiris's user avatar
  • 111
1 vote
0 answers
340 views

Fully replace sssd->ldap with web APIs in Linux

My organization has to get rid of their ldap servers, so I am facing the task of replacing it's functionality. To make this as customizable and future-proof as I can, I am looking for something that ...
Redjard's user avatar
  • 11
1 vote
0 answers
810 views

List of Users - RHEL

I want to get list of users - both human and machine who have access to the unix server. OS is: NAME="Red Hat Enterprise Linux Server" VERSION="7.9 (Maipo)" I tried cat /etc/...
Abhishek Jain's user avatar
3 votes
2 answers
281 views

Why does getent default to .station if no TLD is specified?

With my current setup, I have a dnsmasq instance operating on my home server (Void Linux) and 3 GNU/Linux devices that use it as default dns (1 Manjaro, 1 Arch, 1 Linux Mint 20.1). Due to seemingly ...
Mek101's user avatar
  • 43
0 votes
2 answers
576 views

Authentication precedence

In nsswitch.conf file I have an entry "passwd files sss". Also I have the evidence that the server is having LDAP authentication. Since the "files" for passwd is enabled and it ...
Godwin's user avatar
  • 1
0 votes
2 answers
501 views

Solaris 11 and samba4 in non-standard dir, works all except finger

The Oracle packaged version of samba gave me some problems(error with krb5 and no join with AD samba4 server). So I recompile by myself using IPS the latest version of samba(4.3.13). After 30 minutes ...
elbarna's user avatar
  • 12.8k
0 votes
1 answer
2k views

In the /etc/nsswitch.conf file what is db and how do I edit the db?

My nsswitch file contains the following hosts: files dns networks: files protocols: db files services: db files ethers: db files rpc: db files What is ...
Subtubes's user avatar
  • 133
0 votes
1 answer
616 views

pam_ldap: how to hide password hashes in getent output

My question is similar to this. I use pam_ldap for users auth. /etc/nsswitch.conf file contains: passwd: files ldap group: files ldap shadow: files ldap All seems to be OK, ...
Yurij Goncharuk's user avatar
3 votes
0 answers
362 views

What is the publickey for in nsswitch.conf

As I understand it the getent tool is used to query the Name Service Switch. In the getent man file all the different entries (plus a few more) from nsswitch.conf is listed, except the publickey one. ...
lash's user avatar
  • 729
0 votes
1 answer
868 views

Change authentication order GNU/Linux

I've got a CentOS7 server joined to a Windows Active Directory Server. I'm trying to connect to CentOS using my Active Directory credentials but it seems that it checks the local account as first step ...
carlo.zermo's user avatar
7 votes
2 answers
2k views

What is the purpose of extrausers?

Can someone explain the purpose, and benefits, of having an additional and separate extrausers user database in certain Linux systems (such as in Debian or in Ubuntu Core)? Why is not the standard /...
Ess's user avatar
  • 71
1 vote
1 answer
2k views

Authenticate Linux<->LDAP Protocol<->AD(active directory): Fail to logon with password

I spent much time on this and even successfully verified (Auth)Linux-LDAP-openLDAP ok. But get blocked with AD.  I can now switch to user from root account but can not log on with password (pam_unix(...
Ricky Ru's user avatar
1 vote
1 answer
5k views

How nsswitch call sssd for credential?

I'm stuck with Kerberos - sssd - AD. I've tried a lot of things, with lot of googling, in LinuxMint, Ubuntu 16.04 and Debian 9. I have always the same result : kinit username works fine msktutil -u --...
JL M's user avatar
  • 113
0 votes
3 answers
4k views

find user name through full name / gecos field?

Given a system where the user data comes from e.g. an OpenLDAP database and is not in the /etc/passwd file. Is it possible to search through the getent passwd database and look up the user id/name by ...
stefan0xC's user avatar
  • 1,548
1 vote
0 answers
61 views

Resolve a hostname and know where the answer came from?

As part of auditing a RANCID server, I would like to be able to figure out whether it's resolving a particular hostname via /etc/hosts, DNS or some other source. Is there a generic (without me ...
AnotherHowie's user avatar
3 votes
1 answer
406 views

Determine which name service created entry in database (eg passwd)?

On Linux and Unix-like systems the Name Service Switch is used to gather entries for the systems name databases. There are databases such as files, dns, nis and ldap. Is it possible to determine for ...
jdwolf's user avatar
  • 5,057
3 votes
1 answer
3k views

Creating Unix local groups for AD users

I am implementing LDAP authentication against Samba 4 AD for admins login to our Linux servers. I successfully configured PAM with libpam-ldapd and libnss_ldapd with auto creation of the home ...
Max's user avatar
  • 335
1 vote
1 answer
922 views

How to update nsswitch to use the second DNS server too if there is an NXDOMAIN?

The resolv.conf looks like this: machine:~ # cat /etc/resolv.conf search foo.bar nameserver DNSSERVERIP1 nameserver DNSSERVERIP2 machine:~ # The first DNSSERVERIP1 doesn't know about the ...
Peter's user avatar
  • 521
2 votes
0 answers
1k views

Linux bonding failover issue between two cisco switch

I have above scenario where server has bond0 interface connected to SW1 and SW2 relevant interface of server, last night somehow SW1 got rebooted and server lost eth0 connectivity but it didn't ...
Satish's user avatar
  • 1,652
0 votes
1 answer
260 views

winbind using wrong netbios service code in queries

For the past day, I have been trying unsuccessfully to let my Ubuntu VM be able to resolve NetBIOS names on the local network, to find some non-computer devices (Printers, special barcode machines, ...
Waleed Hamra's user avatar
3 votes
0 answers
1k views

getent hosts not using DNS

I'm using Ubuntu workstation (14.04), using OpenLDAP for authentication. The /etc/nsswitch.conf files on these look like this so that to get a host it should try files, then LDAP and then go on to ...
TerryS's user avatar
  • 31
4 votes
0 answers
2k views

How to add all netgroup members to a group

I have multiple virtualized servers, all configured to use LDAP for their passwd/shadow (in nsswitch.conf) and authentication (PAM). I would like to have an easily configurable set of users who will ...
Wolf480pl's user avatar
  • 173
0 votes
1 answer
51 views

Where to get information on built-in NSS services?

Where can I get detailed information (including file format, database format) on built-in NSS services such as db, files?
Anton Leontiev's user avatar
3 votes
1 answer
2k views

Get sudoers through LDAP (SUSE Linux Enterprise Server 12)

I have a problem with my LDAP configuration on SUSE Linux Enterprise Server 12. As many of you know, the ldap.conf file has been replaced with sssd.conf and a couple of other conf files like nsswitch....
Meerkat's user avatar
  • 211
2 votes
1 answer
2k views

Login not chdir()ing to correct home directory (AD/realmd/sssd)

I'm forced (ugh) to join several linux machines to a domain. I'm currently using debian stable, and am joining the machines using a join script I wrote (at https://rbmj.github.io/join.sh for ...
Robert Mason's user avatar
3 votes
1 answer
2k views

Wins nss host name resolution not working

I'm trying to get wins name resolution working. I thought I understood the required step, but I can't get it to work. The box is running SLES 12 SP1. This is what I've done: Added a wins server to /...
Gary van der Merwe's user avatar
4 votes
0 answers
2k views

Linux Authentication Flow (NSS -> PAM -> AD)

I am a new system administrator at an organization looking to understand the process flow of authentication in regards to how NSS, PAM and WINBIND work together. We've been having winbind related ...
azurepancake's user avatar
0 votes
0 answers
716 views

Doesn't these program respect nsswitch?

I've set up LDAP and nsswitch on ubuntu and to some extent it seem to work. For example getent passwd lists accounts from both /etc/passwd and LDAP server. However for example id <user>, sudo -...
skyking's user avatar
  • 301
20 votes
2 answers
24k views

nslookup, dig, firefox ignoring /etc/hosts file entries

There is something terribly wrong with my current Debian install. Most programs like firefox, nslookup, dig etc. are ignoring entries in /etc/hosts file, actually I use this file for Ad-blocking. an ...
Arnab's user avatar
  • 1,611
8 votes
1 answer
429 views

How to use same library more than once in Name Service Switch (NSS)

Is there any generic solution to use a single NSS library two (or more) times? In my case I have two LDAP servers, one local on the machine itself and one remote. I need to make NSS work with both of ...
Adam Badura's user avatar
8 votes
2 answers
2k views

read files directly VS getent

In various shell scripts I often see two approaches for getting information from databases supported by Name Service Switch libraries like /etc/group, /etc/hosts or /etc/services. One is getent ...
Martin's user avatar
  • 7,616
12 votes
5 answers
44k views

Resolving NETBIOS names from Linux

There's a Windows machine called SUSAN on my network. From a Windows VM on my Linux box I can simply: C:\>ping susan I've followed this guide (and looked at several other similar ones) for ...
Juicy's user avatar
  • 3,935
3 votes
0 answers
4k views

LDAP: Local and remote user with same username

I have configured an openLDAP server with LDAP user and group ids beginning at 10000. My client successfully binds to the LDAP server via ldapsearch. Additionally, getent passwd|group returns a full ...
rhp997's user avatar
  • 131
3 votes
0 answers
1k views

Editing nsswitch.conf to check for files other than /etc/passwd while searching local files for user details

I have a file in /etc named radius which contains the user account details similar to /etc/passwd but of Radius users. How do I configure /etc/nsswitch.conf to check /etc/radius in addition to ...
user1449951's user avatar
3 votes
1 answer
5k views

can't find my user name in /etc/passwd nor name of my initial group in /etc/group

Here is what i get: [zehu@danville ~]$ groups apl vboxusers [zehu@danville ~]$ [zehu@danville ~]$ grep zehu /etc/passwd [zehu@danville ~]$ [zehu@danville ~]$ grep apl /etc/group [zehu@danville ~]$...
dotlib's user avatar
  • 31
1 vote
1 answer
490 views

Domain name resolution tool not specific to DNS [duplicate]

host, dig and nslookup can be used to lookup DNS names from the command line. However, they query the names from the DNS server directly, instead of using nsswitch to resolve host names. This means /...
Kritzefitz's user avatar
2 votes
1 answer
660 views

How to disconnect a server from LDAP

I have a Fedora server configured for LDAP. However, the LDAP server is gone, and now I'm unable to SSH into it. I've rebooted the server into single-user mode, brought up eth0 and started sshd, but ...
Cerin's user avatar
  • 1,698
3 votes
2 answers
6k views

Editing nsswitch.conf file safely

What's the best way to edit the /etc/nsswitch.conf file other than just using sed -i to edit it in place or overwrite it in total. For our build we need to make changes to this file without ...
Biff's user avatar
  • 281
6 votes
4 answers
4k views

To which Debian package does /etc/nsswitch.conf belong?

I tried to find out to which package /etc/nsswitch.conf belongs on my Debian machine, but dpkg --search /etc/nsswitch.conf won't tell me. Does anyone know?
JohnnyFromBF's user avatar
  • 3,516
1 vote
0 answers
693 views

How is a username determined and can I hide the domain component in a winbind username?

Someone asked a question on Server Fault about a problem which I'm also having but no one has answered it so I'm posing a slightly different question to try and figure it out myself. I've configured ...
Samuel Harmer's user avatar
10 votes
1 answer
6k views

Whta does '\+::::::/bin/bash' in /etc/passwd mean?

Found the line \+::::::/bin/bash in my /etc/passwd, which looks strange to me. What does that mean? Has my computer been hacked?
Funkwecker's user avatar
2 votes
2 answers
18k views

getent passwd when nsswitch passwd setting is: files ldap

If /etc/nsswitch.conf has: passwd: files ldap this line in it, and I do getent passwd will it first run down the /etc/passwd list and then go through every user in LDAP? That seems to be what's ...
Gregg Leventhal's user avatar