Unlimited web hosting - Inside Linux For example, for version 6.3 of
Tuesday, July 10th, 2007Inside Linux For example, for version 6.3 of SuSE Linux, the /etc/rc.d/boot file contains the following snippet to set the NIS domain name: # set hostname and domainname # test -n “$FQHOSTNAME” &&{ ECHO_RETURN=$rc_done echo -n Setting up hostname hostname ${FQHOSTNAME%%.*} || ECHO_RETURN=$rc_failed echo -e “$ECHO_RETURN” } test -n “$YP_DOMAINNAME” &&{ ECHO_RETURN=$rc_done echo -n Setting YP up domainname domainname $YP_DOMAINNAME || ECHO_RETURN=$rc_failed echo -e “$ECHO_RETURN” } || domainname “” # set and adjust the CMOS clock … After setting the hostname, the domain name is set to the appropriate value. Setting the domain name, even if you are not using NIS, will do no harm. For Red Hat Linux version 6.1, the domain name is set in the /etc/rc.d/rc.sysinit startup file. The following is a snippet from the file showing the call to the domainname command. # Set the NIS domainname if [ -n “$NISDOMAIN” ]; then action “Setting NIS domainname $NISDOMAIN” domainname $NISDOMAIN else domainname “” fi … For the Slackware Linux distribution, the domain name is set in the /etc/rc.d/rc.inet2 startup file. The following is a snippet from the file showing the call to the domainname command: # # First, we must set the NIS domainname. NOTE: this is not # # necessarily the same as your DNS domainname, set in # # /etc/resolv.conf! The NIS domainname is the name of a domain # # served by your NIS server. # if [ -r /etc/defaultdomain ]; then nisdomainname `cat /etc/defaultdomain` fi # # Then, we start up ypbind. It will use broadcast to find a server. if [ -d /var/yp ] ; then echo -n ” ypbind” ${NET}/ypbind fi # # If you are the NIS master server for the NIS domain, then # # you must run rpc.yppasswdd, which is the RPC server that # # lets users change their passwords. if [ -x ${NET}/rpc.yppasswdd ]; then echo -n ” yppasswdd” ${NET}/rpc.yppasswdd fi … For TurboLinux version 4.0, the domain name is set in the /etc/rc.d/rc.sysinit startup file (as in Red Hat). The following is a snippet from the file showing the call to the domainname command: # Set the NIS domain name if [ -n “$NISDOMAIN” ]; then domainname $NISDOMAIN else domainname “” fi … Now that the domain name has been established for the server, the next step is to validate the various administrative files. For every file, examine each entry for validity and remove any unwanted or expired entries. It is imperative that you have only the entries that your system will require. Doing this will ensure that the NIS map files contain only valid information. This will also ensure that your system is less susceptible to security violations. Some of the files that you should visit and validate are shown in Table 11.1. page 200
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.