Sponsored Content
Operating Systems Solaris List of Hostname under NIS Domain Post 302117052 by reborg on Thursday 10th of May 2007 09:28:06 AM
Old 05-10-2007
Code:
getent hosts

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

add linux to NIS (unix) domain

I've set up a NIS domain with unix as master-server, slave server and clients. right now i wish to add linux client to the NIS domain. the linux client has got username and password in it. how do i go about it? :confused: (1 Reply)
Discussion started by: legato
1 Replies

2. Solaris

Change hostname, NIS stops

All, I have changed my machine name from A202 to B205. All I modified was /etc/hosts, /etc/nodename, hostname.ce0, /etc/net/<stuff needed to change>. But for some reason now NIS does not work. This is not the NIS server. When I telnet in I get "No directory! Logging in with home=/" when I... (4 Replies)
Discussion started by: kjbaumann
4 Replies

3. Ubuntu

How To Join NIS Domain to an Ubuntu workstation

Hi guys, i am having a problem :confused:actually i never did this before,so please help me to join nis domain to an ubuntu workstation. As i have configured and running NIS Server on RedHat 4.0 in my network and want to set an ubuntu workstation as client. please tell all steps......looking for... (2 Replies)
Discussion started by: daya.pandit
2 Replies

4. UNIX for Dummies Questions & Answers

My domain name as my IRC hostname?

When I connect to any IRC server, it's usually my ISP IP address/hostname. I own a domain, but I'm not using it for anything (no web hosting service or server). Is it possible for me to use my domain as my IRC hostname instead of my regular ISP hostname? (0 Replies)
Discussion started by: guitarscn
0 Replies

5. Shell Programming and Scripting

FQDN into domain name and hostname

I'm working on a rather large script atm (it already takes 9 arguments). As such, I need to obtain both a server name and domain from the FQDN. From this, I want to both populate the hostname of the server, as well as the domain line in the /etc/resolv.conf file. Obviously, this isn't working. I... (10 Replies)
Discussion started by: msarro
10 Replies

6. Shell Programming and Scripting

Trying to extract domain and tld from list of urls.

I have done a fair amount of searching the threads, but I have not been able to cobble together a solution to my challenge. What I am trying to do is to line edit a file that will leave behind only the domain and tld of a long list of urls. The list looks something like this: www.google.com... (3 Replies)
Discussion started by: chamb1
3 Replies

7. UNIX for Dummies Questions & Answers

nLocal sendmail issues when hostname not set in official domain name

Hi, I'm having issues with sendmail when I try to send host to host mail. I've had to change the "my official domain name" line to mycompany.com to get the mails through the external spam filter, when a mail was sent with hostname.mycompany.com it was blocked. I had to change the Dj macro... (0 Replies)
Discussion started by: elcounto
0 Replies

8. UNIX for Dummies Questions & Answers

Postfix Configuration:Hostname/Domain Name Doubts

I have a RHEL server where I want to create a mail server so I can send myself alerts whenever X process have problems. Disclaimer: Im a programmer thats been forced to do IT. So I'm trying my best here. The problem: While configuring Postfix it asks for $myhostname which apparently must be... (2 Replies)
Discussion started by: RedSpyder
2 Replies

9. Red Hat

List domain groups

Hi Need to list all gid for particular domain user. Actually in database getting error like one of the gid that user belongs is invalid. please suggest. thanks Paul (1 Reply)
Discussion started by: Mathew_paul
1 Replies

10. Solaris

How to list physical CPU on primary domain?

How to list physical CPU on primary domain? Sparc SPARC T5-4 psrinfo -p 1 in ILOM I see Processors: 4 / 4 (2 Replies)
Discussion started by: thomasj
2 Replies
GETENT(1)							   User Commands							 GETENT(1)

