BackupPC-users

Re: [BackupPC-users] Running BackupPC and Nagios web interfaces from the same box

2014-10-15 17:11:44
Subject: Re: [BackupPC-users] Running BackupPC and Nagios web interfaces from the same box
From: Tomasz Pawlik <tomi AT mtl.one DOT pl>
To: backuppc-users AT lists.sourceforge DOT net
Date: Wed, 15 Oct 2014 23:09:58 +0200
Easiest way is using suid wrapper around BackupPC_Admin.

1. Revert changes in httpd.conf,
2. find BackupPC_Admin file (I guess
/usr/share/BackupPC/sbin/BackupPC_Admin),
3. rename BackupPC_Admin to BackupPC_Admin.pl,
4. create file BackupPC_Admin.c and change it for Your needs,
-- cut --
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>

int main() {
    setuid( 1021 ); // user backuppc
    system( "/usr/share/BackupPC/sbin/BackupPC_Admin.pl" );
    return 0;
}
-- cut --
5. compile it using command "gcc -o BackupPC_Admin BackupPC_Admin.c" and
place it in directory from point 2,
6. set right permissions (4755) and ownership
-rwsr-xr-x 1 root     root  5266 Oct 12  2010 BackupPC_Admin

This should work although be aware that using suid brings many security
considerations.

Good luck,
Tom.

W dniu 2014-10-14 21:53, xpac pisze:
> I need to know if there is a way to configure the apache conf file so that 
> both BackupPC and Nagios web interfaces will be accessible although they are 
> running off the same box.
> 
> I had BackupPC running fine, but the install instructions had me change the 
> httpd.conf file to:
> 
> User backuppc
> 
> Unfortunately, that breaks a bunch of permissions for the Nagios interface.  
> When I change the user back to "apache" Nagios runs fine, but I can't even 
> get the BackupPC interface to come up properly.
> 
> Is there a way to make it so that the BackupPC interface doesn't have to user 
> "backuppc" as the user in httpd.conf?  Or some other way I can do this?
> 
> +----------------------------------------------------------------------
> |This was sent by phiii AT hotmail DOT com via Backup Central.
> |Forward SPAM to abuse AT backupcentral DOT com.
> +----------------------------------------------------------------------
> 
> 
> 
> ------------------------------------------------------------------------------
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
> http://p.sf.net/sfu/Zoho
> _______________________________________________
> 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/
> 

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
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/