0

I've setup NIS on Centos 5.3 following the fairly sketchy documentation online, it seems to be working pretty well, however whenever I run ypcat passwd, either from the server or the client, no entries are ever returned.

There's definitely some entries in the /etc/passwd file on the server and I've run ypinit, as well as tried running make in /var/yp to rebuild the database.

ypcat hosts works fine, I get the hosts file from the server, I don't get any errors in the log. Both machines are setup to in nsswitch.conf to read from NIS as well as files.

Any ideas why this wouldn't be working?

wfaulk
  • 6,828
  • 7
  • 45
  • 75
JamesHannah
  • 1,731
  • 2
  • 11
  • 22
  • You might consider using likewise open for authentication. I have NIS in my production environment and personally I find it to be hell, but I am sure others use it successfully. You can find people's opinions on the topic in other serverfault questions. – Kyle Brandt Jun 15 '09 at 22:21
  • I'd add another vote for not using NIS. NIS is falling out of favour. Unless you have legacy servers, you'd be better off using LDAP. There's a lot more documentation and more people are using it and have experience of it. – David Pashley Jun 15 '09 at 23:22
  • I'm not planning on using it in production, just in a smallish test environment. – JamesHannah Jun 16 '09 at 08:32

3 Answers3

1

OK, so this is a bit of a facepalm moment, NIS doesn't show any users with UIDs <500 in it's passwd export, I hadn't added any non-privileged users to the VM I was testing it on. all works fine now :-S

JamesHannah
  • 1,731
  • 2
  • 11
  • 22
0

Have you configured /etc/nsswitch.conf? It should contain lines such as:

passwd:     files nis
group:      files nis
brian-brazil
  • 3,904
  • 1
  • 20
  • 15
0

Have you tried:

ypcat passwd.byname

or

ypcat passwd.byuid

Also, on your NIS server are there db files for the passwd map?

TCampbell
  • 2,014
  • 14
  • 14
  • Both return nothing, there are passwd.byname and passwd.byuid files in /var/yp/internal, also more annoyingly, when I make a change to the passwd file and then run `make` in the /var/yp directory, the passwd files **do** get updated, however there's still nothing returned from ypcat. Might also add I tried adding "+::::::" to the end of the passwd file with no effect. – JamesHannah Jun 15 '09 at 21:58
  • Are you sure it is grabbing your /etc/passwd for building the map? Have you queried the actual db files created in /var/yp/internal/passwd.byname? – TCampbell Jun 15 '09 at 22:39