1826501 Members
1598 Online
109692 Solutions
New Discussion

Re: NIS not working

 
Rene_17
Regular Advisor

NIS not working

I have installed a NIS Server on iff1 with SAM !
The server is enabled and also the client is enabled ! I can´t get infos about the nis maps on the machine !

ypcat passwd displays that there is no map available !

Starting the Master server was succesfull !
( ypinit -m DOM=iff )

Thats is the first problem and the second problem is when i want to install a slave server on iff0, then errors occurs.
( ypinit -s iff1 DOM=iff )

[iff1:]/root# ypcat passwd
ypcat: no such map in server's NIS domain
[iff1:]/root# ypwhich
iff1.uibk.ac.at

[iff0:]/root# ypcat passwd
ypcat: no such map in server's NIS domain
[iff0:]/root# ypwhich
iff1.uibk.ac.at

Syslog:

iff1:
Sep 3 08:19:24 iff1 syslog: ypserv: access denied for 138.232.81.2
Sep 3 08:19:19 iff1 syslog: ypserv: access denied for 138.232.81.1

What´s that mean ypserv acces denied ?
Acces denied to what ?

Regards,

Re
19 REPLIES 19
Elmar P. Kolkman
Honored Contributor

Re: NIS not working

Your NIS server only accepts slaves/clients that are in your securenets/secureservers files. Apparently 138.232.81.2 and 138.232.81.1 are not in those files...

For the no such map messages, check out /var/yp/iff and /var/yp/src on your server. It seems you set up NIS, without any maps. Perhaps running the 'make' command in /var/yp solves that issue. Or gives more hints as to what is missing.
Every problem has at least one solution. Only some solutions are harder to find.
Rene_17
Regular Advisor

Re: NIS not working

[iff1:]/var/yp# cat securenets
# securenets $Revision: 1.1.211.1 $ $Date: 96/10/09 11:26:11 $
#
# /var/yp/securenets file
#
# The format of this file is one of more lines of
#
# netmask netaddr
# Both netmask and netaddr must be dotted quads.
#
# Note that for a machine with two Ethernet interfaces (i.e. a gateway
# machine), the IP addresses of both have to be in /var/yp/securenets.
#
# for example:
#255.255.255.0 128.185.124.00
255.255.255.255 127.0.0.1
255.255.255.255 138.232.81.0
[iff1:]/var/yp# ls
Makefile binding passwd.nis updaters ypxfr_1perday
Makefile.org group.nis securenets ypbind.lock ypxfr_1perhour
auto.iff iff secureservers ypmake ypxfr_2perday
[iff1:]/var/yp# cat secureservers
# secureservers $Revision: 1.1.211.1 $ $Date: 96/10/09 11:25:31 $
#
# /var/yp/secureservers file
#
# The format of this file is one of more lines of
#
# netmask netaddr
# Both netmask and netaddr must be dotted quads.
#
# Note that for a machine with two Ethernet interfaces (i.e. a gateway
# machine), the IP addresses of both have to be in /var/yp/secureservers.
#
# for example:
#255.255.255.0 128.185.124.00
255.255.255.255 127.0.0.1
255.255.255.255 138.232.81.2
255.255.255.255 138.232.81.1
[iff1:]/var/yp#

[iff1:]/var/yp# make
`/var/yp/iff/passwd.time' is up to date.
`/var/yp/iff/group.time' is up to date.
`/var/yp/iff/hosts.time' is up to date.
`/var/yp/iff/networks.time' is up to date.
`/var/yp/iff/rpc.time' is up to date.
`/var/yp/iff/services.time' is up to date.
`/var/yp/iff/protocols.time' is up to date.
`/var/yp/iff/netgroup.time' is up to date.
`/var/yp/iff/aliases.time' is up to date.
`/var/yp/iff/publickey.time' is up to date.
`/var/yp/iff/netid.time' is up to date.
`/var/yp/iff/vhe_list.time' is up to date.
`/var/yp/iff/auto_master.time' is up to date.
[iff1:]/var/yp# ./ypmake

For NIS domain iff:

The passwd map(s) are up-to-date.
The group map(s) are up-to-date.
The hosts map(s) are up-to-date.
The networks map(s) are up-to-date.
The rpc map(s) are up-to-date.
The services map(s) are up-to-date.
The protocols map(s) are up-to-date.
The netgroup map(s) are up-to-date.
The aliases map(s) are up-to-date.
The vhe_list map(s) are up-to-date.
The publickey map(s) are up-to-date.
The netid map(s) are up-to-date.
The auto_master map(s) are up-to-date.

ypmake complete: no errors encountered.

[iff1:]/var/yp#

I have already made the maps !

iff1:]/var/yp# ls iff
aliases.time mail.aliases.dir networks.byname.dir rpc.byname.dir
auto.iff.dir mail.aliases.pag networks.byname.pag rpc.byname.pag
auto.iff.pag mail.byaddr.dir networks.time rpc.bynumber.dir
auto.master.dir mail.byaddr.pag passwd.byname.dir rpc.bynumber.pag
auto.master.pag netgroup.byhost.dir passwd.byname.pag rpc.time
auto_master.time netgroup.byhost.pag passwd.byuid.dir servi.bynp.dir
group.bygid.dir netgroup.byuser.dir passwd.byuid.pag servi.bynp.pag
group.bygid.pag netgroup.byuser.pag passwd.time services.byname.dir
group.byname.dir netgroup.dir protocols.byname.dir services.byname.pag
group.byname.pag netgroup.pag protocols.byname.pag services.time
group.time netgroup.time protocols.bynumber.dir vhe_list.dir
hosts.byaddr.dir netid.byname.dir protocols.bynumber.pag vhe_list.pag
hosts.byaddr.pag netid.byname.pag protocols.time vhe_list.time
hosts.byname.dir netid.time publickey.byname.dir ypservers.dir
hosts.byname.pag networks.byaddr.dir publickey.byname.pag ypservers.pag
hosts.time networks.byaddr.pag publickey.time
[iff1:]/var/yp#
Rene_17
Regular Advisor

Re: NIS not working

I have updated the /var/yp/passwd.nis

SEE:

[iff1:]/var/yp# make
updated passwd
Finding NIS servers:Map ypslaves.iff1 unknown NIS client error code -- using ypservers
Can't build server list from map "ypservers". Reason: no such map in server's NIS domain
*** Error exit code 1
`/var/yp/iff/group.time' is up to date.
`/var/yp/iff/hosts.time' is up to date.
`/var/yp/iff/networks.time' is up to date.
`/var/yp/iff/rpc.time' is up to date.
`/var/yp/iff/services.time' is up to date.
`/var/yp/iff/protocols.time' is up to date.
`/var/yp/iff/netgroup.time' is up to date.
`/var/yp/iff/aliases.time' is up to date.
`/var/yp/iff/publickey.time' is up to date.
updated netid
Finding NIS servers:Map ypslaves.iff1 unknown NIS client error code -- using ypservers
Can't build server list from map "ypservers". Reason: no such map in server's NIS domain
*** Error exit code 1
`/var/yp/iff/vhe_list.time' is up to date.
`/var/yp/iff/auto_master.time' is up to date.
[iff1:]/var/yp#
Ermin Borovac
Honored Contributor

Re: NIS not working

If your securenets file correct?

255.255.255.255 138.232.81.0

securenets controls access to NIS server and with this line allows access to single host with IP 138.232.81.0.

Did you mean to allow access to any host on 138.232.81 subnet instead? Then use 255.255.255.0 instead of 255.255.255.255.

255.255.255.0 138.232.81.0

Rene_17
Regular Advisor

Re: NIS not working

Network:

iff0 138.232.81.1/255.255.255.192
iff1 138.232.81.2/255.255.255.192

Rene_17
Regular Advisor

Re: NIS not working

iff0 and iff1 have two ethernet cards installed

I have added the second net to the securenets and the secureservers !

securenets:
255.255.255.255 127.0.0.1
255.255.255.255 138.232.81.0
255.255.255.0 192.168.1.0

secureservers:

255.255.255.255 127.0.0.1
255.255.255.255 138.232.81.2
255.255.255.255 138.232.81.1
255.255.255.0 192.168.1.2
255.255.255.0 192.168.1.1

Doyou think the network adress of the 138 net is not correct ?

Regards,

Rene
Rene_17
Regular Advisor

Re: NIS not working

/var/yp/src doesnt exists !
melvyn burnard
Honored Contributor

Re: NIS not working

I suggest you now log a formal call with your local HP Response Centre for help on this.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Rene_17
Regular Advisor

Re: NIS not working

Look at that !

[iff1:]/var/yp# /sbin/init.d/nis.server start
starting NIS SERVER networking
starting up the rpcbind
rpcbind already started, using pid: 526
domainname iff
starting up the Network Information Service
starting up the ypserv daemon
FAILURE CODE: 1
starting up the ypxfrd daemon
FAILURE CODE: 1
starting up the rpc.yppasswdd daemon
rpc.yppasswdd already started, using pid: 13862
starting up the rpc.ypupdated daemon
rpc.ypupdated already started, using pid: 6236
starting up the keyserv daemon
keyserv already started, using pid: 6241
[iff1:]/var/yp#

The daemons are not starting ?
Rene_17
Regular Advisor

Re: NIS not working

The client and the master server is running !
I add a new user to nis look !

