BackupPC-users

Re: [BackupPC-users] Testing the mail function from BackupPC

2010-01-28 09:40:24
Subject: Re: [BackupPC-users] Testing the mail function from BackupPC
From: Tony Molloy <tony.molloy AT ul DOT ie>
To: sorin.srbu AT orgfarm.uu DOT se, "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Thu, 28 Jan 2010 14:37:35 +0000
On Thursday 28 January 2010 13:16:41 Sorin Srbu wrote:
> >-----Original Message-----
> >From: Tony Molloy [mailto:tony.molloy AT ul DOT ie]
> >Sent: Thursday, January 28, 2010 1:56 PM
> >To: sorin.srbu AT orgfarm.uu DOT se; General list for user discussion, 
> >questions
> > and support
> >Subject: Re: [BackupPC-users] Testing the mail function from BackupPC
> >
> >On Thursday 28 January 2010 11:20:05 Sorin Srbu wrote:
> >> >-----Original Message-----
> >> >From: Pascal Bourdais [mailto:pbourdais AT infagri DOT fr]
> >> >Sent: Thursday, January 28, 2010 12:04 PM
> >> >To: backuppc-users AT lists.sourceforge DOT net
> >> >Subject: Re: [BackupPC-users] Testing the mail function from BackupPC
> >> >
> >> >su - backuppc
> >>
> >> Already tried that, same thing happens:
> >>
> >> root@mach012 ~/ [0]# su - backuppc
> >> root@mach012 ~/ [0]# /usr/bin/BackupPC_sendEmail -u
> >
> >You're still root!!
> >
> >>  sorin.srbu AT orgfarm.uu DOT se /usr/bin/BackupPC_sendEmail: Wrong user: 
> >> my
> >>  userid is 0, instead of 150 (backuppc)
> >
> >    ^^^^^^
> >
> >definately still root
> >
> >> Please su backuppc first
> >> BackupPC::Lib->new failed
> >> root@mach012 ~/ [0]#
> >
> >On my machine
> >
> >[root@shannon ~]#
> >[root@shannon ~]# su - backuppc
> >[backuppc@shannon ~]$
> >
> >see changed user to backuppc
> >
> >[backuppc@shannon ~]$ /usr/local/BackupPC/bin/BackupPC_sendEmail -u
> >[email protected]
> >Sending test email using /usr/sbin/sendmail -t -f backuppc
> >
> >[backuppc@shannon ~]$ grep root /etc/passwd
> >root:x:0:0:root:/root:/bin/bash
> >
> >[backuppc@shannon ~]$ grep backuppc /etc/passwd
> >backuppc:x:490:490: BackupPC User :/home/backuppc:/bin/bash
> >
> >I suspect your backuppc user is not set up correctly. In my case it's got
> > a uid of 490 and is a login account
> 
> The BackupPC installer sets the backuppc account up with nologin (no GUI
> login). In /etc/passwd the shell is /bin/false, so no GUI login allowed,
>  but it should allow one to su in as backuppc. I solved that by adding the
>  "-s /bin/bash", as per the previous post. Now I can su properly to
>  backuppc.
> 
> The problem *now* is that /bin/mail doesn't understand the "-t" switch. As
>  I mentioned, I can't find anything about this t parameter in man mail, but
>  in the /usr/bin/BackupPC_SendEmail script  the t parameter is mentioned as
>  something that " -t  display the emails that would be sent, without
>  sending them".
> 
> To me this is rather cryptic, and I don't quite understand the why's,
>  what's and where's of this alluring "-t" and how I fix this.
> 
> Grateful for any help! Thanks.
> 

Ok I run backuppc on CentOS and man mail says

   ~tname ...
             Add the given names to the direct recipient list.


So I'd just remove the -t and see what happens.

Hope this helps,

Tony



-- 

Chief Technical Officer.                   Tel: +353 061-202778
Dept. of Comp. Sci.
University of Limerick.


------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/