depends on platform and how much work you want to do.
either way you do it, someone has to keep track of who is where and continually maintain the system for it to be accurate.
if you're using windows a simple way would be to update the network identification tab in windows. place the owner name and room number in the comments field. use <? echo net view; ?> to list the windows computers that are currently on the network. this is fast and simple, however this requires that the network identification tab under windows is updated for the current user's name and location. Only machines that are on the local subnet or are using WINS will be found (assuming you're only using TCP/IP for file sharing).
if you're using linux/unix consider running snmp.
http://www.php.net/manual/en/ref.snmp.php
if you support a small location using static ip addresses, you could use DNS to store the computer name & owner info. use the nslookup utility to browse the computers and use the HOST field in DNS to specify the owner name and location.
there are numerous other ways of doing this, but we'd need still more info. The operating systems you're running and how you actually intend to use the information would be useful.