Meel Me wrote at about 05:14:11 -0800 on Thursday, November 12, 2009: > Hello Jeffrey, > > Thanks for your reply! > > I tried your solution, but unfortunately I got an error message. > > This is what I did: > I sshed successfully to my backuppc server. > > Then I ran the following command: > /usr/share/backuppc/bin$ ./BackupPC_serverMesg backup <HOSTIP> <HOSTNAME> 1 > (Where <HOSTIP> is the ip-address of my host and <HOSTNAME> is the name of > my host) > > This resulted in the following error: > Wrong user: my userid is <uid (number)>, instead of <uid (number)> (backuppc) > BackupPC::Lib->new failed > > Then I tried to login as backuppc, but this failed. Probably because > backuppc is a HTTP user. > > When I run the ./BackupPC_serverMesg backup <HOSTIP> <HOSTNAME> 1 command > locally on the backuppc server, > then I get the same error message. > > FYI: I've got /usr/bin/sperl5.8.8 > So perl should be installed with setuid emulation. > > Can you tell me what I could do to make "./BackupPC_serverMesg backup > <HOSTIP> <HOSTNAME> 1" working? > Or do you know a total other solution to reach the situation that I desire? > > Thnx, Just about all of the command line BackupPC commands need to be run as user 'backuppc'. However, as you noticed, 'backuppc' is not set up as a login account.
I guess you could enable it as a login account (using your standard *nix command line or favorite gui) but while easy that might not be best security practice. If you do that then you can either: 1. Set up the ssh connection to log in as user backuppc (i.e., put your public key in ~backuppc/.ssh on the remote server). Then use ssh backu...@server... This way everything will be run as user backuppc or 2. 'su' to user backuppc after you log in via ssh Alternatively, you could run the individual commands as uid backuppc using 'sudo -u backuppc' (You can also of course increase security by restricting usage of 'sudo' to just the commands you need by configuring /etc/sudoers). I suppose you could also try 'suidperl' by doing something like chown backuppc.<group you belong to> /usr/share/backupPC/bin/BackupPC_serverMsg (or you could make the group 'backuppc' and add yourself to the backuppc group) chmod 4754 /usr/share/backupPC/bin/BackupPC_serverMsg (If you don't have a recent enough version of Perl you may need to also change the first line of the file to #!/usr/bin/suidperl) ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ BackupPC-users mailing list [email protected] List: https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki: http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
