What's the difference between:
cat /etc/passwd
and
ypcat passwd
? What is ypcat exactly?
Why do I get this:
ypcat: can't get local yp domain: Local domain name not set
when running
ypcat passwd.
What's the difference between:
cat /etc/passwd
and
ypcat passwd
? What is ypcat exactly?
Why do I get this:
ypcat: can't get local yp domain: Local domain name not set
when running
ypcat passwd.
ypcat
shows the data from the NIS database, which may not be on your computer. That holds network accounts (which allow you to log into various computers on your network). It is named with a "yp" prefix since the original programs were referred to as "yellow pages" (until Sun and others were told to stop doing that — by the phone company).
cat
(of course) shows only data from a file on your computer, which lists local accounts.
Further reading:
The cat command is used to concatenate and display the contents of the given files.
ypcat on the other hand
prints out the Network Information Services (NIS) map you specify with the MapName parameter. You can specify either a map name or a map nickname. Because the ypcat command uses the NIS service, you do not need to specify a server
where NIS is
The Network Information Service, or NIS (originally called Yellow Pages or YP) is a client–server directory service protocol for distributing system configuration data such as user and host names between computers on a computer network.
Read about ypcat here : http://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds6/ypcat.htm
Read about NIS here : https://en.wikipedia.org/wiki/Network_Information_Service