Nathan Rosenquist wrote:
I don't know of any workarounds for the root login requirement, or I
would probably recommend one as the default.
It is possible to log in as an arbitrary user from rsnapshot, but you
will only have whatever privileges are given to that user on the remote
server.
If you only want to back up a subset of your data with clearly defined
permissions (such as all web content, for example), you could simply do
your backups as an unprivileged user on the box. This is what I do to
backup my SourceForge data, and accounts on shared hosting environments
(where I don't have root). If you need to backup things that are only
accessable to root (and keep the proper ownerships, etc), you will have
to become root one way or another.
By making a small modification to the "scponly" program (
http://www.sublimation.org/scponly/ ), you can create another user in
/etc/passwd with a uid of 0, and set this user's shell to scponly. In
this way, content can be transferred back and forth, but arbitrary shell
commands can not be run. However, the author of scponly did not enable
root logins on purpose as a security feature. The reasoning is that if
you can remotely write files to a server as root, you can simply upload
a new /etc/passwd file and become root anyway. However, all the backup
programs I've seen require full access if they are to backup all files
on a machine.
Another thing some people have done is to explicitly set the rsync
command to be run at login in the authorized_keys file. This prevents
remotely invoking any other command, although you have to remember to
keep these directives in sync with your rsnapshot.conf file.
If you do use scponly, make sure to enable rsync during ./configure,
since scponly does not support it by default.
Another way would be to change the permissions on the rsync binary to
SUID root, executable only to user and group, group owned by wheel, with
no permissions to anyone else. This is slightly risky, but I'm assuming
only trusted users are on this box anyhow.
Another option is sudo. Replace your rsync binary with a shell wrapper
script that determines if user-a executes, then use sudo to run the real
binary as requested, otherwise just run the rsync binary (no sudo).
Eric
------------------------------------------------------------------------
Eric Anderson Sr. Systems Administrator Centaur Technology
A lost ounce of gold may be found, a lost moment of time never.
------------------------------------------------------------------------
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit
http://www.necitguy.com/?r=20
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss