We have a small office network with a Mac server, and all employees have their own Mac laptop they take home at the end of the day.
I am looking for a way to automatically log the employees' time at the office. Theoretically, it should be possible to periodically check for other auto-discovered Bonjour hosts on the network and deduce their time at the office from there.
Now my question is, is there an app or other readily available solution for that?
I should note that the users don't actually log in to the network nor log out. Their computers are not part of an Open Directory. I also really don't want to install or access anything on their computer directly.
I want to log their presence purely based on listening for their network presence. I also don't want to manually manage a list of computers, computers should be tracked automatically once they are discovered on the network.
At the end of the week/month I want to be able to get a list of all connected computer names during that period, with the time periods they were connected. Some graphical representation similar to day-view in iCal would be perfect, but if I have this information textual I could always implement that part myself.
I've been doing some research myself and found out about the dns-sd tool. For example:
dns-sd -B _afpovertcp._tcp local
lists all computers with AFP enabled.
However, two problems:
- the dns-sd utility from the command-line is not well suited for scripts, the man page recommends against it, the command also doesn't terminate itself
- The above example does not work when AFP file sharing is disabled