Hello,
Any environment variables listed are not taking effect: for example:
SET USER=username
SET LOGNAME=username
SET USERNAME=username
SET RSYNC_PASSWORD=password
none of these will be recognized when I do:
rsync -avP --stats --delete "/cygdrive/c/test_dir/" server.net:/testdir
I know I can do username@server.net:/testdir, but I want to know why this is not working via setting the environment variable
The rsync server will report back a user named "na" , and will still prompt for password. Why are the environment variables not being used?
Thanks
What's your server platform ? How is rsync configured on that server ?
It is windows 2003 server:
rsync.conf:
use chroot = false
strict modes = false
hosts allow = 192.168.1.2
log file = rsyncd.log
pid file = rsyncd.pid
# Module definitions
# Remember cygwin naming conventions : c:\work becomes /cygwin/c/work
#
path = /cygdrive/c/inetpub/rsync_storage
read only = false
transfer logging = yes
Thanks
FAQ "How can I secure connections between windows rsync clients and cwRsync servers ? " may be relevant in your case. You can update the batch file generated by the wizard with your environment variables. At the server side, you have to use options auth users and secrets file :
From rsync configuration file documentation:
See also the "CONNECTING TO AN RSYNC DAEMON OVER A REMOTE SHELL PROGRAM" section in rsync(1) for information on how handle an rsyncd.conf-level username that differs from the remote-shell-level username when using a remote shell to connect to an rsync daemon.
There is no default for the "secrets file" option, you must choose a name (such as /etc/rsyncd.secrets). The file must normally not be readable by "other"; see "strict modes".