tags:

views:

16

answers:

1

Hi, I am trying to get some files from a mounted read-only disk on a remote computer (Ubuntu) using recursive rsync. I am the administrator on both the remote and local machine. For a few files, I am told that I don't have sufficient privileges to access their directories. I tried to rsync as root@hostname, but it rejects the password I normally use as sudo (this method works ok on an OS X machine I use). In my sshd_config file, PermitRootLogin is set to yes (and it's not an issue of sshd restart), and there list no list of DenyUsers. Is there still a way I can try to get these files? Thanks.

+1  A: 

You have to enable the root account on the other machine. ssh as your normal user and run

sudo passwd root

And type in your password. Ubuntu, by default, uses the sudo system, which doesn't use the root account but instead raises the current user's privileges.

mathepic
As a note: You may want to experiment using `su` instead of `sudo` and using your `root` login like that. I prefer that (mainly because Ubuntu uses `sudo` for something `sudo` was _not_ meant to be used for)
mathepic
Ah, so that's it. Regarding su/sudo - Ubuntu Community doc says: "sudo is commonly used to execute only a single command, while su is generally used to open a shell and execute multiple commands", so sudo seems fine here...
Stephen
Yes, you can use it for that purpose.
mathepic