Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!psuvax1!news From: flee@cs.psu.edu (Felix Lee) Newsgroups: comp.unix.shell Subject: Re: tcsh for root -- ok or not? Message-ID: Date: 9 Apr 91 10:52:36 GMT References: <1991Apr8.033015.14768@athena.mit.edu> <1991Apr9.010306.524@batcomputer.tn.cornell.edu> Sender: news@cs.psu.edu (Usenet) Organization: Penn State Computer Science Lines: 15 Nntp-Posting-Host: dictionopolis.cs.psu.edu ># When we exec tcsh on an su ># we source the person's .cshrc, and we make our home ># be the person's home. There's a simpler and faster way than all that `who am i` `ypmatch` `awk` nonsense, given that $USER is something sane. set home = ~$user This will fail abominably if $user isn't set, so it should probably be protected with an if statement. Something like: if (! $?user && $?LOGNAME) set user = $LOGNAME if (! $?user) set user = root set home = ~$user -- Felix Lee flee@cs.psu.edu