Commands

Commands

hostname

[-v] [-a] [--alias] [-d] [--domain] [-f] [--fqdn] [-i] [--ip-address] [--long] [-s] [--short] [-y] [--yp] [--nis]

hostname

[-v] [-F filename] [--file filename] [hostname]

domainname

[-v] [-F filename] [--file filename] [name]

hostname

[-v] [-h] [--help] [-V] [--version]

dnsdomainname

[-v]

nisdomainname

[-v]

ypdomainname

[-v]

This program will either set or display the specified network name. Note that you cannot change the FQDN with this command.

Example: To set the domain name of the current domain to be asgard, use

graphics/root.gif

domainname asgard

 

-a, --alias

Displays alias name of host.

-d, --domain

Displays DNS domain name.

-F, --filefilename

Specified file contains host name information.

-f, --fqdn, --long

Displays FQDN (Fully Qualified Domain Name).

-h, --help

Displays help information and then exits.

-i, --ip-address

Displays IP address(es) of the host.

-s, --short

Displays short host name (up to the first dot).

-V, --version

Displays version information and then exits.

-v, --verbose

Invokes verbose option.

-y, --yp, --nis

Displays NIS domain name.

/usr/lib/yp/makedbm

[ -a | -r ] [ -b ] [ -c ] [ -s ] [ -l ] [ -i YP_INPUT_NAME ] [ -o YP_OUTPUT_NAME ] [ -m YP_MASTER_NAME ] inputfile dbname

/usr/lib/yp/makedbm -u

dbname

/usr/lib/yp/makedbm -c

/usr/lib/yp/makedbm --version

Converts the specified input file and converts it to a ypserv database.

Example: To read in the file sample.txt and convert it to the yp database sample, use

graphics/root.gif

makedbm sample.txt sample

 

-a

Support mail aliases.

-b

Insert the YP_INTERDOMAIN into the output.

-c

Clear. Send a YPPROC_CLEAR to the local ypserv.

-l

Convert to lowercase.

-iYP_INPUT_NAME

Create a database entry with the key YP_INPUT_NAME.

-mYP_MASTER_NAME

Create a database entry with the key YP_MASTER_NAME.

-oYP_OUTPUT_NAME

Create a special database entry with the key YP_OUTPUT_NAME.

-r

Treat # as a comment sign and remove the comment.

-s

Secure map. Accept connections from secure NIS networks only.

-udbname

Dump a ypserv database file.

/usr/sbin/ypbind

[ -v|-version|--version] [ -d|-debug|--debug ] [ -ipc|--ipc ] [ -mmap|--mmap ] [ -broken_server|--broken_server ] [ -ypset ] [ -ypsetme ] [ -no-ping|--no-ping ]

This is the NIS client daemon. It locates the server for an NIS domain and stores information about it in a binding file. The binding file is found in /var/nis/binding and, typically, has a name formatted as domainname.version (e.g., /var/nis/binding/asgard.2).

Example: To invoke the ypbind daemon on an NIS client machine, use

graphics/root.gif

ypbind

 

domain nisdomain server hostname

Use server hostname for the domain nisdomain.

domain nisdomain broadcast

Use broadcast on the local net for domain nisdomain.

ypserverhostname

Use server for the local domain. The IP address of server must be listed in /etc/ hosts.

-ypset

Ypset may be used to change the binding for a domain.

-ypsetme

Ypset may be used only from the local host to change the binding for a domain.

-debug

Run debug mode. (Runs in foreground with debug output written to standard out.)

-ipc

Permit use of IPC for master-slave communication. If your root filesystem is on NFS, you must use this option.

-mmap

Permit use of mmap for master-slave communication.

-broken_server

Accept answers from servers running on an illegal port number.

-no-ping

Do not allow ypbind to continually check if the binding is alive.

ypcat

[ -kt ] [ -d domain ] mapname

ypcat -x

Displays the values of all keys from NIS database specified by mapname.

Example: To display the password map, use

ypcat passwd

-ddomain

Specify a domain other than the default.

-k

Display map keys.

-t

Inhibit map nickname translation.

-x

Display map nickname translation table.

yppasswd

[-f] [-l] [-p] [user]

ypchfn

[user]

ypchsh

[user]

Changes password, shell, or GECOS information for NIS. These commands are all links to the same program. This program is very similar to passwd in its operation.

Example: To change the password for the user testnfs, use

yppasswd testnfs

-f

Update GECOS field.

yppasswd or -l

Change the user's NIS password.

ypchsh or -l

Change the user's login shell.

ypchfn or -f

Change user's full name and related information.

/usr/lib/yp/ypinit

[ -m ] [ -s master_name ]

Builds the domain subdirectory of /var/yp for the current default domain and then creates a set of administrative maps and places them in this directory.

Example: To initialize the current machine as a master server, use

graphics/root.gif

ypinit -m

Example: To initialize the current machine as a slave server to the master server odin, use

graphics/root.gif

ypinit -s odin

 

-m

Use this command if the local host is the NIS master.

-s

Set up a slave server with the database from master_name.

ypmatch

[ -kt ] [ -d domain ] key mapname

ypmatch -x

Displays the values of one or more keys from the NIS database specified by mapname.

Example: To display the password file entry for the user testnfs, use

ypmatch testnfs passwd

-ddomain

Allow user to specify a domain.

-k

Display map keys.

-t

This option inhibits map nickname translation.

-x

Display the map nickname translation table.

yppoll

[ -h host ] [ -d domain ] mapname

Returns version and master server of an NIS map.

Example: To get the version and master server of the hosts map, use

graphics/root.gif

yppoll hosts

 

-h host

Request information on mapname from the specified host.

-d domain

Specify a domain other than the default.

/usr/sbin/yppush

[ -d domain ] [ -t timeout ] [ -p # parallel jobs ] [ -h host ] [ -v ] mapname

Copies updated NIS databases or maps from the master NIS server to the slave servers within an NIS domain. This program is used by master servers to maintain map databases on slave servers when changes are made.

Typically, this is handled automatically by the NIS make utility.

Example: To overwrite the passwd map on slave servers, use

graphics/root.gif

yppush passwd

 

-ddomain

Specify a domain.

-ttimeout

Specify a timeout value in seconds.

-p# parallel jobs

Perform transfers serially (complete the transaction with the current slave before talking to the next one).

-hhost

Transfer a map to a user-specified machine or group of machines, rather than the list of servers contained in the ypservers map.

/usr/sbin/ypserv

[ -b ] [ -d [ path ] ] [ -p port ]

ypserv is the NIS network lookup service daemon.

Example: To invoke the NIS network daemon on a server, use

graphics/root.gif

ypserv &

 

-d --debug [path]

Run the server in debugging mode.

-b --dns

If a particular host is not found in the host map, query DNS for more host information.

-p --portport

Bind to the specified port.

-v --version

Display version information.

ypset

[ -d domain ] [ -h hostname ] server

This command tells ypbind to get NIS services for the specified domain from the ypserv process running on the server. In order to use ypset, ypbind must be initiated with the ypset or ypsetme options.

Example: To invoke ypbind, telling it to get NIS services for the domain midgard from the server helga, use

graphics/root.gif

ypset -d midgard helga

 

-ddomain

Specify a domain other than the default.

-hhostname

Set NIS binding on host, rather than the local machine.

ypwhich

[ -d domain ] [ -Vn ] [ hostname ]

ypwhich

[ -d domain ] [ -t ] -m [ mname ]

ypwhich -x

This command returns the name of the NIS server or map master.

Example: To find out who your NIS server is, use

ypwhich

-ddomain

Specify a domain other than the default domain.

-t

Inhibit map nickname translation.

-mmname

Find the master NIS server for a map.

-x

Display the map nickname translation table.

-Vn

Version of ypbind(8), V2 is default.

/usr/lib/yp/ypxfr

[ -f ] [ -c ] [ -d target domain ][ -h source host ] [ -s source domain ][ -C taskid program-number ipaddr port ] [ -p yp_path ] mapname

Copies an NIS database from the NIS master server to a slave server, using the NIS service.

Example: To transfer the aliases map from a master server to a slave (the command is run on the slave), use

graphics/root.gif

ypxfr aliases.byname

 

-f

Force a map transfer.

-c

Do not send a "clear current map" request to the ypserv process running on the local host.

-ddomain

Specify a domain other than the default NIS domain.

-hsource host

Force ypxfr to get the map from the specified host.

-ssource domain

Specify a source domain from which to transfer a map that should be the same across domains.

-Ctaskid program-number ipaddr port

Specify that ypxfr should call back a yppush process at the host with IP address ipaddr, registered as program, listening on the specified port, and waiting for a response to transaction taskid.

-pyp_path

Change directory for the maps to yp_path/[domainname].

mapname

One or more names of the map to transfer.

 



Linux Desk Reference
Linux Desk Reference (2nd Edition)
ISBN: 0130619892
EAN: 2147483647
Year: 2000
Pages: 174
Authors: Scott Hawkins

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net