Re: NIS troubles Keith Keller wrote:
> On 2005-02-17, Mark Johnson <mXrXj001@shaw.ca> wrote:
>
>>I originally had "enterprise.yp" in my /etc/defaultdomain file, but
>>changed it to "enterprise" thinking that maybe it didn't like the name.
>
>
> If you are changing NIS domain names, you must run nisdomainname to do
> it. /etc/defaultdomain is only read on boot by Slackware's boot scripts
> (rc.yp, IIRC).
>
Actually, nisdomainname is run by the rc.yp script at boot-time:
if [ -r /etc/defaultdomain ]; then
nisdomainname `cat /etc/defaultdomain`
fi
and I have rebooted the system in trying to get NIS to work.
> Try this:
>
> * shut down all yp* services on clients and server
> * run nisdomainname myname on server and clients
> * start ypserv on the server
> * start ypbind on the clients
>
AHA. ypwhich -m now produces the following output (client and server):
group.bygid enterprise.mrj
group.byname enterprise.mrj
passwd.byuid enterprise.mrj
passwd.byname enterprise.mrj
which looks reasonable. Also, I can log in to my client system using an
account from the server, which is the entire point of this exercise.
I'm not sure why doing this fixed it since it looks like the same sort
of thing a reboot would do in running the rc.yp script at boot time. I
hesitate to reboot now to test it.
>
>> However, the error message changed not at all (including the fact that
>>it doesn't use the new name, despite a reboot).
>
>
> What does nisdomainname (without the name) say? If it has your old
> domainname, then something else is b0rked.
The nisdomainname produced the correct (new) output.
>
> --keith
>
Thanks,
Mark |