July 13th, 2007
Inside Linux Chapter 12. Network File Service (NFS) The Network File System (NFS) is a popular and widely used protocol for file sharing. Many organizations use NFS to serve up users’ home directories. This allows users to roam about and use more than one machine; thus, each user will have access to his or her home directory. Overview As mentioned previously, NFS is a protocol for the sharing of files. NFS was originally developed and released in 1985 by Sun Microsystems. Sun Microsystems advertises an installed base of eight million NFS systems. NFS has come to be a very robust solution and runs on many platforms. The growth of NFS in the PC arena the last few years is attributed to the growth of Linux and other PC-based operating systems. NFS is also enjoying fast growth in the workstation and server markets. Some of the highlighted features of NFS are the following: NFS maintains the scalability required to support small to large enterprise networks. An automatic mounting facility provides continuous and transparent access to files. NFS Version 3, which is a new version of the NFS protocol, is designed to increase scalability and performance. Quick access to information is provided by local disk caching. NFS implements centralized administration, thereby reducing the effort required to perform your routine administration tasks. Some NFS systems provide support for diskless and dataless client systems. NFS has an open architecture. However, this creates security risks -this architecture is understood by crackers. NFS is implemented as a client/server architecture supporting the sharing of files. The NFS system is available on a wide range of heterogeneous platforms, from mainframes to the PC. Another plus is that NFS is an open standard. This means that you do not have to worry about proprietary mechanisms or rely on a single vendor to provide products, updates, or technical support. NFS is even defined in a number of RFCs and is part of X/Open Common Application Environment. You can obtain the source code for NFS and can license it from SunSoft. You can also obtain the written specification for free by downloading it from the Internet. The current advertisement says that more than 300 organizations have licensed NFS technology. Many products to enhance NFS are available for most operating system platforms. Table 12.1 lists some of the vendors that provide solutions for NFS. When a directory (or file) is shared using NFS, that directory (or file) appears to be a part of the local filesystem, rather than the one on the remote system. NFS is not restricted to large networks within an organization. You could set up your own network of Linux machines, using NFS to share files and directories. For example, you might have your main server located in a large closet, attic room, or basement. Using NFS, you can share all the files and directories that exist on that server to all the other machines in your house. The files and directories appear to be local to the machine you are using, rather than on the remote server. Of course, NFS must reach across the network to obtain information on the files, but all this trafficking is done transparently. Although NFS can be used with various networks, it is optimally designed for the TCP/IP protocol. NFS is found more often on networks running TCP/IP, mainly because of the popularity of TCP/IP today. But because NFS is such a popular file-sharing protocol, implementations of it can be found on heterogeneous operating systems. Refer to Table 12.1 to review the list of vendors and operating systems. page 210
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.
July 12th, 2007
Inside Linux The yppush Command The yppush command is used to force distribution of modified NIS databases. The usage for the command is as follows: yppush [-d domain] [-t timeout] [-p # parallel jobs] [-h host ] [ -v ] mapname … The yppush command is used to copy the updated NIS maps from the master to the slave servers within an NIS domain. This command is normally invoked from the /var/yp/Makefile file after the master databases have been modified. Be sure to check the Makefile for the NOPUSH=True rule. If this line exists, you must comment it out. To determine the slave servers that must be updated, the yppush command compiles a list from the ypservers NIS map. The destination host can be specified on the command line. The yppush command offers a number of options, which are described in Table 11.10. Table 11.10. Options for the yppush Command Option Description -d domain This option is used to specify a domain. The default is to use the NIS domain for the local host. You must specify the domain name for the local host if the domain name is not set. -t timeout This option is used as a timeout flag, interpreted in seconds. The value determines the number of seconds that yppush waits for a response from a slave server. If no response is received, yppush tries another NIS server. -p # parallel jobs This option directs yppush to send the multiple map transfer request in parallel, rather than submitting the request serially (the default). -h host This option specifies transfer of a map to the identified host. Multiple hosts can be specified using multiple instances of this option. -v This option tells yppush to print debugging messages as it executes. Summary This chapter discussed the installation and use of the Network Information Service (NIS). NIS provides a distributed database system containing various system administration files. An overview of NIS was discussed; you learned that NIS was originally named the Yellow Pages (YP). Because of trademark issues, the name was changed to NIS. Some of the files that NIS traditionally houses are found in the /etc directory and are named aliases, bootparams, ethers, group, hosts, netgroup, netmasks, networks, passwd, protocols, rpc, and services. The NIS model is a client/server model. The host portion of NIS maintains data files known as maps. The client side sends requests to the server, soliciting information identified in the map files. Configuring an NIS master server is accomplished using the ypinit command. This command is also used to initialize a slave server. The slave server maps are populated from the master server(s). The ypserv daemon is the server process used to handle requests coming from NIS clients. An NIS client uses the ypbind daemon to attach to a server, thereby submitting a request to the bound server. The chapter concludes with a section detailing some of the miscellaneous NIS commands. The commands covered are ypwhich, ypcat, ypmatch, yppoll, ypxfr, and yppush. The ypwhich command returns the name of the NIS server. The ypcat command prints the values for all keys in an NIS database. The ypmatch command prints the values of one or more keys from an NIS map. The yppoll command returns the version and master server for a map. To transfer an NIS database from a remote server to a local host, use the ypxfer command. Finally, the yppush command forces distribution of modified NIS databases. page 209
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.
July 12th, 2007
Inside Linux The ypxfr Command The ypxfr command is used to transfer an NIS database from a remote server to a local host. The usage for the ypxfr command is as follows: ypxfr [-f] [-c] [-d target domain] [-h source host] [-s source domain] [-C taskid program-number ipaddr port] [-p yp_path ] mapname … The ypxfr command is used to copy an NIS database from an NIS server to the local host. Normally, the ypxfr command is executed by the ypinit command or by the ypserv command when ypserv receives a request from yppush for a map transfer. A temporary map is created in the /var/yp/[domainname] directory. The file is populated with the map entries and retrieves map parameters. The original version of the map is replaced with the temporary map if the transfer succeeded. For all maps, you have an NIS master server, which maintains a canonical copy of the NIS map; all the other servers, the NIS slaves, copy the new version of the map from the master whenever an update is made. Normally, you have one NIS master for all maps. The ypxfr command is used most often where several NIS servers (master and slaves) are in use. The ypxfr command is executed as a cron job. If the data for a map is fairly static, updating once a day should be sufficient. For other highly dynamically changing files, you may want to set cron to run ypxfr every hour or two. The ypxfr command offers a number of options, which are described in Table 11.9. Table 11.9. Options for the ypxfr Command Option Description -f This option forces a map transfer. The ypxfr command will not transfer a map if the copy on the NIS master is the same as the local host. -c This option specifies that the clear current map request should not be sent to ypserv running on the local host. You should use this flag when invoking ypxfr via ypinit. You can also use this flag if ypserv is not running locally. If the option is not specified under either of these two conditions, then ypxfr will complain that it can not communicate to the local ypserv. -d domain This option specifies a domain other than the default. -h source host This option obtains the map from host. If host is not specified, the ypxfr command requests the name of the master from the NIS service, to try to get the map from there. -s source domain This option identifies a source domain to transfer a map from. -C taskid program# ipaddr port This option is used only by the ypserv command. When ypserv executes ypxfr, ypxfr is registered as program#; should call the yppush process at the host with ipaddr; is listening on port; and waiting for a response to taskid. -p yp_path This option changes the directory for the maps to yp_path/[domainname] rather than the default of /var/yp/[domainname]. mapname This option specifies the names of the map(s) to transfer. page 208
We recommend high quality webhost to host and run your jsp application: christian web host services.
July 12th, 2007
Inside Linux The ypcat Command The ypcat command is used to print the values for all keys in an NIS database. The usage for the command is as follows: ypcat [ -kt ] [ -d domain ] mapname ypcat -x The ypcat command is used to print the values for all keys from the NIS database specified by the identified mapname. The mapname identified can be a map name or a map nickname. The options available to the ypcat command are listed in Table 11.7. Table 11.7. Options for the ypcat Command Option Description -d domain Identifies a domain other than the default. -k Displays the map keys. Useful with maps in which the values are null or the key does not exist as part of the value. -t Inhibits map nickname translation. -x Displays the map nickname translation table and exits. The ypmatch Command The ypmatch command is used to print the values of one or more keys from an NIS map. The usage for the ypmatch command follows: ypmatch [ -kt ] [ -d domain ] key … mapname ypmatch -x The ypmatch command prints the values of one or more keys from the NIS database. This is specified by the identified mapname. The mapname may be a map name or a map nickname. The options available to the ypmatch command are shown in Table 11.8. Table 11.8. Options for the ypmatch Command Option Description -d domain Specifies a domain other than the default. -k Displays the map keys. Useful with maps in which the values are null or the key does not exist as part of the value. -t Inhibits map nickname translation. -x Displays the map nickname translation table and exits. The yppoll Command The yppoll command returns the version and master server of an NIS map. The usage for the yppoll command is shown in the following: yppoll [ -h host ] [ -d domain ] mapname yppoll Two options are available for the yppoll command. These options are as follows: -h host. Ask the NIS server for information about mapname. If the host is not identified, the server polled will be the default server returned by the ypwhich command. -d domain. Specify a domain other than the default. page 207
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.
July 12th, 2007
Inside Linux Table 11.5. Options for the ypbind Command Option Description -broadcast This option is used to send a broadcast for information required to bind to an NIS server. -ypset This option allows a root user from any remote machine to change the binding for a domain using the ypset command. The default is that no one can change the binding. Be cautious because this is an unsecure option. -ypsetme This option is the same as -ypset, but only root is allowed to change the binding. -c This option tells ypbind to check the configuration file for syntax errors and exits. -debug This option invokes ypbind in debug mode, keeping ypbind from running in the background. Additionally, ypbind will write error messages and debug output to standard error. -brokenserver This option is used to tell ypbind to accept answers from servers running on an illegal port number. Avoid this option if you can. -no-ping This keeps ypbind from checking whether the binding is alive; it is used with dial-up connections to prevent ypbind from keeping the connection open. -f configfile This option tells ypbind to use configfile. -p port This is used to specify the port that ypbind will bind to. This allows you to use router filter packets to the NIS ports. –version This option prints the version number and exits. Additional NIS Commands and Files The NIS system offers a number of commands beyond what has been discussed thus far. Some of the commands discussed in this section may or may not be available on your Linux distribution. The ypwhich Command The ypwhich command is used to return the name of the NIS server or the map master. The usage for ypwhich is as follows: ypwhich [ -d domain ] [ -Vn ] [ hostname ] ypwhich [ -d domain ] [ -t ] -m [ mname ] ypwhich -x The ypwhich command returns the name of the NIS server that is supplying NIS services to the NIS client. The NIS server might also be the master for a map. If you invoke the command without any arguments, the value returned is the NIS server for the local machine. If you specify a hostname, that host machine will be queried to discover the NIS master that is being used. Table 11.6 describes the available options for the ypwhich command. Table 11.6. Options for the ypwhich Command Option Description -d domain Specifies a domain other than the default. -t Inhibits the map nickname translation. -m mname Locates the master NIS server for a map. A hostname cannot be specified in this option. The mname can be a map name or the nickname for a map. -x Displays the map nickname translation table. -Vn Prints the version of ypbind and exits. page 206
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.
July 11th, 2007
Inside Linux Creating a Slave Server In this section, you will see what it takes to set up an NIS slave server. The one prerequisite is that you have the master server running before creating any slave servers. Initializing a slave server is as easy as setting up a master server. The ypinit command is executed to perform the setup. The difference between setting up a master and a slave is determined by the ypinit option used. To create a slave, the -s option is used and the master server is specified. To begin, you should be at the machine that will act as the slave server. If you have not named the server using the domainname command, you should do so now. Remember, to execute the command you simply provide the name as an argument to the command, as shown in the following sample dialog. You should be logged in as the root user to execute these commands. stimpy $ domainname slaveName stimpy $ Now that the name is set, it is time to execute the ypinit command. Remember, the master server must be running to execute the ypinit command for the slave. The following dialog demonstrates an attempt to create a slave server on the master, even after changing the name with the domainname command. stimpy $ /usr/lib/yp/ypinit -s admin The host specified should be a running master NIS server, not this machine. stimpy $ The following dialog demonstrates the use of ypinit for the slave server. stimpy $ /usr/lib/yp/ypinit -s ren stimpy $ One other thing - the master server named as the argument must be accessible from the slave server. The directory structure is created and the map files are built from the master server’s map files. Setting Up an NIS Client Using ypbind To enable an NIS client, you will have to have one or more servers running the NIS ypserv daemon. Be sure that an NIS server is running; otherwise, you run the risk of the client machine hanging. Setting up an NIS client is straightforward. The concept is that the client binds itself to a server using you guessed it - the ypbind command. ypbind [-broadcast | -ypset | -ypsetme] [-p port] [-f configfile] [-no-ping] [-broken-server] [-debug] ypbind -c [-f configfile] ypbind –version When ypbind starts up or receives the SIGHUP signal, it parses the /etc/yp.conf file. The ypbind command then attempts to use the entries found in the file for its binding. The ypbind command removes itself from the controlling terminal, as all good daemons do, and uses syslog() for logging errors and warnings. The ypbind process consists of a master process and a slave process. The master services RPC requests, asking for binding information. The slave process is used to initialize the bind, and it validates it periodically. If a failure occurs, the bind is invalidated and the process is retried. The ypbind command searches for a server on the NIS domain, and then stores that information in a binding file. The binding file usually resides in the /var/yp/binding directory. The name for the binding file is customarily [domainname[.[version]. It is possible to have several files because an NIS client can be bound to more than one domain. Table 11.5 describes the options for the ypbind command. Please note that the ypbind command in some Linux distributions does not support all options listed. For some versions of ypbind, after a bind has been established, ypbind will transmit YPPROC_DOMAIN requests to the NIS server at 20-second intervals. If ypbind does not get a response (or the server responds that it does not have this domain any longer), ypbind will seek out a new NIS server. If ypbind finds a server that responds faster, ypbind switches to the faster server. You can tell ypbind to use network broadcasts to find a new server. This is an insecure method. Rather, you should give ypbind a list of known, secure servers. In this case, ypbind sends a ping to all servers and binds to the first one that answers. page 205
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.
July 11th, 2007
Inside Linux Not much to it -all operations should be this easy! The ps x command is executed to verify the existence of the ypserv daemon. Notice that it is running as a background process because there is no controlling terminal. Normally, the ypserv daemon is executed at system startup. The process continues to run on an NIS server machine that maintains a complete NIS database. At startup, or when the process receives the SIGHUP signal, ypserv will parse the /etc/ypserv.conf file for configuration information. The ypserv.conf Configuration File The ypserv.conf file is a typical Linux configuration file that contains options for ypserv. The file is normally found in the /var/yp directory but may also be found in the /etc directory. It also contains a list of rules for host and map access for the ypserv and rpc.ypxfrd daemons. The ypserv and rpc.ypxfrd daemons will read this file at startup or if they receive a SIGHUP signal. There should be only one entry per line. If the entry is an option line, the format is as follows: option: [yes | no] If the entry is an access rule, the format is as follows: host:map:security:mangle[:field] If any rules exist, they are tried one at a time. If a match is not found, access to a map is allowed. Table 11.3 lists the options available to the ypserv.conf file. Table 11.3. Options for the ypserv.conf File Option Description dns If this option is specified, the NIS server will query nameserver for hostnames that are not found in the hosts.* maps. The default is no. xfr_check_port This option tells the NIS master server that it must run on a port less than 1024. The default is yes. Table 11.4 describes the fields used for the access rules. Table 11.4. Field Descriptions for Access Rules in ypserv.conf Option Description host IP address. Wildcards are allowed. Examples are 131.234. = 131.234.0.0/255.255.0.0, and 131.234.214.0/255.255.254.0. map Identifies the name of the map, or you can use an asterisk for all maps. security The choices are: none, port, deny, and des. The option none always allows access. Mangle the passwd field if so configured; default is not to mangle. The option port allows access if the port is less than 1024. If mangle is not set, do not allow access. If mangle is yes, allow access and mangle the passwd field. The option deny is used to deny access to this map. The option des requires DES authentication. mangle The possible values are yes or no. If yes, the field entry is mangled. field Determines the field that should be mangled. The default is the second field. NOTE Some of the options mentioned in Table 11.4 use the term mangle. This means the field is replaced by x if the port check reveals that the request originated from an unprivileged user. Do not rely on the access rules to provide robust security. The access rules might slow down a cracker, but they will not stop him. page 204
Please visit our professional web hosting services to find out about cheap and reliable webhost service that will surely answer all your demands.
July 11th, 2007
Inside Linux stimpy $ cat ypservers ren.stimpy.net stimpy $ stimpy $ ls -al admin total 148 drwxr-xr-x 2 root root 1024 Feb 7 11:16 . drwxr-xr-x 3 root root 1024 Feb 7 11:15 .. -rw——-1 root root 12443 Feb 7 11:16 group.bygid -rw——-1 root root 12448 Feb 7 11:16 group.byname -rw——-1 root root 13287 Feb 7 11:16 netid.byname -rw——-1 root root 12454 Feb 7 11:16 passwd.byname -rw——-1 root root 12452 Feb 7 11:16 passwd.byuid -rw——-1 root root 16335 Feb 7 11:16 rpc.byname -rw——-1 root root 14210 Feb 7 11:16 rpc.bynumber -rw——-1 root root 30012 Feb 7 11:16 services.byname -rw——-1 root root 12369 Feb 7 11:16 ypservers stimpy $ The first map that ypinit creates is the ypservers map, found in the /var/yp directory. This is verified as a result of the ls -al command. The /var/yp/ypservers map file contains a list of hosts that will run as NIS servers. A new directory, /var/yp/admin, is created as a result of the ypinit command. The contents of this domain directory are new NIS maps. For every domain name that exists, a directory reflecting that name will exist within the /var/yp directory. Within each domain directory will be a number of map files. If you refer to the previous dialog, you will notice that the ypinit command queried for a list of hosts that will run NIS servers. The hosts are not required to be running at the time of executing ypinit but should be active NIS servers when it is appropriate. The contents of the /var/yp/ypservers file are also shown in the dialog. Executing ypserv -The Master Server Process After the ypinit command has completed its execution, you can start the NIS master server in one of two ways. You can reboot the system, which is not a productive choice (this is reserved for the Windows operating systems). The second method is to start the server manually, which is quite easy (this is reserved for Linux and UNIX operating systems). The usage for the ypserv command is shown as follows. ypserv [-b] [-d [path]] [-p port] Table 11.2 lists the options that are available to the ypserv command. Table 11.2. Options for the ypserv Command Option Description -d –debug [path] This option is used to execute the server in debug mode. Normally, ypserv reports errors using the syslog facility. The ypserv command will not run as a daemon with this option set. The optional parameter path defines the directory that ypserv should use, instead of /var/yp. -b –dns If the host is not found in the hosts maps, use this option to query the DNS for host information. -p –port port This option specifies the port that ypserv should bind to. -v -version This option prints the version number and exits. The following dialog demonstrates the execution of the ypserv command. stimpy $ ypserv stimpy $ stimpy $ ps x … 1880 tty1 S 0:00 /opt/Office51/bin/soffice.bin 5390 tty1 S 0:05 kvt -T ption Terminal -icon kvt.xpm -miniicon kvt.xpm 5391 pts/0 S 0:00 bash 5702 ? S 0:00 ypserv stimpy $ page 203
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.
July 11th, 2007
Inside Linux For example, the following dialog shows the current state of NIS (on my system) before executing the ypinit command. This is for a SuSE 6.3 Linux system. The YaST utility was first used to install both the ypserver and ypclient packages from the CD-ROM media. stimpy $ /var/yp Makefile nicknames ypmake.conf.sample stimpy $ ls -al total 20 drwxr-xr-x 2 root root 1024 Feb 7 10:22 . drwxr-xr-x 18 root root 1024 Feb 7 10:22 .. -rw-r–r–1 root root 13980 Nov 8 14:36 Makefile -rw-r–r–1 root root 185 Nov 8 14:36 nicknames -rw-r–r–1 root root 1114 Nov 8 14:36 ypmake.conf.sample stimpy $ I have not discussed the files that you see in the /var/yp directory. They are important, however, because they contribute to the build process. The /var/yp/nicknames file is a translation table for NIS maps. This file contains a list of aliases and the associated NIS maps. Each line contains a single entry. The following shows the contents of the file shown in the previous dialog: stimpy $ cat nicknames passwd passwd.byname group group.byname networks networks.byaddr hosts hosts.byname protocols protocols.bynumber services services.byname aliases mail.aliases ethers ethers.byname stimpy $ This is the default content for the file on this SuSE system. The ypmake.conf.sample is provided as a template for creating a true ypmake configuration file. Continuing with our efforts, the following dialog demonstrates the execution of the ypinit command on this system. In addition, other commands are executed (bold text) to show the results of the ypinit command. The domain name created on this system is admin. stimpy $ domainname admin stimpy $ domainname admin stimpy $ /usr/lib/yp/ypinit -m At this point, we have to construct a list of the hosts which will run NIS servers. ren.stimpy.net is in the list of NIS server hosts. Please continue to add the names for the other hosts, one per line. When you are done with the list, type a . next host to add: ren.stimpy.net next host to add: The current list of NIS servers looks like this: . ren.stimpy.net . Is this correct? [y/n: y] y We need some minutes to build the databases… Building /var/yp/admin/ypservers… Running /var/yp/Makefile… make[1]: Entering directory `/var/yp/admin’ Updating passwd.byname… failed to send ‘clear’ to local ypserv: RPC: Program not registered Updating passwd.byuid… failed to send ‘clear’ to local ypserv: RPC: Program not registered Updating group.byname… failed to send ‘clear’ to local ypserv: RPC: Program not registered Updating group.bygid… failed to send ‘clear’ to local ypserv: RPC: Program not registered Updating rpc.byname… failed to send ‘clear’ to local ypserv: RPC: Program not registered Updating rpc.bynumber… failed to send ‘clear’ to local ypserv: RPC: Program not registered Updating services.byname… failed to send ‘clear’ to local ypserv: RPC: Program not registered Updating netid.byname… failed to send ‘clear’ to local ypserv: RPC: Program not registered make[1]: Leaving directory `/var/yp/admin’ stimpy $ stimpy $ ls -al total 22 drwxr-xr-x 3 root root 1024 Feb 7 11:15 . drwxr-xr-x 18 root root 1024 Feb 7 10:22 .. -rw-r–r–1 root root 13980 Nov 8 14:36 Makefile drwxr-xr-x 2 root root 1024 Feb 7 11:16 admin -rw-r–r–1 root root 185 Nov 8 14:36 nicknames -rw-r–r–1 root root 1114 Nov 8 14:36 ypmake.conf.sample -rw-r–r–1 root root 15 Feb 7 11:15 ypservers stimpy $ page 202
We recommend cheap and reliable webhost to host and run your web applications: Coldfusion Web Hosting services.
July 10th, 2007
Inside Linux Table 11.1. Files Maintained by NIS File Description /etc/aliases Provides aliases and mailing lists for the mail system. /etc/bootparams Provides information about diskless nodes. /etc/ethers Provides MAC to IP mappings. /etc/group Provides group access information. /etc/hosts Provides IP address to hostname mappings. /etc/netgroup Identifies network group definitions used by NIS; this is specific to NIS. /etc/netmasks Provides IP network masks. /etc/networks Identifies network addresses. /etc/passwd Provides user access information. /etc/protocols Provides network protocol and number mappings. /etc/rpc Provides RPC numbers. /etc/services Provides port number to TCP/IP mappings. /etc/shadow Provides password information for user account. Not all systems employ shadow password functionality. All these files may not be supported by your distribution of Linux; be sure to check the documentation for details. Notice that the /etc/netgroup file is used by NIS; you should know that it is NIS specific and is not a part of the stock of administrative configuration files. Be sure to verify that any commands and directory paths are correct. Verify that all usernames have an associated password. You may have to consult the /etc/shadow file for this if your system uses shadow passwords. Ensuring that each account has a password will help in the fight against security breaches through NIS. If you will be using NIS to maintain other organizational-specific files, you should also ensure that these files are up to date. Executing the ypinit Command After you have determined that all your administrative files are up to date, the next action is to build the NIS maps. This is performed using the ypinit command. The ypinit command is used to build and install the NIS database. The following shows the usage for the ypinit command: ypinit [-m] [-s master_name] The ypinit command accepts two options, which are -m and -s master_name. The -m switch is used to identify that the local host is the NIS master. Because you are at the master server, you must execute ypinit with the -m switch. The following dialog demonstrates the invocation. stimpy $ ypinit -m stimpy $ The -s master_name option is used if you are at a slave server. It is used to set up the slave server with the map files from the master server. When the ypinit command executes, it builds the domain directory named /var/yp. Some versions may build the directory /etc/yp, so be sure to browse around the directory tree for the directory. The domain directory is created for the default domain. After the domain directory exists, the ypinit command generates the administrative maps necessary for your system and places those maps in the domain directory (/var/yp). page 201
Searching for affordable and proven webhost to host and run your servlet applications? Go to Linux Web Hosting services and you will find it.