NAME
getent - get entries from Name Service Switch libraries SYNOPSIS
getent [option]... database key... DESCRIPTION
The getent command displays entries from databases supported by the Name Service Switch libraries, which are configured in /etc/nss- witch.conf. If one or more key arguments are provided, then only the entries that match the supplied keys will be displayed. Otherwise, if no key is provided, all entries will be displayed (unless the database does not support enumeration). The database may be any of those supported by the GNU C Library, listed below: ahosts When no key is provided, use sethostent(3), gethostent(3), and endhostent(3) to enumerate the hosts database. This is identi- cal to using hosts. When one or more key arguments are provided, pass each key in succession to getaddrinfo(3) with the address family AF_UNSPEC, enumerating each socket address structure returned. ahostsv4 Same as ahosts, but use the address family AF_INET. ahostsv6 Same as ahosts, but use the address family AF_INET6. The call to getaddrinfo(3) in this case includes the AI_V4MAPPED flag. aliases When no key is provided, use setaliasent(3), getaliasent(3), and endaliasent(3) to enumerate the aliases database. When one or more key arguments are provided, pass each key in succession to getaliasbyname(3) and display the result. ethers When one or more key arguments are provided, pass each key in succession to ether_aton(3) and ether_hostton(3) until a result is obtained, and display the result. Enumeration is not supported on ethers, so a key must be provided. group When no key is provided, use setgrent(3), getgrent(3), and endgrent(3) to enumerate the group database. When one or more key arguments are provided, pass each numeric key to getgrgid(3) and each nonnumeric key to getgrnam(3) and display the result. gshadow When no key is provided, use setsgent(3), getsgent(3), and endsgent(3) to enumerate the gshadow database. When one or more key arguments are provided, pass each key in succession to getsgnam(3) and display the result. hosts When no key is provided, use sethostent(3), gethostent(3), and endhostent(3) to enumerate the hosts database. When one or more key arguments are provided, pass each key to gethostbyaddr(3) or gethostbyname2(3), depending on whether a call to inet_pton(3) indicates that the key is an IPv6 or IPv4 address or not, and display the result. initgroups When one or more key arguments are provided, pass each key in succession to getgrouplist(3) and display the result. Enumera- tion is not supported on initgroups, so a key must be provided. netgroup When one key is provided, pass the key to setnetgrent(3) and, using getnetgrent(3) display the resulting string triple (host- name, username, domainname). Alternatively, three keys may be provided, which are interpreted as the hostname, username and domainname to match to a netgroup name via innetgr(3). Enumeration is not supported on netgroup, so either one or three keys must be provided. networks When no key is provided, use setnetent(3), getnetent(3), and endnetent(3) to enumerate the networks database. When one or more key arguments are provided, pass each numeric key to getnetbyaddr(3) and each nonnumeric key to getnetbyname(3) and dis- play the result. passwd When no key is provided, use setpwent(3), getpwent(3), and endpwent(3) to enumerate the passwd database. When one or more key arguments are provided, pass each numeric key to getpwuid(3) and each nonnumeric key to getpwnam(3) and display the result. protocols When no key is provided, use setprotoent(3), getprotoent(3), and endprotoent(3) to enumerate the protocols database. When one or more key arguments are provided, pass each numeric key to getprotobynumber(3) and each nonnumeric key to getprotobyname(3) and display the result. rpc When no key is provided, use setrpcent(3), getrpcent(3), and endrpcent(3) to enumerate the rpc database. When one or more key arguments are provided, pass each numeric key to getrpcbynumber(3) and each nonnumeric key to getrpcbyname(3) and display the result. services When no key is provided, use setservent(3), getservent(3), and endservent(3) to enumerate the services database. When one or more key arguments are provided, pass each numeric key to getservbynumber(3) and each nonnumeric key to getservbyname(3) and display the result. shadow When no key is provided, use setspent(3), getspent(3), and endspent(3) to enumerate the shadow database. When one or more key arguments are provided, pass each key in succession to getspnam(3) and display the result. OPTIONS
-s service, --service service Override all databases with the specified service. (Since glibc 2.2.5.) -s database:service, --service database:service Override only specified databases with the specified service. The option may be used multiple times, but only the last service for each database will be used. (Since glibc 2.4.) -i, --no-idn Disables IDN encoding in lookups for ahosts/getaddrinfo(3) (Since glibc-2.13.) -?, --help Print a usage summary and exit. --usage Print a short usage summary and exit. -V, --version Print the version number, license, and disclaimer of warranty for getent. EXIT STATUS
One of the following exit values can be returned by getent: 0 Command completed successfully. 1 Missing arguments, or database unknown. 2 One or more supplied key could not be found in the database. 3 Enumeration not supported on this database. SEE ALSO
nsswitch.conf(5) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. Linux 2015-04-19 GETENT(1)
All times are GMT -4. The time now is 07:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy