Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [getent]

The tag has no usage guidance.

0
votes
0answers
26 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?
0
votes
0answers
19 views

Getent Hosts For Port 1915/tcp -iptables

I have a scenario: i will have to protect my network from unsolicited access from my DMZ machine, configure node-A to allow new connections on port 1915/tcp from hosts (obtained by 'getent hosts node-...
4
votes
1answer
374 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
601 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
902 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 ...
3
votes
1answer
2k 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
174 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
332 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
426 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
457 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 ...
4
votes
0answers
2k 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
993 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
513 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. ...
5
votes
2answers
853 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
1k 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
7k 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 ...