Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [getent]

The tag has no usage guidance.

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

Random DNS errors after change to nsswitch.conf

I recently installed my EPSON L3150 printer's drivers and about the same time I started having weird (and random) DNS name resolution errors in some applications (ssh, nextcloud-client), that I can ...
user avatar
  • 519
1 vote
0 answers
208 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/...
user avatar
3 votes
2 answers
152 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 ...
user avatar
  • 43
0 votes
1 answer
107 views

Why are there two root and nobody accounts according to "getent passwd"?

The output further down was retrieved by employing machinectl on a Ubuntu 20.04 host: machinectl pull-tar https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64-root.tar.xz focal ...
user avatar
  • 15.1k
2 votes
1 answer
830 views

Groups from LDAP: "getent" reports membership correctly but missing in output of "id"

I have a Debian 10 machine which uses PAM LDAP for authentication. In LDAP I have two users alice and bob which are both members of group mygroup. Everything has worked fine (so the configuration ...
user avatar
2 votes
1 answer
1k views

User listed in group but not in getent passwd

On a specific machine with both local users and LDAP users, there is a user that is listed under getent group foo (let's say the user jdoe is listed), but when doing getent passwd jdoe I get no output....
user avatar
  • 163
0 votes
0 answers
267 views

Usage details of ahostsv4 in linux

There is a term called ahostsv4 in the Linux documentation of man getent. What is the usage of it?
user avatar
  • 1
4 votes
1 answer
2k views

Inconsistency between “getent group” and “getent group <groupname>” – why?

Question How is the following possible? $ getent group | grep docker $ getent group docker docker:x:600: Note that the first call doesn’t return anything while the second one does. grpck doesn’t ...
user avatar
  • 205
2 votes
1 answer
5k views

What must be added to nsswitch.conf to show AD users and groups?

This is a follow-up to this question. I have a CentOS 7 machine which has joined a domain FOOBAR. It is possible to successfully get info about users stored in the AD via id user@FOOBAR.GLOBAL ...
user avatar
  • 25.4k
0 votes
3 answers
3k 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 ...
user avatar
  • 1,371
5 votes
1 answer
8k views

getent passwd -s sss LOCALUSER shows local user

tl;dr I want to easily and quickly tell if a user is local or domain (don't care which domain). Environment freeipa-client-4.6.1-3.fc27.x86_64 sssd-1.16.0-4.fc27.x86_64 Full story I am writing a ...
user avatar
  • 361
0 votes
1 answer
315 views

libnss-pgsql2 - getent group fails

i have set up pam and nss on a linux server (ubuntu 16.04) to get users and groups from a remote postgresql database. Login on the server is fine, but groups can not be loaded out of the database. If ...
user avatar
  • 71
0 votes
1 answer
949 views

Linux getent automount?

I just got a user account on a server with its nsswitch pointing at ldap. Something is wrong with my home folder (I don't have one). Generally the home folders are mounted by automount/autofs and ...
user avatar
  • 868
1 vote
0 answers
664 views

SSSD list allowed users only

We are using SSSD for authentication using LDAP. And I filter the user access using simple_allow_groups as follows: access_provider = simple simple_allow_groups = Computer Admins (Note: Computer ...
user avatar
  • 262
3 votes
0 answers
757 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 ...
user avatar
  • 31
5 votes
0 answers
5k views

getent shadow shows password hashes for some users

If I execute sudo getent shadow I see password hashes for all the local users who have them. For most of the LDAP accounts I only see * in the password field. However, for a few LDAP users, I see ...
user avatar
1 vote
0 answers
1k views

Remove ldap user

Trying to remove a user with userdel xyz I get: no crontab for xyz userdel: cannot remove entry 'xyz' from /etc/passwd So I executed getent passwd xyz and a record is returned. I thought that this ...
user avatar
3 votes
1 answer
1k views

command to get username via id

There is a command id to get the user id. E.g. id -u rootgives me 0. Is there an opposite command to get the user name via the id? I know I can grep /etc/passwdor run getent and awk or cutthe result. ...
user avatar
7 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 ...
user avatar
  • 6,288
1 vote
2 answers
2k views

getent passwd does not return AD users Centos 7 SSSD

I'm used to joining windows 2008 r2 AD with Krb5.conf/ldap.conf/smb.conf and pam.d/authconfig_ac and being able to list users with getent passwd but after joining a centos 7 system I can logon fine, ...
user avatar
11 votes
1 answer
13k views

getent hosts prints IPv6, getent ahosts prints IPv4

Verbatim output from my terminal: $ getent hosts example.org 2001:500:88:200::10 example.org $ getent ahosts example.org 192.0.43.10 STREAM 43-10.any.icann.org 192.0.43.10 DGRAM 192.0.43.10 ...
user avatar
  • 46.9k