Register a domain and help support LQ
Go Back > Blogs > catkin
User Name


Rate this Entry

VBS for cwrsync - RSYNC_PASSWORD gotcha

Posted 12-23-2011 at 12:19 AM by catkin
Updated 12-23-2011 at 12:20 AM by catkin (Added comment moderation and email notification)

When running cwrsync as SYSTEM it difficult to satisfy rsync's requirement that the password file must be owned by root and readable only by root.

One solution is to set the RSYNC_PASSWORD environment variable.

When using Visual Basic Script to automate the cwrsync run, there's a "gotcha" -- RSYNC_PASSWORD must be a SYSTEM environment variable, not a USER environment variable.

Sample code:
objWshShell.Environment("SYSTEM").Item("RSYNC_PASSWORD") = strPassword
and, to unset it:
When the VBS is run as a Scheduled Task with RSYNC_PASSWORD a USER environment variable, rsync hangs, prompting for a password that cannot be entered. The rsync server log contains a single line, something like:
2011/12/22 22:50:12 [2100] connect from CW8vWXP.localdomain (
Posted in Uncategorized
Views 920 Comments 0
« Prev     Main     Next »
Total Comments 0




All times are GMT -5. The time now is 01:44 PM.

Main Menu

Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration