3

I've configured rsync on one of my servers, the configuration looks like that:

[root@pnmpg4 ~]# cat /etc/rsyncd.conf 
 max connections = 2
  log file = /var/log/rsync.log
  timeout = 300

[hadoop_out]
    comment =  hadoop_out
    path = /mass1/mt_data/hadoop_out 
    read only = no
    list = yes 
    uid = 502
    gid = 502
    auth users = syncuser
    secrets file = /etc/rsyncd.secrets
    hosts allow = X.X.X.X

xinetd manages the rsync daemon:

[root@pnmpg4 ~]# cat /etc/xinetd.d/rsync 
# default: off
# description: The rsync server is a good addition to an ftp server, as it \
#   allows crc checksumming etc.
service rsync
{
    disable = no
    socket_type     = stream
    wait            = no
    user            = root
    server          = /usr/bin/rsync
    server_args     = --daemon
    log_on_failure  += USERID
}

The secrets file includes only one line:

user:password

rsync secrets file permissions is like so:

[root@pnmpg4 ~]# ls -ld /etc/rsyncd.secrets 
-rw------- 1 root root 18 2015-01-22 01:07 /etc/rsyncd.secrets

When I run a rsync command like so:

rsync -raPv rsync://syncuser@X.X.20.18/hadoop_out/*/*.complete .

I keep getting asked to enter a password, what am I missing? this is supposed to be an automatic process which doesn't ask for a password, can you find the reason for this behavior?

Thanks in advance,

1 Answer 1

6

The secrets file is meant to define a password that remote clients need to supply in order to connect to the local rsync daemon, it is not used to specify a password for the connecting client.

On the remote machine, you can either use the RSYNC_PASSWORD environment variable to specify the password or use the --password-file option and store it in a file.

1
  • So how would my command look if let's say the passowrd is PASSWORD?
    – Itai Ganot
    Jan 22, 2015 at 10:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.