Re: sudo anomaly

2010-09-27 Thread perryh
Steven Friedrich free...@insightbb.com wrote:

 ... 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.

 Did sudo lose my mbox?

mbox != the (input) system mailbox.

Chances are, those 2 messages are in /root/mbox
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: sudo anomaly

2010-09-27 Thread Steven Friedrich
On Sunday 26 September 2010 11:21:50 pm you wrote:
  From free...@insightbb.com  Sun Sep 26 18:14:09 2010
  From: Steven Friedrich free...@insightbb.com
  To: Robert Bonomi bon...@mail.r-bonomi.com
  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-questi...@freebsd.org  Sun Sep 26 11:46:43 2010
From: Steven Friedrich free...@insightbb.com
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.5X.Org X Server 1.7.5
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


sudo anomaly

2010-09-26 Thread Steven Friedrich
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.

Did sudo lose my mbox?

Can anyone verify this anomaly?

-- 
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.5X.Org X Server 1.7.5
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org