I have rsync daemon running on a fedora core 4 box that I am trying to use as a backup server for my web sites. I dont have shell access on my web host so will need to run a cron job to do the backups, which is what I want to do anyway. For testing purposes however I am using a php script using the "system()" function so I am getting some feedback. In my rsyncd.conf file I have the following very simple module for testing purposes max connections = 2 syslog facility = local3 log file = /var/log/rsyncd.log [test] uid = lhotch gid = lhotch comment = test area path = /lhotch read only = no list = yes use chroot = yes hosts allow = xx.xx.xx.xx auth users = larry secrets file = /etc/rsyncd.secrets from the web host when I run the following command rsync -P -v -W -r --password-file=/path/secrets.rsync * larry@xx.xx.xx.xx::lhotch/ now in the above, I have substituted the real IP that im using with x's and the path to the secret file is a valid absolute path to secrets.rsync(which contains only the password that matches the one in rsyncd.secrets). My /etc/rsyncd.secrets file has its permissions set at 600 and the rsync daemon is running under root. If I run just this command rsync xx.xx.xx.xx:: I get the available modules so I know the 2 servers are talking. Additionally if I remove the auth users and secrets file directives from rsync config All of the files from the directory where the script is run on down get copied so everything seems to be working but authentication. I tried changing the hosts allow to an ip other than the one I am running the command from and the transfer doesnt work so that also seems to be working. On every failed attempt however with auth users and secrets file in rsyncd.conf I do get 2 errors in the log... 2006/03/31 17:45:00 [3494] forward name lookup for xx.xx-xx-xxx.reverse.theplanet.com failed: Name or service not known 2006/03/31 17:45:00 [3494] auth failed on module test from unknown (xx.xx.xx.xx). So, it seems the reverse DNS looking cant be resolved yet the auth users seems to still work and then I assume the next error is that auth for the user failed. Can anyone shed some light on what I am doing wrong? Larry.
On Fri, Mar 31, 2006 at 06:52:30PM -0600, Larry Hotchkiss wrote:> rsync -P -v -W -r --password-file=/path/secrets.rsync * > larry@xx.xx.xx.xx::lhotch/I assume you meant to say "test" there instead of "lhotch", since that's the module's name.> 2006/03/31 17:45:00 [3494] auth failed on module test from unknown > (xx.xx.xx.xx).If you upgrade to a more modern rsync, it will mention (in the log file only) the exact reason that the authorization failed. It can be any number of reasons, from the user "larry" not being in the daemon's secrets file, the password not matching, etc. Also, older rsyncs were particular about the files ending with a newline (which is fixed in newer versions). ..wayne..
At 09:44 PM 4/1/2006 -0800, Wayne Davison wrote:>On Fri, Mar 31, 2006 at 06:52:30PM -0600, Larry Hotchkiss wrote: > > rsync -P -v -W -r --password-file=/path/secrets.rsync * > > larry@xx.xx.xx.xx::lhotch/ > >I assume you meant to say "test" there instead of "lhotch", since that's >the module's name.That is a correct assumption> > 2006/03/31 17:45:00 [3494] auth failed on module test from unknown > > (xx.xx.xx.xx). > >If you upgrade to a more modern rsync, it will mention (in the log file >only) the exact reason that the authorization failed. It can be any >number of reasons, from the user "larry" not being in the daemon's >secrets file, the password not matching, etc. Also, older rsyncs were >particular about the files ending with a newline (which is fixed in >newer versions). > >..wayne..Thanks Wayne, I did see mention of the newlines and I did try it having added a newline to all my files (ie config, secrets.rsync and rsyncd.secrets). I did forget to mention im running V2.6.4 but Im sure you assumed that was the newest I could be using. Ill try and round up a more current version, Thanks. Larry.
At 09:44 PM 4/1/2006 -0800, Wayne Davison wrote:>On Fri, Mar 31, 2006 at 06:52:30PM -0600, Larry Hotchkiss wrote: > > rsync -P -v -W -r --password-file=/path/secrets.rsync * > > larry@xx.xx.xx.xx::lhotch/ > >I assume you meant to say "test" there instead of "lhotch", since that's >the module's name. > > > 2006/03/31 17:45:00 [3494] auth failed on module test from unknown > > (xx.xx.xx.xx). > >If you upgrade to a more modern rsync, it will mention (in the log file >only) the exact reason that the authorization failed. It can be any >number of reasons, from the user "larry" not being in the daemon's >secrets file, the password not matching, etc. Also, older rsyncs were >particular about the files ending with a newline (which is fixed in >newer versions). > >..wayne..Just an update, I upgraded to rsync 2.6.7 and the error is more clear in that it states a password mismatch but I double checked the contents of password-file=/path/secrets.rsync and the password matches what is contained in rsyncd.secrets file. To test the accuracy of the error I renamed the password-file=/path/secrets.rsync to something else but left the command unchanged and I got the identicle auth error which tells me that it will give a password mismatch if it cant find the password file as well. Thinking it may be a permission issue with rsync not being able to read the password file I changed its permissions to 777 and I still get the same error. Can anyone shed any light? Lary.