redhat 7.2 NIS+ client

Carroll, Jim P jcarro10 at sprintspectrum.com
Tue Jun 25 08:43:10 EST 2002


Here's a suggestion I borrowed from the list archives.  Use the following
for your /etc/init.d/nisplus file:

-----------[snip]-------------
#!/bin/sh
#
# nisplus:              Starts the Network Information Service Plus Daemon
#
# chkconfig: - 14 86
# description:  This is a daemon which handles passwd and group lookups \
#               for running programs and cache the results for the next \
#               query.  You should start this daemon only if you use \
#               slow Services like NIS or NIS+
# processname: nisplus
#

# Sanity checks.
[ -f /etc/defaultdomain ] || exit 0
[ -f /var/nis/NIS_COLD_START ] || exit 0
[ -x /bin/nisdomainname ] || exit 0
[ -x /usr/sbin/nisinit ] || exit 0
[ -x /usr/sbin/keyserv ] || exit 0

# Source function library.
. /etc/rc.d/init.d/functions

# See how we were called.
case "$1" in
    start)
        echo -n "Starting NIS+ services: "
        nisdomainname `cat /etc/defaultdomain`
        nisinit -c -C /var/nis/NIS_COLD_START
        daemon keyserv
        if [ ! -f /etc/.rootkey ]; then
             chkey -p -s nisplus
        fi
        echo
        touch /var/lock/subsys/nisplus
        ;;
    stop)
        echo -n "Stopping NIS+ Daemon: "
        killproc automount
        killproc keyserv
        rm -f /var/lock/subsys/nisplus
        echo nis+
        ;;
  status)
        status nisplus
        ;;
  restart)
        $0 stop
        $0 start
        ;;
    *)
        echo "Usage: $0 {start|stop|status|restart}"
        ;;
esac
exit 0
-----------[snip]-------------

HTH.

jc

> -----Original Message-----
> From: Kristen J. McFadden [mailto:kjm31 at genome5.cpmc.columbia.edu]
> Sent: Monday, June 24, 2002 4:59 PM
> To: linux-nisplus at lists.samba.org
> Subject: RE: redhat 7.2 NIS+ client
> 
> 
> Hey All,
> 
> I *almost* have it running.  Thanks much for the tips.  
> 
> Here's my only problem:
> 
> I can get it to bind to the NIS+ server, finger users, login, 
> everything
> BUT I cannot get it to load properly on reboot.
> 
> When I reboot I do see "Starting NIS+ Services... [OK]"
> but when I finger a user after logging in as root it says "no 
> such user".
> 
> I then do 
> /etc/init.d/nisplus stop
> domainname cgc.columbia.edu
> /etc/init.d/nisplus start
> 
> and it works!
> 
> I have a file /etc/defaultdomain with cgc.columbia.edu -- is 
> there someplace else where I can specify it properly??
> 
> Another thread said to put "NISDOMAIN=cgc.columbia.edu" in my 
> /etc/sysconfig/network file, I tried that, no dice either.
> 
> 
> Thanks a million,
> Kristen
> 
> 
> -----Original Message-----
> From: Bob Edwards [mailto:Robert.Edwards at anu.edu.au]
> Sent: Monday, June 24, 2002 4:41 PM
> To: Kristen J. McFadden
> Cc: linux-nisplus at lists.samba.org
> Subject: Re: redhat 7.2 NIS+ client
> 
> 
> "Kristen J. McFadden" wrote:
> > 
> > Hi,
> > 
> > I am completely new to NIS+ and have inherited a Solaris 8 
> NIS+ server.  We have some new Linux (redhat 7.2) boxes and 
> we want to set them up as NIS+ clients to this server.  
> However, I'm not even sure where to begin.
> > 
> > I read a post from back in December where the respondent 
> suggested NOT to use the nis-utils-1.4 release -- instead to 
> use 1.3, and I am wondering if people have been able to use 
> the latest nis-utils-1.4.1 release and make it work.
> > 
> > I downloaded and compiled nis-utils-1.4.1 on a test redhat 7.2 box.
> > 1. What do I have to do on the Solaris server machine to 
> make it work?
> > 2. I don't think I need a pam-aware login.  I guess then I 
> wouldn't have to compile the pam_unix stuff -- or is it a 
> requirement for nisplus support?
> > 3.  Any other pointers for how to set it up properly?
> > 
> > Thanks,
> > Kristen
> 
> 
> I think that I may have been the respondent who suggested NOT using
> nis-utils-1.4. We have been using nis-utils-1.4.1 with both RH7.2 and
> RH7.3 all year with no problems at all.
> 
> On the solaris machine, run the nisclient command to create a 
> credential
> for your Linux client (need to have an entry in the 
> hosts.org_dir map on
> the server first for the IP address of the Linux client).
> 
> Once you have the nis-utils compiled and installed and the credential
> set up on the server, set up the domainname, copy over a good copy
> of /var/nis/NIS_COLDSTART from a Solaris client or elsewhere, run the
> keyserv process and then run chkey -p to set up the 
> /etc/.rootkey file.
> 
> Once those steps are complete, you should be able to run nisdefaults
> and get a response that _doesn't_ include the string "(not 
> authenticated)"
> on the end of the first line.
> 
> Cheers,
> 
> Bob Edwards.
> 




More information about the linux-nisplus mailing list