From owner-freebsd-questions@FreeBSD.ORG Mon Sep 27 17:00:17 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B74210656CE for ; Mon, 27 Sep 2010 17:00:17 +0000 (UTC) (envelope-from FreeBSD@insightbb.com) Received: from mxsf13.insightbb.com (mxsf13.insightbb.com [74.128.0.95]) by mx1.freebsd.org (Postfix) with ESMTP id 4E5848FC1D for ; Mon, 27 Sep 2010 17:00:16 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.57,243,1283745600"; d="scan'208";a="207530989" Received: from unknown (HELO asav01.insightbb.com) ([172.31.249.123]) by mxsf13.insightbb.com with ESMTP; 27 Sep 2010 13:00:14 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AolCAHlqoExKgCiCO2dsb2JhbACHbZomDAEBAQE1LckZgwwKgi4E X-IronPort-AV: E=Sophos;i="4.57,243,1283745600"; d="scan'208";a="286041497" Received: from 74-128-40-130.dhcp.insightbb.com (HELO laptop2.stevenfriedrich.org) ([74.128.40.130]) by asavout01.insightbb.com with ESMTP; 27 Sep 2010 13:00:14 -0400 From: Steven Friedrich To: Robert Bonomi , freebsd-questions@freebsd.org Date: Mon, 27 Sep 2010 13:00:15 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.1-RELEASE; KDE/4.5.1; i386; ; ) References: <201009270321.o8R3Lo47008651@mail.r-bonomi.com> In-Reply-To: <201009270321.o8R3Lo47008651@mail.r-bonomi.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201009271300.16095.FreeBSD@insightbb.com> Cc: Subject: Re: sudo anomaly X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Sep 2010 17:00:17 -0000 On Sunday 26 September 2010 11:21:50 pm you wrote: > > From FreeBSD@insightbb.com Sun Sep 26 18:14:09 2010 > > From: Steven Friedrich > > To: Robert Bonomi > > Subject: Re: sudo anomaly > > Date: Sun, 26 Sep 2010 19:16:00 -0400 > > > > On Sunday 26 September 2010 2:38:06 pm you wrote: > > > > From owner-freebsd-questions@freebsd.org Sun Sep 26 11:46:43 2010 > > > > From: Steven Friedrich > > > > To: freebsd-questions@freebsd.org > > > > Date: Sun, 26 Sep 2010 12:47:29 -0400 > > > > Subject: sudo anomaly > > > > > > > > I have a userID, admin, that I add to my systems to use when I > > > > perform system admin functions. I also use this ID when using > > > > X-windows, never starting X as root user. > > > > > > > > So I needed to check my mail for daily run outputs and so I tried to > > > > use su then mail, but I got admin's mail. So I exited su, and tried > > > > sudo mail. I got root's mailbox nd I deleted all but two emails. > > > > When I q(uit) mail, it said it saved 2 messages in mbox. But when I > > > > try to go back in it says I don't have any mail. There is no root > > > > directory in /var/mail. > > > > > > All that is correct. > > > > > > > Did sudo lose my mbox? > > > > > > Nope. _you_ did. > > > > > > > > > > > > The good news is that you merely misplaced it -- it _is_ were it's > > > always been, you're just looking in the wrong place for it.` > > > > > > 'mbox' != 'incoming mailbox' > > > > > > > Can anyone verify this anomaly? > > > > > > no anomaly. simple *USER* error. > > > > > > > > > > > > Look in root's _HOME_DIRECTORY_. You'll find a file called 'mbox' > > > =there=. > > > > > > That's where 'already read' mail is saved. > > > > > > When logged in as root, use 'mail -f mbox' to see your old mail. > > > > > > BTW, if you 'su root' and _then_ set evnrionment variable 'USER' to > > > 'root', mail(1) _will_ fetch root's mail. > > > > Thanks. I used mail under unix eons ago, and I don't remember ever having > > to use a switch to get saved mail, but perhaps I've simply forgotten. I > > use KMail and Thunderbird (under Winblows), but I needed to check daily > > output scripts... > > did you use 'su root' or 'su - root'? the '-' makes a humongous > difference. Thanks, I had forgotten about that... -- System Name: laptop2.StevenFriedrich.org Hardware: 2.80GHz Intel Pentium 4 (HTT) with 2 GB memory OS version: FreeBSD 8.1-RELEASE i386 (6.9 MB kernel) manager(s): kde4-4.5.1 X windows: xorg-7.5 X.Org X Server 1.7.5