"ypcat" and "ypmatch username passwd" do not agree after the change on the server

I am trying to use NIS for authentication on one of the machines. I had to change one of the user IDs for the user account on the NIS server (I changed the user ID for username500 to 509 to avoid a conflict with the local user account with ID 500 on the clients). The problem is that it did not update properly on the client.

In particular, if I do ypcat passwd | grep username, I get updated information:

username:*hidden*:509:509:User Name:/home/username:/bin/bash

But if so ypmatch username passwd, he says:

username:*hidden*:500:500:User Name:/home/username:/bin/bash

This means that when a user registers with one of the clients, he has the wrong user ID, which causes all kinds of problems. I did "cd /var/yp; make"on the server and "service ypbind restart"on the client, but this did not fix the problem. Does anyone know what will be the cause of this, and how can I somehow force the update on the client? (I am running Fedora 8 on both the client and server).

+3
source share
5 answers
John O pointed me in the right direction.

He is right. If you set "files: 0" to /etc/ypserv.conf, you can force ypserv not to cache files. If you need to restart ypserv after each make, this is the problem.

The real solution is to look in / var / log / messages for this error:

ypserv[]: refused connect from 127.0.0.1 to procedure ypproc_clear (,;0)

makedbm -c : YPPROC_CLEAR ypserv. , CLEAR . 127.0.0.1 /var/yp/securenets.

+5

- RHEL 5.5. () , make. ypcat , ypmatch - . , - - . , ypserv . , strace .. , ypserv " ", "file:" /etc/ypserv.conf --- 30. 0 make.

--- man- ypserv.conf...

" ypserv 1.1 ypserv 1.2. 1.2, . , makedbm -c, . , /var/yp/Makefile ypserv 1.2 -c makedbm Makefile. , ypserv , ."

makefile DOES "makedbm -c", ypserv () .

. , . ": 0" ypserv.conf

+2

, , NIS , ("service ypserv restart")

+1

hmm, ypserver, ; make in/var/yp . Makefile /var/yp, , ( , passwd.by * /etc/passwd - . passwd.time NIS, , ). nis- ( -linux) , -.

0

- nscd. 60 /etc/nscd.conf passwd.

0

Source: https://habr.com/ru/post/1696571/


All Articles