Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

Questions tagged [getent]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
4 answers
61 views

extract user id and 1st inital last name from output

Getting the output of user identity with getent passwd. How can i change the output from u12345:John Doe to u12345,jdoe i got it with sed but it it removes u12345 but does give me jdoe
mike's user avatar
  • 1
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
1 vote
1 answer
2k views

How to get list of users with a given group as primary group

With getent group xyz I get a list of users who are members of xyz with xyz either as a primary group or as secondary group. How do I get a list of just those users who have xyz as their primary ...
loris's user avatar
  • 195
1 vote
1 answer
654 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 ...
arielnmz's user avatar
  • 529
1 vote
0 answers
791 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
279 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
1 answer
291 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 ...
0xC0000022L's user avatar
  • 16.7k
4 votes
1 answer
4k 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 ...
Martin Konrad's user avatar
2 votes
1 answer
2k 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....
Joeytje50's user avatar
  • 165
0 votes
0 answers
475 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?
Rumado's user avatar
  • 101
4 votes
1 answer
3k 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 ...
Chriki's user avatar
  • 215
2 votes
1 answer
8k 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 [email protected] ...
dr_'s user avatar
  • 29.8k
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
5 votes
1 answer
11k 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 ...
bgStack15's user avatar
  • 391
0 votes
1 answer
380 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 ...
rnick's user avatar
  • 81
0 votes
1 answer
1k 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 ...
azzid's user avatar
  • 1,000
1 vote
1 answer
943 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 ...
Saqib Ali's user avatar
  • 272
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
5 votes
0 answers
6k 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 ...
Dennis Williamson's user avatar
1 vote
0 answers
2k 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 ...
bob_saginowski's user avatar
3 votes
1 answer
2k 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. ...
Veterinarian'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,586
1 vote
3 answers
3k 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, ...
user2566210's user avatar
17 votes
1 answer
16k 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 ...
l0b0's user avatar
  • 51.5k