Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a NIS server in a Debian machine with several user accounts in passwd and shadow files. Also, I have 10 Ubuntu desktop boxes rununning as NIS clients. The users can login by binding to the NIS server (in those boxes there is only root account in passwd and shadow files). Everything works fine.

However, I'd like to see logfiles in the server about users logging in and logging out in the client stations (with timestamp and IP or station name). My problem is: I can't find where are these logs or how to configure ypbind or ypserv to do so. Is it not possible?

share|improve this question
You know....this question might be better on UNIX or SuperUser SE – mdpc May 21 '13 at 18:46

The NIS server will tell you nothing useful.

You can configure your NIS server to log all requests, but authentication checks happen on the client. All the NIS server is asked for is a copy of the passwd entry (username, UID, GID, encrypted password, etc.), which it will happily give to anyone who asks.
The client then performs authentication against that data the same way it would for a local user, determines success or failure, and acts accordingly.

In other words, your NIS server doesn't know who logged in, or if the login succeeded. All it knows is someone asked it for some information.
The NIS servers may not even be consulted for every login (particularly if you're using nscd or something else to cache lookups).

Of course given the above there is also no reason to consult the NIS server for a logout. The NIS server doesn't care when you ended your session.

What you probably want to do is collect auth.log or equivalent from each of your NIS clients and forward those events to a central loghost where you can examine them.
This could be combined with event auditing to accurately track login/logout times.

share|improve this answer
Ok, now I undestood the problem and will forward stations auth.log as you suggested. Thank you very much for the nice didactic explanation. – M.G. May 21 '13 at 19:36

Each system keeps a log of users logged in / out.... you can read it out using last.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.