Path: utzoo!attcan!uunet!husc6!mailrus!cwjcc!hal!nic.MR.NET!shamash!halcdc!randy From: randy@halcdc.UUCP (randy orrison) Newsgroups: comp.unix.wizards Subject: home directory to user mapping Message-ID: <113@halcdc.UUCP> Date: 14 Nov 88 20:26:50 GMT Reply-To: randy@halcdc.UUCP (randy orrison) Organization: Control Data in the Hills of Arden, Minnesota Lines: 15 Is there an easy way to reverse the user to home directory mapping of /etc/passwd? That is, given an absolute pathname, tell me whose home directory it's in? In a simple, pre-nfs and symbolic links, filesystem, this isn't too bad, but in the worst case it can get complicated. e.g. my home directory is /u/randy /u/randy -> /n/halcdc/usr1/randy /n/halcdc is an nfs mount of halcdc:/usr1/randy I want a function that (run on halcdc) given '/usr/randy/junk/file' will tell me that it's in randy's home directory. Any ideas on how to do this? Thanks in advance! -randy