Something like this: TarClientCmd = $sshPath -q -x -n -l backuppc $host env LC_ALL=C usr/bin/sudo $tarPath -c -v -f - -C $shareName --totals
Visudo: # Allow backuppc to run tar without a password backuppc ALL=NOPASSWD: /bin/tar -----Original Message----- From: Les Mikesell [mailto:[email protected]] Sent: Thursday, December 03, 2009 5:05 PM To: General list for user discussion, questions and support Subject: Re: [BackupPC-users] Problems to backup linux network computer Jose Torres wrote: > I have ssh password access on, but removed the root password. So I can > login but root requires the key. If you are internet-exposed and running on port 22 you'll be hit by a lot of brute-force password guessing - not too likely to succeed if you have good user passwords, but still a possibility. > But anyway I would like to do the "...connect as a different user and add a > sudo layer to run the backup." > (I could create a key for backuppc, remove the password and make it sudoer > on the remote server) > > How would I do the sudo layer? I thought it was on the wiki but I can't find it now and don't have an example myself. It's pretty straighforward, though. Just configure sudo to permit the command you want to run as root by the user in question on the target machine without password entry, then configure backuppc to send the command including the sudo via ssh. -- Les Mikesell [email protected] ---------------------------------------------------------------------------- -- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ 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/ ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ 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/
