Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

2 Answers

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
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

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.