Questions tagged [getent]
The getent tag has no usage guidance.
17
questions
2
votes
1answer
104 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 ...
2
votes
1answer
879 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....
0
votes
0answers
157 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?
4
votes
1answer
1k 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 ...
1
vote
1answer
3k 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
...
0
votes
3answers
2k 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 ...
5
votes
1answer
6k 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 ...
0
votes
1answer
269 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 ...
0
votes
1answer
705 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 ...
1
vote
0answers
565 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 ...
3
votes
0answers
664 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 ...
5
votes
0answers
4k 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 ...
1
vote
0answers
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 ...
3
votes
1answer
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. ...
6
votes
2answers
1k 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 ...
1
vote
2answers
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, ...
9
votes
1answer
10k 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 ...