Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi guys. So here's my situation. I have a server I'm about to wipe and rebuild. I have a backup at a remote location but I want the files locally so I can fool around with them and pick and choose what i want on the server. So I want to rsync certain directories over ssh.
Here's what I'm doing.
My rsync command:
rsync -avz -e "ssh -p 22" mjboa@site:/etc/ /home/mike/Documents/Projects/site_backup_12_3_09/etc/ --rsync-path="sudo rsync"
This worked on a different directory so I know I have the basics down.
The confusing part is that I need root access on the remote machine to read /etc but I don't want to PermitRootLogin on sshd.
So I read somewhere that I can set it so that I don't need to enter a password for sudo with just rsync and I can set the command rsync runs on the remote machine. Makes perfect sense.
So I have my sudoers on the remote machine:
mjboa ALL=PASSWD: ALL, NOPASSWD:/usr/bin/rsync
I see nothing wrong with this, even through the screwed syntax of sudoers, and I've had trouble with sudoers before.
What I get out of this is when i log in as mjboa on my server, I don't get prompted for a password at all, for any command.
And when I run the rsync command, it actually prompts me for a password! And it displays it in plain text and does nothing when I enter it.
What the hell is going on? Someone has to have done this successfully before.
Hi guys. So here's my situation. I have a server I'm about to wipe and rebuild. I have a backup at a remote location but I want the files locally so I can fool around with them and pick and choose what i want on the server. So I want to rsync certain directories over ssh.
Here's what I'm doing.
My rsync command:
rsync -avz -e "ssh -p 22" mjboa@site:/etc/ /home/mike/Documents/Projects/site_backup_12_3_09/etc/ --rsync-path="sudo rsync"
This worked on a different directory so I know I have the basics down.
The confusing part is that I need root access on the remote machine to read /etc but I don't want to PermitRootLogin on sshd.
So I read somewhere that I can set it so that I don't need to enter a password for sudo with just rsync and I can set the command rsync runs on the remote machine. Makes perfect sense.
So I have my sudoers on the remote machine:
mjboa ALL=PASSWD: ALL, NOPASSWD:/usr/bin/rsync
I see nothing wrong with this, even through the screwed syntax of sudoers, and I've had trouble with sudoers before.
What I get out of this is when i log in as mjboa on my server, I don't get prompted for a password at all, for any command.
And when I run the rsync command, it actually prompts me for a password! And it displays it in plain text and does nothing when I enter it.
What the hell is going on? Someone has to have done this successfully before.
Thanks.
Has anyone solved this? I have a dynamic IP for my workstation, and it won't be an option to rsync from server to workstation...
I know that I can set --rsync-path='sudo rsync' ... but I have to disable requiretty, and that's pretty insecure if I understand correctly...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.