The rusers command will query every machine on a network with the rusers daemon running and return all the users logged in to those machines.