BackupPC-users

Re: [BackupPC-users] Backuppc and Ubuntu with Sudo

2010-06-22 05:47:36
Subject: Re: [BackupPC-users] Backuppc and Ubuntu with Sudo
From: Ed McDonagh <ed.mcdonagh AT rmh.nhs DOT uk>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Tue, 22 Jun 2010 10:45:18 +0100
This is my procedure for adding an Ubuntu client to be backed up by an
Ubuntu backuppc server:

# Use the webmin interface to create a backuppc user with a simple
password, bash shell (poss. not necessary), group users etc
# Edit the sudo config to allow the user to use rsync:
  * sudo visudo       and add the following:
  * backuppc ALL=NOPASSWD: /usr/bin/rsync
# On the backuppc server change to the backuppc user
  * sudo -s -u backuppc
# Create a key pair if necessary (look in /var/lib/backuppc/.ssh - the
home directory of backuppc) 
  * ssh-keygen -t dsa    if no key exists
  * ssh-copy-id -i /var/lib/backuppc/.ssh/id_dsa.pub
backuppc@client-hostname          (all on one line)
# SSH as backuppc into the new client to check it works
# exit        back out again
# Change the password for backuppc on the client to something random
using webmin

I hope this helps!

Ed

On Mon, 2010-06-21 at 20:51 +0200, Jaco wrote:
> Hi Ed, looks like this will do the trick thanks but for some reason
> I'm now battling to get the SSH keys to work on Ubuntu for the
> backuppc account I created.  Can you quickly run through the steps you
> would take to do this so I can see if I missed something?  This is
> what I did (on the Ubuntu client machine):
> 
> # useradd -m backuppc  # passwd backuppc  # mkdir /home/backuppc/.ssh
> # touch /home/backuppc/.ssh/authorized_keys  # Paste id_rsa.pub key
> from Backuppc Server into this authorized_keys file
> 
> >From the Backuppc Server (to test): # ssh backuppc@ubuntuclient
> 
> Thanx so much for your help.
> Jaco
> 
> On 21/06/2010 19:34, Ed McDonagh wrote: 
> > Or better, 
> > http://backuppc.sourceforge.net/faq/ssh.html#how_can_client_access_as_root_be_avoided
> > 
> > On Mon, 2010-06-21 at 12:19 -0500, Trey Nolen wrote: 
> > > Jaco wrote:
> > > > Ok, so my Backuppc is running perfectly (on my Debian clients) but how 
> > > > do I get Backuppc to backup my Ubuntu clients running sudo?  Can't get 
> > > > SSH to login passwordless with the root account because of sudo...?  
> > > > Your help highly appreciated!
> > > >
> > > >   
> > > On your Ubuntu clients, just sudo -i to change to root, and then use the 
> > > passwd command to give the root account a password.  That will unlock 
> > > the account.  I recommend setting up your sshd so it only accepts keys 
> > > and not passwords.
> > > 
> > > 
> > > Trey Nolen
> > > 
> > > 
> > > ------------------------------------------------------------------------------
> > > ThinkGeek and WIRED's GeekDad team up for the Ultimate 
> > > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
> > > lucky parental unit.  See the prize list and enter to win: 
> > > http://p.sf.net/sfu/thinkgeek-promo
> > > _______________________________________________
> > > 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/
> > >     
> > 
> > 
> > 
> > 
> > ____________________________________________________________________
> > Attention: 
> > This e-mail and any attachment is for authorised use by the intended
> > recipient(s) only. It may contain proprietary, confidential and/or
> > privileged information and should not be copied, disclosed,
> > distributed, retained or used by any other party. If you are not an
> > intended recipient please notify the sender immediately and delete
> > this e-mail (including attachments and copies). 
> > The statements and opinions expressed in this e-mail are those of
> > the author and do not necessarily reflect those of the Royal Marsden
> > NHS Foundation Trust. The Trust does not take any responsibility for
> > the statements and opinions of the author. 
> > Website: http://www.royalmarsden.nhs.uk
> > 
> > ____________________________________________________________________
> > 
> > ------------------------------------------------------------------------------
> > ThinkGeek and WIRED's GeekDad team up for the Ultimate 
> > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
> > lucky parental unit.  See the prize list and enter to win: 
> > http://p.sf.net/sfu/thinkgeek-promo
> > 
> > _______________________________________________
> > 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/
> >   
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate 
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
> lucky parental unit.  See the prize list and enter to win: 
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________ 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/

#########################################################################
Attention:
This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary, confidential and/or
privileged information and should not be copied, disclosed, distributed,
retained or used by any other party. If you are not an intended recipient
please notify the sender immediately and delete this e-mail (including
attachments and copies). 

The statements and opinions expressed in this e-mail are those of the
author and do not necessarily reflect those of the Royal Marsden NHS
Foundation Trust. The Trust does not take any responsibility for the
statements and opinions of the author.

Website: http://www.royalmarsden.nhs.uk
#########################################################################

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
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/

<Prev in Thread] Current Thread [Next in Thread>