Unix Technical Forum

NIS troubles

This is a discussion on NIS troubles within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> I am trying to set up NIS for two slackware 10 systems - one master server, and one client. ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-20-2008, 06:15 AM
Mark Johnson
 
Posts: n/a
Default NIS troubles

I am trying to set up NIS for two slackware 10 systems - one master
server, and one client. This is just so that I will have the same user
accounts, etc for the two systems.

I followed the directions in the NIS HOWTO, but I get the following
error on the server:
mj@enterprise:~/seti$ ypwhich -m
Can't get map list for domain enterprise. Reason: Can't bind to server
which serves this domain


If I run ypserv with the -d option, it prints out this:
root@enterprise:/var/yp# ypserv -d
[ypserv (ypserv) 2.13]

Find securenet: 255.0.0.0 255.0.0.0
Find securenet: 255.255.255.0 255.255.255.0
ypserv.conf: 192.168.1.0/192.168.1.0:*:*:0
ypproc_domain_nonack("enterprise.yp") [From: 192.168.1.3:32781]
-> Ignored (not a valid domain)


I originally had "enterprise.yp" in my /etc/defaultdomain file, but
changed it to "enterprise" thinking that maybe it didn't like the name.
However, the error message changed not at all (including the fact that
it doesn't use the new name, despite a reboot).

Mark
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-20-2008, 06:16 AM
Henrik Carlqvist
 
Posts: n/a
Default Re: NIS troubles

I don't do this NIS-server-thing very often (it was a few years since the
last time), but I will try to help anyway.

Mark Johnson <mXrXj001@shaw.ca> wrote:
> I followed the directions in the NIS HOWTO, but I get the following
> error on the server:
> mj@enterprise:~/seti$ ypwhich -m
> Can't get map list for domain enterprise. Reason: Can't bind to server
> which serves this domain


On the server you should be running both ypserv and ypbind. Did you also
start ypbind?

> If I run ypserv with the -d option, it prints out this:
> root@enterprise:/var/yp# ypserv -d
> [ypserv (ypserv) 2.13]
>
> Find securenet: 255.0.0.0 255.0.0.0
> Find securenet: 255.255.255.0 255.255.255.0 ypserv.conf:
> 192.168.1.0/192.168.1.0:*:*:0 ypproc_domain_nonack("enterprise.yp")
> [From: 192.168.1.3:32781]
> -> Ignored (not a valid domain)
>
>
> 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 I remember right defaultdoamin is for ypbind but ypserv uses data from
ypserv.conf. Maybe your ypserv.conf says something about "enterprise.yp"?

regards Henrik
--
The address in the header is only to prevent spam. My real address is:
hc2(at)uthyres.com Examples of addresses which go to spammers:
info@k-software.biz svar@webtelevision.se info@webrider.ru root@localhost

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-20-2008, 06:17 AM
Mark Johnson
 
Posts: n/a
Default Re: NIS troubles

Henrik Carlqvist wrote:
> I don't do this NIS-server-thing very often (it was a few years since the
> last time), but I will try to help anyway.
>
> Mark Johnson <mXrXj001@shaw.ca> wrote:
>
>>I followed the directions in the NIS HOWTO, but I get the following
>>error on the server:
>>mj@enterprise:~/seti$ ypwhich -m
>>Can't get map list for domain enterprise. Reason: Can't bind to server
>>which serves this domain

>
>
> On the server you should be running both ypserv and ypbind. Did you also
> start ypbind?
>
>
>>If I run ypserv with the -d option, it prints out this:
>>root@enterprise:/var/yp# ypserv -d
>>[ypserv (ypserv) 2.13]
>>
>>Find securenet: 255.0.0.0 255.0.0.0
>>Find securenet: 255.255.255.0 255.255.255.0 ypserv.conf:
>>192.168.1.0/192.168.1.0:*:*:0 ypproc_domain_nonack("enterprise.yp")
>>[From: 192.168.1.3:32781]
>> -> Ignored (not a valid domain)
>>
>>
>>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 I remember right defaultdoamin is for ypbind but ypserv uses data from
> ypserv.conf. Maybe your ypserv.conf says something about "enterprise.yp"?
>
> regards Henrik

Starting ypbind on the server did not help.

I removed the "enterprise" directory from /var/yp, changed
/etc/defaultdomain to "johnson", and redid the "make" in this directory.
I still have the same error. In fact, it still prints the
"enterprise.yp" domain name in the error.

My ypserv.conf is as follows:
192.168.1.0/255.255.255.0:*:*:none
This is all I put in it, since none of the options described in the man
page seemed to need changing from their defaults.

I also updated yp.conf to tell it where to look for the server for the
"johnson" domain. This did not help.

I have noticed that I must use a fully qualified domain name or else the
dig command fails to resolve names on my LAN, despite having a "domain"
entry in resolv.conf. Since I am now using FQDNs in my config files for
NIS, I believe this to be a separate issue.

Googling on "not a domain" and "ignored" has not been helpful either. I
only found a posting to a newsgroup by someone having the same problem
as me, and who did not get any answers.

Mark

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-20-2008, 06:17 AM
Keith Keller
 
Posts: n/a
Default Re: NIS troubles

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).

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

> 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.

--keith

--
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom
see X- headers for PGP signature information

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-20-2008, 06:17 AM
E. Charters
 
Posts: n/a
Default Re: NIS troubles

This might work --- on the master NIS server

In Makefile do this. (they are reversed as to comments-out)

B=-b
#B=

cd /var/yip
rm host.time
make hosts.time

you could try a "domain" directive in resolv.conf

perhaps -->

you cannot use "search" in resolv.conf

in resolv.conf -- set the NIS domainname to a domain -- set a . or + in
front of the domain name, so NIS sees the "whole thing".



Mark Johnson wrote:
> Henrik Carlqvist wrote:
>
>> I don't do this NIS-server-thing very often (it was a few years since the
>> last time), but I will try to help anyway.
>>
>> Mark Johnson <mXrXj001@shaw.ca> wrote:
>>
>>> I followed the directions in the NIS HOWTO, but I get the following
>>> error on the server:
>>> mj@enterprise:~/seti$ ypwhich -m
>>> Can't get map list for domain enterprise. Reason: Can't bind to
>>> server which serves this domain

>>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-20-2008, 06:17 AM
Keith Keller
 
Posts: n/a
Default Re: NIS troubles

On 2005-02-17, E. Charters <echarters@sympatico.ca> wrote:
> This might work --- on the master NIS server
>
> In Makefile do this. (they are reversed as to comments-out)
>
> B=-b
> #B=


Did you read the comment related to this variable? It's only applicable
for SunOS NIS clients.

> you could try a "domain" directive in resolv.conf


resolv.conf applies only to DNS, *not* to NIS!

> perhaps -->
>
> you cannot use "search" in resolv.conf
>
> in resolv.conf -- set the NIS domainname to a domain -- set a . or + in
> front of the domain name, so NIS sees the "whole thing".


Your NIS domainname should not be the same as your DNS domain.

More NIS info: http://www.tldp.org/HOWTO/NIS-HOWTO/

--keith

--
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom
see X- headers for PGP signature information

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-20-2008, 06:17 AM
E. Charters
 
Posts: n/a
Default Re: NIS troubles


>
>>you could try a "domain" directive in resolv.conf

>
>
> resolv.conf applies only to DNS, *not* to NIS!


# no, that is not how it works. NIS will look for hosts in
DNS and hosts files too. It uses resolv.conf. At least it
does in some systems.

>
>
>>perhaps -->
>>
>>you cannot use "search" in resolv.conf


OK, that is sun specific.


> Your NIS domainname should not be the same as your DNS domain.


# true.

You could puts "nis" in your hosts.conf file under order

Also perhaps /etc/defaultdomain should be set.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-20-2008, 06:17 AM
Keith Keller
 
Posts: n/a
Default Re: NIS troubles

On 2005-02-18, E. Charters <echarters@sympatico.ca> wrote:
>

[ > I wrote: (please don't snip attributions!) ]
[ >> E. Charters <echarters@sympatico.ca> wrote: ]

>>>you could try a "domain" directive in resolv.conf

>>
>> resolv.conf applies only to DNS, *not* to NIS!

>
> # no, that is not how it works. NIS will look for hosts in
> DNS and hosts files too. It uses resolv.conf. At least it
> does in some systems.


NIS will look *up* hosts if told to, but that's not the OP's problem.
His problem is that his NIS server is not using the correct
nisdomainname. Modifying resolv.conf will not address this problem.

(In any case, IIRC resolv.conf won't actually affect NIS name lookups,
since it's used by the BIND resolver libraries. You configure NIS host
maps completely separate from resolv.conf. And at any rate, the OP
doesn't even need an NIS host map!)

> You could puts "nis" in your hosts.conf file under order


Neither will this address the OP's problem.

> Also perhaps /etc/defaultdomain should be set.


The OP said he already did this! In addition, you snipped the part
where I wrote that /etc/defaultdomain is *only* used by rc.yp, and not
by any of the actual yp* binaries. Only nisdomainname actually sets the
NIS domain name (and nisdomainname is called by rc.yp).

--keith

--
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom
see X- headers for PGP signature information

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-20-2008, 06:18 AM
Mark Johnson
 
Posts: n/a
Default 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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-20-2008, 06:18 AM
Mark Johnson
 
Posts: n/a
Default Re: NIS troubles

Keith Keller wrote:
>
> NIS will look *up* hosts if told to, but that's not the OP's problem.
> His problem is that his NIS server is not using the correct
> nisdomainname. Modifying resolv.conf will not address this problem.
>

Actually, I consider the real problem to be the "Not a valid domain"
error. I believe the name issue to be secondary. i.e. not the primary
problem. I was trying to change the name because it was originally the
same as the DNS name, which it should not be. However, my understanding
is that that should not cause it to fail.

Both problems look solved now.

> (In any case, IIRC resolv.conf won't actually affect NIS name lookups,
> since it's used by the BIND resolver libraries. You configure NIS host
> maps completely separate from resolv.conf. And at any rate, the OP
> doesn't even need an NIS host map!)
>

I started looking at resolv.conf because the "dig" program would not
resolve "enterprise". It was making my DNS go out to the root servers
of the internet looking for a top-level domain called "enterprise",
which, naturally there isn't one.

nslookup does resolve "enterprise" into "enterprise.mrj". Apparently,
dig does not pay attention to domain/search directives in resolv.conf,
but nslookup does.

So the resolv,conf was a red herring on my part. I was also messing
with it due to the unreliability of my ISP's DNS (which is a big part of
why I run my own!).

Mark
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:40 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com