On Sat, 2001-11-24 at 19:39, HarryO wrote:
> In article <1006646006.774.0.camel / stargrazer>, "Sean Middleditch"
> <elanthis / awesomeplay.com> wrote:
> 
> > No no.  ~,^  Read the $HOME environment variable.  /etc/passwd might not
> > even have the user in it (login over NIS or LDAP).  $HOME is supposed to
> > be set by the login shell, so use that.
> 
> That will work for just "~", but won't work for "~fred" when I'm logged
> in as "jim".

Ah, then you'd have to have a library that tied into the system libs (at
least NSS, dunno if you'd need PAM to get more out of that).

Again, checking /etc/passwd is bad, because it isn't the only source for
users and home dirs.  Of all the Linux servers and workstations I run at
my work, for example, not one of them has the normal users in
/etc/passwd.  Everything is stored in any LDAP database, and accessed
over NSS/PAM.

Sean Etc.