*BSD News Article 98362


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!howland.erols.net!psinntp!pubxfer.news.psi.net!usenet	
From: Luoqi Chen <luoqi@watermarkgroup.com>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: root's mail???
Date: Tue, 24 Jun 1997 17:00:20 -0400
Organization: The Watermark Group
Lines: 29
Message-ID: <33B0355C.46D1@watermarkgroup.com>
References: <5ok7j5$dc5@quail.swcp.com> <874taoiwrm.fsf@balrog.ml.org>
NNTP-Posting-Host: 38.246.139.33
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.01Gold (Macintosh; U; PPC)
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:43432

Ted Buswell wrote:
> 
> crs@quail.swcp.com (Charlie Sorsby) writes:
> >
> > What must I do to read root's mail?  I find that I can't do it with
> > sudo and I can't do it when I actually su to root--all I get is my
> > own mail.  I must have something misconfigured but what?
> >
> 
> My guess is that after getting uid=0, you've still got $USER set to
> your login name.  By default, 'mail' looks at the file /var/mail/$USER
> 
> Try:
> 
>         $ su -l root
>         # mail
> 
> Or:
> 
>         $ sudo sh -c "USER=root mail"
> 
> A lot (most?) people find it easier to have mail addressed to root end up
> in the mailbox of a "real" account (either by .forward or aliases(5)).
> 
> -Ted
There is an easy way,
# mail -u root

-lq