Security :: Logging In As Root Over Rsync/ssh For Backups?

Sep 30, 2010

I need to login as root, or at least get root privileges, in a cron triggered backup run. The straight way to do this would be the backup server making an ssh connection to the server to be backed up (this way because I want to avoid many servers being backed up in parallel and the backup server itself would be managing this diversity), via the rsync command which would be performing the backup's synchronization step.

I'm looking for alternatives to this in some form. I'd like to disallow direct root login to my ssh port (not 22One idea I have is to have the backup server initiate an ssh login as a non-root user, to either the actual source server, or to a server that can reach the source server ... and set up port forwarding. Over the forwarded port, then initiate the rsync that logs in as root via another port that allows direct root, but cannot be reached from the internet at all (because the border firewall doesn't include this port as allowed in).FYI, these logins will be using ssh keys, not passwords. I do need to keep ownership metadata for files being backed up, so this is why I am using root. Also, rsync is needed to get the incremental updates to keep bandwidth usage lower (otherwise I could just transfer a tarball each day).Anyone have any other ideas or comments, for security issues, based on experience doing things like this (backups, routine data replication, etc)?

View 5 Replies


ADVERTISEMENT

Security :: Securing Backups Via Rsync And SSL?

Apr 27, 2011

There are multiple servers to be backed up. Different access rights exist in each server. There are two backup servers with plenty of disk space, one local, and one offsite. The local one feeds to the offsite one. The rsync command is being used to make a replica of backed up data. Deleted data is also being archived. There are two methods that have been considered: One is to have the individual servers run rsync which logs in to the backup server to push data. Two is to have the backup server run rsync which logs in to each individual server to pull data. Because system data is involved and meta information (like owning user) must be stored, root is required to access the data as well as to store it. That means everything runs as root both ends. So method one was quickly dismissed because each server would effectively have rights to access ALL the data on the backup server since it logs into the backup server as root. The security containment here involves different groups using different servers, and they need to be isolated from each other.

But even method two involves some risks that are a concern. This means one machine has access rights to every server. If the backup server were compromised, every machine could be compromised.What I'd like to find is some way to allow backups to be run without either machine granting root access to the other, while still running as root, or something equivalent, that allows accessing all data and storing all metadata. So I was looking at setting up an rsync daemon on each individual server (running as root so it can access what it is specified to access), and running an rsync client on the backup server (as root so it can store metadata). This opens network access issues. Any user on the network can connect to the rsync daemon. So password protection is needed. But this communication is also not encrypted, which exposes the password and the data should the network be sniffed.

So now I'm thinking about a non-root ssh login between machines. The backup server would login to a non-privileged user on each individual server and set up a secure forwarding channel to the rsync daemon. Is this the best that can be done? Is there a way to run rsync via SSL with key verification so it can all be done together? I'd like to have the rsync daemons configured to always talk SSL, and always verify the client's key against a list of authorized keys, and likewise the client verify the server's key against the known public key for that server.

View 14 Replies View Related

Ubuntu Security :: Rsync Automated Backups Of Entire File Structure Over Ssh?

May 16, 2011

I am in the process of writing an rsync script to run unattended backups of my entire file system to another system located on my local network using ssh and password-less rsa keys.

I will absolutely will not use password-less keys with the root account and this is the limitation preventing me from accomplishing my goal because root is required by rsync to access the / tree and copy it to another location. I decided that if I compiled the script into a binary that I didn't have a problem with the password being contained within the binary itself but from what I've read there is no way to elevate to root and then back down to user level from within the script/binary.

I can create the script as the user and use chroot to make it owned by root but retain execution permission for the user but it will still cause the ssh login to be under root and therefore require either that I am there to enter my password or the use of password-less keys under the root account which I reiterate I will NOT do. Currently the script is executed by the user on the machine containing the files to be backed up.

View 9 Replies View Related

General :: Rsync Incremental Backups Rather Than Full Backups?

Nov 12, 2009

How do you get Rsync to do incremental backups rather than full backups? At the moment I have a script that will create a backup folder (if it doesnt already exist) then copy the source files into the backup directory with the command

rsync $VERBOSE --exclude=$TARGET/ $EXCLUDE --exclude '/Ls-wtgl1c8/**' -rt --delete $source/ $TARGET/$source/ >> $LOG_FILE

Target is where the files will be backed up to Sources is the dir(s) to be backed up Exclude files is the list of files not to backup
log file is where the output will be saved to. At the moment it only does full backups, but I would only like to do incremental, how would this be achieved? Am I missing out an option in the Rsync that is required.

View 9 Replies View Related

Security :: Secure FTP - Root Privileges After Logging In Form A Macintosh And Could Browse The Root Directory

Apr 12, 2010

I run ProFTPd with TLS authentication on my Debian Lenny server. My problem is that despite of the fact that my users connect chrooted, one of my friends had root privileges after logging in form a Macintosh and could browse the root directory, too.

View 1 Replies View Related

Ubuntu Security :: Disable Root From Logging In Via GDM?

Mar 11, 2010

I've enabled the root account on Ubuntu 9.10, however I want to stop it from being used to login via GDM. 9.10 seems to have a different GDM version, how can I carry this out under 9.10

View 9 Replies View Related

Fedora Security :: Disable Logging In As Root In Console?

Feb 22, 2010

I wanted to disable root logins in console, so I searched for that. I found that if I change root's bash to "/sbin/nologin" in "/etc/passwd", root user will not be able to login. So I did that. But when I wanted to use sudo command, it didn't show me root bash, but it only do the same thing as logging in as root in single user mode (shows message that this account is disabled). So, how I can disable root logins, but keep enabled sudo command for standard users?

View 6 Replies View Related

Security :: Su - Incorrect Password - When Logging As Wheel User And Trying To Access Root

Dec 18, 2010

I have tried to not allow root access and have created a wheel user.

Now I can not logged in as root.

Its okay but when am logging as wheel user and trying to access root then it says:

Code:

View 14 Replies View Related

Ubuntu :: What Can Use For Backups That Is Faster Then Rsync?

May 9, 2010

I am currently backing up my data but find that it takes way to long to do a rsync, it takes forever to just find the differences and transfer them.Out of 3 separate rsyncs the main one that is slow is my www.skins.be mirror directory which is 41GB and has 392,200 files, sorted into multiple directories. Which grows by around 100 every couple days.I think that something that would be able to track changes by inotify time on directories will speed it up since Picasa sure finds the changes fast when I open it and it is tracking over 26,200 pictures. I just don't know of a backup solution that does that.

View 4 Replies View Related

General :: Rsync Not Doing Incremental Backups?

Jan 21, 2010

I am using rsync to backup dirs on my ubuntu server onto a NAS (which is mounted onto the filesystem), but the problem is that it is constantly doing full backups rather than doing incrementals and I am not really sure why. After doing a bit of expermienting with the script I noticed that if I just backed up a home dir (/home/user) the incremental backups work fine. If however I was to back up a dir like (/home/domain/user) it always does full backups.I have tried various different scripts but still the same end result. The latest script is a variation on the a script found on the samba rsync examples webpage, see below...

#!/bin/bash
# rsyncbu.sh -- backup to nas using rsync
# This script backups files listed in BDIR to the BSERVER. The verbose output along with the date is listed in the LOG_FILE specified
# verbose output

[code]....

View 4 Replies View Related

Server :: Using Rsync For Incremental Backups?

Jan 29, 2010

Can I use rsync for incremental backups of the running linux server?

View 5 Replies View Related

Debian :: Rsync Error In Rsnapshot Backups

Apr 5, 2011

I am backing up my debian server with rsnapshot which actually uses rsync to perform the backup. The backups are located in an external storage of size 1.4T .

[code]....

I tried to understand what this error message means and i founde that error code 12 : 12 Error in rsync protocol data stream I understand that when rsync find that a file on the target was changed , it will send only the block/blocks that contain the changes and in the destination rsync will create new file and not update the old one (new inod...) . I want to know if this error i get is due to full disk or perhaps it is some other factor

View 2 Replies View Related

Software :: Rsync: Backups And Hard Links?

Jul 13, 2011

I am using rsync for incremental backups. I am backing up to a second hard drive on my computer. When I check the individual backup directories (backup.0 through backup.4) with du -hs they each show 12G; when I check the parent directory squeeze it shows 15G. Over 4 backups I have added 3G. I haven't made very much for changes to directories I'm backing up and am using hard links. I have included some info below.

Quote:

Backup script:

#!/bin/bash
mount /mnt/backup
cd /mnt/backup/squeeze/
rm -rf backup.7

[code]....

View 2 Replies View Related

Software :: Rsync Incremental Backups To Be Restored?

Dec 2, 2010

With the --backup and --backup-dir= options on rsync, I can tell it another tree where to put files that are deleted or replaced. I'm hoping it fills out the tree with a replica of the original directory paths (at least for the files put there) or else it's a show stopper. What I'm wanting to find out applies when I'm restoring files. Assuming each time I run rsync (once a day) I make a new directory tree (named by the date) for the backup directory. For each file name/path in the tree, I would start with whatever is in the main tree (the rsync target) and work through the incremental trees going backwards until I reach the date of interest to restore to. If along the way I encounter a file in an incremental, I would replace the previous file at that path with this next one. So by the time I get back to a given date, I should have the version of the file which was present at that date. Do this for each file in the tree and it should be a full restore.

But ... and this is the hard part, it seems. What about files that did not exist at the intended restore date, but do exist (were created) on a date after the intended restore date. What I'd want for a correct restore would be for such files to be absent in the restored tree (just as they were absent in the source tree on that date). How can such a restore be done to correctly exclude these files? Wouldn't rsync have to store some kind of sentinel that indicates that on dates prior, the file did not exist. I suspect someone might suggest I just make a complete hard linked replica tree for each date, and this way absent files will clearly be absent. I can assure you this is completely impractical because I have actually done this before. I ended up with backup filesystems that have so many directories and nodes that it could take over a day, maybe even days, to just do something like "du -s" on it. I'm intending to keep daily changes for at least a couple years, if not more. So that means the 40 million plus files would be multiplied by over 700, making programs like "du -s" have to check over 28 BILLION file names (and that's assuming the number of files does not grow over the next two years).

View 2 Replies View Related

Ubuntu :: Rsync For Initial Backup Then Maintenance Backups?

May 9, 2011

So I am using rsync (3.0.7 on MAC OSX) to backup one hard drive to a folder on another one. The is USB drive to USB drive and I have done the initial backup from one drive to a new formatted other drive with the following command:

Code:
rsync -avX --progress /Volumes/Source /Volumes/Destination
This all appears to be going smoothly as I type. I am going to write a script to do subsequent backups in the

[code]....

View 2 Replies View Related

Networking :: Malformed Rsync Command (backups) On ReadyNAS

Oct 6, 2010

I'm trying to set up rsync backups on my ReadyNAS and I'm getting the following error: ERROR: The remote path must start with a module name not a / This error is accompanied by the following information:

[Code]...

View 1 Replies View Related

Ubuntu :: Rsync And Full-disk Backups - Failure Takes Too Long

Mar 20, 2010

I've been using dump/restore for backups, for quite some time. It's worked fine, but the process of recovering from a HD failure takes too long. What with eSATA and external drive docks, what I'd really like is to use rsync to maintain a current clone of my entire system drive. That is, start with a full disk clone, and then use rsync to keep it current.

I've seen plenty of instructions on how to do this with a directory tree, but I've seen none for doing it with a copy of the entire disk. If, for example, I copy /etc/fdisk, then the copied disk would have entries with the same UUIDs as the original disk. Which would mean that if the clone disk were to be bootable, its partitions would need the same UUIDs as the original disk. Which they would be, if the cloned disk started as a full-disk clone, I think. Am I wrong? But that means that when the clone disk was active, I'd have partitions with duplicated UUIDs. Is this going to cause problems? When I boot, will I get the correct partitions loaded?

View 4 Replies View Related

General :: Root Logins Are Not Allowed \ When Try To Login As Root, After Logging Out As User, It Does Not Allow?

Dec 2, 2010

i just installed linux mandriva 2009. i set password for root and created a user account. when i try to login as root, after logging out as user, it does not allow me and gives the error "root logins are not allowed". even it does not show the root account. if i try to go to root from konsole terminal using su root, it allows to enter as a root but when i try to start the GUI with startx it gives error.not sure what to do and why i can't see my account in GUI mode

View 5 Replies View Related

General :: CentOS / Sudo Doesn't Accept Root Password But Logging In As Root Works

Apr 9, 2010

I was trying to edit a file requiring root permissions, so I used sudo. I typed the root password and it failed. This happened three times, and the process was ended. I then logged in as root (su) and was able to navigate to the file and make changes as root. Am I missing something? How would I edit the sudoers file such that this password would work? Or is there another way to log in to the sudo group to make these changes? How do I set sudo passwords?

View 1 Replies View Related

General :: Can Root Create Directory When Not Exists While Backups

Nov 8, 2010

I am getting the databases from mysql and my database name is username_something.
I am getting the username and then puting the respective backups in corresponding folders like

tar bala bla /backups/sql/username/username_something.tar.sql.gz

The problem is system worrks if i have the folder username already there but for new databases if get the error like unknown file path.

How can i do that if username folder is not there it should be created

View 2 Replies View Related

General :: Bash Script For Doing Tape Backups - Need Root Password

Feb 14, 2011

I have a bash script that I am using for doing tape backups. The meat of the bash script is
sudo tar --totals -H pax -cvf /dev/st0 *
This all works just fine.

But of course tape functions have to be ran as root, therefore sudo, requiring the standard user to enter the root password. I would like to be in a situation where the standard user does not need (does not know) the root password. I think my solution is add that standard user.
User named dog to the sudo list.

I have reviewed the sudo man page and looked at [URL]. I am still fuzzy.
1- Will adding user 'dog' to this sudo list do what I expect meaning I can run:
sudo tar --totals -H pax -cvf /dev/st0 *
and the user is not queried for the root password
2- How do I do that? and do I make a cmd alais for only: "tar --totals -H pax -cvf /dev/st0 *"
My distro is OpenSuse.

View 17 Replies View Related

Fedora :: Script To Automate Backups - Storing Copy In Root Directory

Feb 4, 2010

Making a script. This is for my linux class. Basically when you run it, whatever directory it is in, zips everything, backs it up to the folder its in, and also makes a copy of it in the root directory. Here is what I have, but its not running right.

Code:
#!/bin/bash
echo
echo
echo "Automate Backups"
echo -n "Would you like to backup? Y or N:"
read answer1
if [$answer1 = "y"]
then
if [$USER = "root"]
then
echo
tar -cPvzf "$USER"_backup.tar.gz.`date +%F` /"$USER"/*
cp "$USER"_backup.tar.gz.`date +%F` /backups/"$USER"_backup.tar.gz.`date +%F`
echo "Successful Backup"
fi
echo
tar -cPvzf "$USER"_backup.tar.gz.`date +%F` ~/"$USER"/*
cp "root"_backup.tar.gz.`date +%F` /backups/"$root"_backup.tar.gz.`date +%F`
echo "Successful Backup"

View 14 Replies View Related

CentOS 5 :: Scheduled Unattended Backups With Alerts If The Backups Fail

Feb 3, 2011

I've been a DOS/Windows guy for 20 years, and recently became a SW test lab helper. My company uses CentOS for a lot, so I've become familiar with it, but obviously not as comfortable as I am with Windows.

Here's what I have planned:

machine: Core 2 Duo E8400, 8GB DDR2, 60GB SSD OS drive, ATI 4650 video card, other storage is flexible (I have 3 1TB drives and 4 750GB drives around that can be used in this machine.)

uses: HTPC, Network Storage, VMWare server host: SMTP, FTP server, and Web server virtual machines

I've figured out how to do much of this, but I haven't figured out how to do backups in Linux. I've been spoiled with Windows, with the built in backup system so simple to use. I find myself overwhelmed with the array of backup software, and unable to determine which to use. none of them seem to do everything I need them to do, but some come close, I think. I'm hoping someone here can help me out in figuring out which program to use and how to use it.

Here is what I need the backup software to do:
1. scheduled unattended backups, with alerts if the backups fail
2. a weekly full backup with incremental every 12 hours
3. removing the old backups when the new full backup runs, I would prefer to keep 2 weeks of backups, but that's not necessary
4. a GUI would be preferable, since my arthritic fingers don't always do as I want them to do. I typo things a lot, and the label worn off my backspace can attest to that.

View 7 Replies View Related

Security :: Secure And Automated Backups - Add Public Key To Authorized_hosts File On Prod Server?

Mar 13, 2010

I'm trying to find a secure way to backup files on my Prod Server to Backup Server. It must be automated, so I will need to run a command with cron which will login to Prod Server from Backup Server and backup data. 1. Do you think it would be secure enough to do this by creating an passwordless RSA private key on Backup Server and adding it's public key to authorized_hosts file on Prod Server? I can't think of a way to Automate this without having to enter any passwords without passwordless RSA key. Is there another. more secure way? 2. Should I create a special user for backup, which will only have read access to all files in the directory that I am backing up? If so, How can I run a check that this new backup user indeed has read access to ALL files in the folder that I intent to back up? How can I ensure the backup process will not skip files due to some permission problem? 3. I'm thinking of using rsnapshot tool, which uses rsync.

View 10 Replies View Related

Ubuntu :: Logging In As Root ?

Oct 21, 2009

I installed Ubuntu Studio 9.0.4., as a VMWare virtual machine in OSX to check it out. I specified a password to 'root', did not add any other users. (I run the whole show as "admin" in OSX and Windows as well. If some kid wants my files - The mp3's are under "Music".)

Anyhow, the Ubuntu Studio install went through, the nifty login splash screen came up. I tried to login in a "root" with my password, and got the following thing into my face:

"The system administrator is not allowed to login from this screen"

OK, so what "other" login screen does Ubuntu have, then?

View 11 Replies View Related

General :: Is There Any Known Harm In Logging In As Root?

Mar 25, 2010

I am pondering on what would be any implications in logging in via SSH as root?Surely SSH is safe or am I kidding myself and falling for the unwary ethic of logging into a remote Linux box as root?I discovered some open ports remotely on the linux box, and decided to login as root to edit a configuration file to shut off the ports, hence my questioning in whether logging in as root...another point, since SSH is 'supposedly secure', there should not be any implications or am I kidding myself!??? Would it be better to login as normal user then su from there?

Ok, to make things even more interesting, what if its a bog standard generic linux distribution with no suid programs etc, then what happens...take that out of the picture, and say, for editing a configuration file...hackers are not going to see that are they, otherwise by the sound of the answers, it is putting an impression that hackers can see the traffic the minute you login as root?! Otherwise why bother using SSH? I mean, surely, SSH was designed to replace telnet and thereby increase protection...as we all know back in the early 90's before the internet became publicly available, that there was indeed sysadmins dialing in to private networks or telnet'ting into a remote system as root....

View 5 Replies View Related

Ubuntu :: System Is Logging On As Root

Mar 7, 2011

I am using Lucid lynx, 1 partition, Linux is the only OS, and I am the only user. Everything is working fine until I click on "Places> File Browser" the system ask for root password.

Then I enter the Root password and I can then go where ever I want. ( It does not do this every time, just most of the time.)

When I open File Browser the first things listed in the left pane are ROOT, DESKTOP, (which is the root desktop), then FILE SYSTEMS, etc.

I think all the little differences I am experiencing are a result of logging on as ROOT user. I think that when I open File Browser (I use this a lot) and it ask for the ROOT password I am then ROOT and remain ROOT until I log off (I never do, because I am the only user). When I am root, things will look and feel different than when I am logged on as Wayne, but there are some things that I cannot do as Wayne (such as open File Browser). I opened K3b to burn a disk and a window poped up saying "it is not wise to run K3b as root..."

View 7 Replies View Related

Installation :: How To Logging Root User

Nov 27, 2009

How to logging in root user[ubuntu].

View 1 Replies View Related

Ubuntu :: Why Is 'sudo' Better Than Logging In As Root?

Jan 25, 2011

I don't like about it is the fixation of avoiding root login. I read in the sticky post at the top of this forum that logging into a GUI interface as root is nearly always a bad idea. Why is this? If I have access to the root password, and can simply sudo commands as root, what is the functional difference? The only difference I can see is that I have to continually type in my root password for pretty much everything I do. Elevating a user to root status seems to require a call to the almighty.

I'm usually the only one with access to this system, and I generally like to add in user accounts for any other people that will use the system, and leave root for myself. What is the benefit of requiring 'sudo' all the time?

View 8 Replies View Related

Fedora :: Logging In As Root On FC12?

Feb 27, 2010

I can't log in as root in FC12? I could only su from user login to get to root?

View 12 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved