# NIS server doesn't answer ypbind

**URL:** <https://forums.rockylinux.org/t/nis-server-doesnt-answer-ypbind/16250>\
**Category:** Rocky Linux Help & Support\
**Created:** [October 17, 2024, 3:53pm UTC](https://forums.rockylinux.org/t/nis-server-doesnt-answer-ypbind/16250 "2024-10-17T15:53:32Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![james-p](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@james-p](https://forums.rockylinux.org/u/james-p)\
**Post date:** [October 30, 2024, 11:10am UTC](https://forums.rockylinux.org/t/nis-server-doesnt-answer-ypbind/16250/41 "2024-10-30T11:10:46Z")

</div>

Did a restart of rpcinfo (or reboot) on the NIS master help ?

If not, can you re-run the tcpdumps on the client and NIS master, but this time use `-i any` i.e. on the NIS master:

```auto
tcpdump -i any -tt -s 0 -w /path/to/master.pcap port 111

```

and on the client:

```auto
tcpdump -i any -tt -s 0 -w /path/to/client.pcap port 111

```

Then on the client run:

```auto
ypbind -d

```

and upload to pcap files

---

<div class="post-metadata">

**Author:** ![jamesyam](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@jamesyam](https://forums.rockylinux.org/u/jamesyam)\
**Post date:** [October 30, 2024, 3:42pm UTC](https://forums.rockylinux.org/t/nis-server-doesnt-answer-ypbind/16250/42 "2024-10-30T15:42:38Z")

</div>

There was no difference even after reboot or restart rpcbind on NIS master.

[master.pcap](https://astri-my.sharepoint.com/:u:/g/personal/jamesyam_astri_org/EcsWCPvceoFIg2zF9bszcCkB00Nt_lPEcstUGvmYW8YTmA?e=yCgseY)

[client.pcap](https://astri-my.sharepoint.com/:u:/g/personal/jamesyam_astri_org/ER3U_w6cfTRJuX8Mmv7eIRYBih__ASlYHygJJLsGpOqSFg?e=mFtdRc)

Also about the failure in ypbind on NIS master, after I setup the yp.conf file, the failure in “systemctl” was cleared. (For I know that, i.e. on the NIS master, I setup a ypbind as the NIS client on this server.) Then now, I can run “ypwhich -x” on this NIS master and get the passwd and other NIS information.

With the above response, can I assume that the problem is coming from the connection between the NIS master server and other client servers? Since, the ypbind on the local NIS master can get the passwd information from the local ypserv (i.e. not through the router - 10.6.126.1) by ypwhich.

If my above understanding was correct, one more possible firewall (inside the router) might be there. However, I could not log in to the router today. (The router is quite old.)

Is it possible?

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [October 30, 2024, 3:52pm UTC](https://forums.rockylinux.org/t/nis-server-doesnt-answer-ypbind/16250/43 "2024-10-30T15:52:08Z")

</div>

Why would the traffic go through the router, if both machines are on the same subnet?  
They should be talking directly with each other.

---

<div class="post-metadata">

**Author:** ![jamesyam](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@jamesyam](https://forums.rockylinux.org/u/jamesyam)\
**Post date:** [October 30, 2024, 4:34pm UTC](https://forums.rockylinux.org/t/nis-server-doesnt-answer-ypbind/16250/44 "2024-10-30T16:34:39Z")

</div>

Yes, they are under 10.6.126.0/24 (which is managed by that router). So, do you mean that even there was a firewall inside the router, it could not influence the communication between two servers?

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [October 30, 2024, 7:58pm UTC](https://forums.rockylinux.org/t/nis-server-doesnt-answer-ypbind/16250/45 "2024-10-30T19:58:19Z")

</div>

Router _forwards_ traffic between different subnets. Router is a _gateway_ between subnets. The firewall in the router affects the _routed_ traffic.

If this is a many-in-one home router, then it probably has about four “LAN” ports for wired clients in one subnet. That part of the device is a _switch_. The routing (and filtering) is between switch and the “WAN” port.

---

<div class="post-metadata">

**Author:** ![james-p](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@james-p](https://forums.rockylinux.org/u/james-p)\
**Post date:** [October 31, 2024, 10:14am UTC](https://forums.rockylinux.org/t/nis-server-doesnt-answer-ypbind/16250/46 "2024-10-31T10:14:46Z")

</div>

The new pcap files didn’t show any more info - have you restarted rpcbind on the NIS master ?

If so, has it made any difference ?

If not, then maybe an strace of the rpcbind process on the NIS master may give more clues:

```auto
strace -tt -o /path/to/output -f -s 128 -p $(pidof /usr/bin/rpcbind)

```

and then run on the client:

```auto
ypbind -d

```

---

<div class="post-metadata">

**Author:** ![jamesyam](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@jamesyam](https://forums.rockylinux.org/u/jamesyam)\
**Post date:** [November 2, 2024, 7:30am UTC](https://forums.rockylinux.org/t/nis-server-doesnt-answer-ypbind/16250/47 "2024-11-02T07:30:12Z")

</div>

After restart the rpcbind, there is no difference. (Remark: 1956290 is the result of pidof /usr/bin/rpcbind)

```auto
sudo strace -tt -o ~/master_rpcbind.txt -f -s 128 -p 1956290
strace: Process 1956290 attached

vi ~/master_rpcbind.txt
1956290 15:25:15.736709 restart_syscall(<... resuming interrupted poll ...> <detached ...>

```

---

<div class="post-metadata">

**Author:** ![james-p](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@james-p](https://forums.rockylinux.org/u/james-p)\
**Post date:** [November 4, 2024, 12:07pm UTC](https://forums.rockylinux.org/t/nis-server-doesnt-answer-ypbind/16250/48 "2024-11-04T12:07:21Z")

</div>

Strange you don’t get any strace output ?

You could try something like this on the NIS master:

```auto
systemctl stop rpcbind.socket
strace -tt -o ~/master_rpcbind.txt -f -s 128 /usr/bin/rpcbind -w -d -f

```

Then run on the client:

```auto
systemctl stop ypbind
ypbind -d

```

You will need to restart rpcbind on the NIS master after doing the above:

```auto
systemctl restart rpcbind.socket

```

---

<div class="post-metadata">

**Author:** ![jamesyam](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@jamesyam](https://forums.rockylinux.org/u/jamesyam)\
**Post date:** [November 5, 2024, 1:27am UTC](https://forums.rockylinux.org/t/nis-server-doesnt-answer-ypbind/16250/49 "2024-11-05T01:27:37Z")

</div>

Yes.

And the attached file is the result of the above command

`strace -tt -o ~/master_rpcbind.txt -f -s 128 /usr/bin/rpcbind -w -d -f`

[master\_rpcbind.txt](https://astri-my.sharepoint.com/:t:/g/personal/jamesyam_astri_org/ERqJ2lIQGBZBrmeGSrrlhGkBJkVokC1nLwjf8U8Sonj2XA?e=R3YJCf)

---

<div class="post-metadata">

**Author:** ![james-p](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@james-p](https://forums.rockylinux.org/u/james-p)\
**Post date:** [November 5, 2024, 9:50am UTC](https://forums.rockylinux.org/t/nis-server-doesnt-answer-ypbind/16250/50 "2024-11-05T09:50:59Z")

</div>

I can’t see any sign of requests from 10.6.126.25 in that strace - so it looks like the UDP requests are not getting as far as the rpcbind process ?

Is it just this client that is having problems - does NIS work OK on other clients ?

---

<div class="post-metadata">

**Author:** ![jamesyam](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@jamesyam](https://forums.rockylinux.org/u/jamesyam)\
**Post date:** [November 7, 2024, 10:09am UTC](https://forums.rockylinux.org/t/nis-server-doesnt-answer-ypbind/16250/51 "2024-11-07T10:09:56Z")

</div>

No, I set another NIS client on another machine (Ubuntu 20). But it showed the following error message:

```auto

YPBINDPROC_DOMAIN: Domain not bound
YPBINDPROC_DOMAIN: Domain not bound

```

While it could be set to use another NIS server.

---

<div class="post-metadata">

**Author:** ![james-p](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@james-p](https://forums.rockylinux.org/u/james-p)\
**Post date:** [November 8, 2024, 2:31pm UTC](https://forums.rockylinux.org/t/nis-server-doesnt-answer-ypbind/16250/52 "2024-11-08T14:31:00Z")

</div>

I suspect your Ubuntu 20 client is also failing to ypbind for the same reason as your CentOS 7 client

There appears to be something wrong with your NIS master and rpcbind - if you haven’t already, I suggest you reboot the NIS master and see if that makes a difference ?

---

<div class="post-metadata">

**Author:** ![jamesyam](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@jamesyam](https://forums.rockylinux.org/u/jamesyam)\
**Post date:** [November 10, 2024, 12:07am UTC](https://forums.rockylinux.org/t/nis-server-doesnt-answer-ypbind/16250/53 "2024-11-10T00:07:46Z")

</div>

No, it still could not work after reboot the NIS master server.

Do you think whether it is related to the ypserv service on the NIS master? Would it help if I reinstall the ypserv (and related packages)?

---

<div class="post-metadata">

**Author:** ![hortimech](https://avatars.discourse-cdn.com/v4/letter/h/b9bd4f/32.png) [@hortimech](https://forums.rockylinux.org/u/hortimech)\
**Post date:** [November 10, 2024, 9:29am UTC](https://forums.rockylinux.org/t/nis-server-doesnt-answer-ypbind/16250/54 "2024-11-10T09:29:48Z")

</div>

Do you mind if I make a comment here ?  
You appear to have been trying to get NIS to work for the last three weeks and are seemingly no nearer than when you started. NIS is dead and has been removed from Rocky Linux 9. I take it you require the uidNumber & gidNumbers that NIS can supply, A Samba AD DC, or an LDAP server, or freeipa can supply these. You could have set up any of those and gone on a fortnights holiday by now 😀

---

<div class="post-metadata">

**Author:** ![jamesyam](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@jamesyam](https://forums.rockylinux.org/u/jamesyam)\
**Post date:** [November 10, 2024, 4:08pm UTC](https://forums.rockylinux.org/t/nis-server-doesnt-answer-ypbind/16250/55 "2024-11-10T16:08:37Z")

</div>

Thanks, hortimech. Sorry that I may not be very familiar with the samilar services. NIS is the one we already used. As jlehtone suggested in the above post, there may be some better choices other than NIS. I just see whether there is any way to quickly fix and recover the NIS service. Then, it may involve less change to me. But I understood that using other tools may finally be my best solution for the existing issue.

---

<div class="post-metadata">

**Author:** ![hortimech](https://avatars.discourse-cdn.com/v4/letter/h/b9bd4f/32.png) [@hortimech](https://forums.rockylinux.org/u/hortimech)\
**Post date:** [November 10, 2024, 4:42pm UTC](https://forums.rockylinux.org/t/nis-server-doesnt-answer-ypbind/16250/56 "2024-11-10T16:42:38Z")

</div>

How do you get the IDs from NIS, via nss or ldap, or something else ?

---

<div class="post-metadata">

**Author:** ![james-p](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@james-p](https://forums.rockylinux.org/u/james-p)\
**Post date:** [November 11, 2024, 1:08pm UTC](https://forums.rockylinux.org/t/nis-server-doesnt-answer-ypbind/16250/57 "2024-11-11T13:08:14Z")

</div>

I don’t think your issue is related to the ypserv install - clients don’t get as far as talking to ypserv - they can’t talk to rpcbind on the server over UDP

As to what the actual problem is, I have now exhausted all my suggestions …

---

<div class="post-metadata">

**Author:** ![jamesyam](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@jamesyam](https://forums.rockylinux.org/u/jamesyam)\
**Post date:** [November 11, 2024, 2:38pm UTC](https://forums.rockylinux.org/t/nis-server-doesnt-answer-ypbind/16250/58 "2024-11-11T14:38:15Z")

</div>

I understood. It is too strange. Anyway, thanks everyone. I also learnt much from all of you.

---

<div class="post-metadata">

**Author:** ![jamesyam](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@jamesyam](https://forums.rockylinux.org/u/jamesyam)\
**Post date:** [November 11, 2024, 2:39pm UTC](https://forums.rockylinux.org/t/nis-server-doesnt-answer-ypbind/16250/59 "2024-11-11T14:39:41Z")

</div>

I am using the default NIS master in Rocky 8. And I have not set LDAP. So, I think it should be nss.

---

<div class="post-metadata">

**Author:** ![hortimech](https://avatars.discourse-cdn.com/v4/letter/h/b9bd4f/32.png) [@hortimech](https://forums.rockylinux.org/u/hortimech)\
**Post date:** [November 11, 2024, 3:59pm UTC](https://forums.rockylinux.org/t/nis-server-doesnt-answer-ypbind/16250/60 "2024-11-11T15:59:43Z")

</div>

Okay, so I think what you are saying is that if you run ‘getent passwd $USER’ you get something like this returned:

getent passwd fred  
fred:\*:11104:10513:Fred Bloggs:/home/fred:/bin/bash

The first number is the user ID and the second is his group ID

If that is the case, then it should be pretty easy to setup a Samba AD DC to replace your NIS server. You just need a list of your users (with their IDs & group membership) and a list of your groups (with the groups ID), with that and a bit of scripting, you should be good to go.

That is, if you go down the AD DC route, I cannot help you with freeipa (I do not use it), or ldap (Samba doesn’t recommend using it any more).

[Previous page](https://forums.rockylinux.org/t/nis-server-doesnt-answer-ypbind/16250.md?page=2)

[Next page](https://forums.rockylinux.org/t/nis-server-doesnt-answer-ypbind/16250.md?page=4)