[iff1:]/var/yp# make
updated passwd
Finding NIS servers:Map ypslaves.iff1 unknown NIS client error code -- using ypservers
Can't build server list from map "ypservers". Reason: no such map in server's NIS domain
*** Error exit code 1
`/var/yp/iff/group.time' is up to date.
`/var/yp/iff/hosts.time' is up to date.
`/var/yp/iff/networks.time' is up to date.
`/var/yp/iff/rpc.time' is up to date.
`/var/yp/iff/services.time' is up to date.
`/var/yp/iff/protocols.time' is up to date.
`/var/yp/iff/netgroup.time' is up to date.
`/var/yp/iff/aliases.time' is up to date.
`/var/yp/iff/publickey.time' is up to date.
updated netid
Finding NIS servers:Map ypslaves.iff1 unknown NIS client error code -- using ypservers
Can't build server list from map "ypservers". Reason: no such map in server's NIS domain
*** Error exit code 1
`/var/yp/iff/vhe_list.time' is up to date.
`/var/yp/iff/auto_master.time' is up to date.
[iff1:]/var/yp#

The make command reported an error !

Regards,

Rene
Elmar P. Kolkman
Honored Contributor

Re: NIS not working

In your securenets file, change this line
255.255.255.255 138.232.81.0
to
255.255.255.0 138.232.81.0
I think it will help...
Every problem has at least one solution. Only some solutions are harder to find.
V. Nyga
Honored Contributor

Re: NIS not working

Hi Rene,

could it be that your domain isn't set correctly?

What does /etc/rc.log says about 'Start NIS Server subsystem'?

Your domain is 'iff'?
It says:
Finding NIS servers:Map ypslaves.iff1 unknown NIS client

Or client 'iff1' isn't set corretly in /etc/hosts?

Or check /etc/rc.config.d/namesvrs for correct settings at both workstations.
NIS_DOMAIN="iff" ?

Just some thoughts
Volkmar
*** Say 'Thanks' with Kudos ***
Rene_17
Regular Advisor

Re: NIS not working

Must I add + to passwd accounts, that the nis works ?
G. Vrijhoeven
Honored Contributor

Re: NIS not working

Rene,

in /etc/passwd end with:
+::-2:-2:::
in /etc/group end with:
+:*:*
in /etc/nsswitch.conf:
passwd: compat
group: compat

HTH,

Gideon
Robert-Jan Goossens
Honored Contributor

Re: NIS not working

Yes, Rene for the NIS accounts add a + NOT for your local accounts like ROOT.

Regards,
Robert-Jan
Rene_17
Regular Advisor

Re: NIS not working

Can anyone give me an step by step manual for NIS !

Reagards,

Rene
Dino_4
Frequent Advisor

Re: NIS not working

Rene_17
Regular Advisor

Re: NIS not working

That´s now my problem !

[iff1:]/etc/rc.config.d# /sbin/init.d/nis.server start
starting NIS SERVER networking
starting up the rpcbind
rpcbind already started, using pid: 528
domainname iff
starting up the Network Information Service
starting up the ypserv daemon
FAILURE CODE: 1
starting up the ypxfrd daemon
FAILURE CODE: 1
starting up the rpc.yppasswdd daemon
rpc.yppasswdd already started, using pid: 556
starting up the rpc.ypupdated daemon
rpc.ypupdated already started, using pid: 561
starting up the keyserv daemon
keyserv already started, using pid: 566

The server daemon don´t start correct
Dave Olker
Neighborhood Moderator

Re: NIS not working

Hi Rene,

It sounds like your NIS configuration is pretty messed up right now. In cases like this, I usually recommend wiping out the configuration and starting over again.

Here are the steps I'd take:

1. Delete any directories of maps under /var/yp. They will be called /var/yp/. There may be more than one if you've tried creating NIS domains more than once on this system.

# cd /var/yp
# rm -rf

2. Delete any information in the /var/yp/binding directory

# cd /var/yp/binding
# rm -rf *

3. Replace the /etc/rc.config.d/namesvrs file with the default one

# cp /usr/newconfig/etc/rc.config.d/namesvrs /etc/rc.config.d/namesvrs

4. Replace the /etc/nsswitch.conf file with the default "files" version

# cp /etc/nsswitch.files /etc/nsswitch.conf

5. Reboot the system to clear out any cached information regarding the old NIS domain

6. After reboot issue the following:

# domainname
# ypinit -m

At this point, you might want to only build the primary and not include any secondary, just to ensure that you can correctly build the NIS primary and get it working properly before moving on to secondary.

7. Once ypinit finishes, make sure it didn't return any errors. If it didn't, then modify your /etc/rc.config.d/namesvrs file by changing the following lines:

NIS_primary_SERVER=1
NIS_CLIENT=1
NIS_DOMAIN=

8. Manually start the NIS server daemons before the client daemons:

# /sbin/init.d/nis.server start

if the daemons start properly then start the client

# /sbin/init.d/nis.client start

9. Verify that the client can bind to the server and retrieve map information:

# ypcat -k passwd
# ypwhich -m

If all of these steps work properly then we can move on to configuring a secondary server, but I think you need to successfully build the primary and verify that it works before trying to configure a secondary.

Regards,

Dave



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo