This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygrunsrv problem starting service created with --user


On Wed, 18 Dec 2002, Michael Bourgon wrote:

> Howdy.  I checked the archives, but didn't see
> anything that would shed light on the situation.
>
> I have a fresh Cygwin install, along with Rsync, on a
> Win2k box.  I would like to set up rsync as a daemon.
> The rsync daemon currently works - I can start up
> cygwin, type "rsync --daemon --no-detach" and I have a
> server running.  I can transfer files, no sweat,
> config file works great.
>
> I would like to run the rsync daemon as a service,
> though not using the Local account.  I've successfully
> set it up successfully before (using cygrunsrv), but
> I'd like to have it run as a certain user.  So I used
> cygrunsrv to delete it, then typed the following:
>
> cygrunsrv --install rsync_daemon --user mynetwork\\theusername --desc "rsync daemon from cygwin" --path /usr/bin/rsync -a "--daemon --no-detach"
>
> It then asks for the password, which I type in twice.
> (I tried just using theusername, but it apparently
> wanted the domain name for the account).
>
> It appears to work - everything looks good in
> Services, but when I try to start I get an error
> message that the service could not start, and the
> computer did not return an error.
>
> Does anyone have any suggestions?  Like I said, if I
> add it without the --user it works and starts just
> fine, but it won't start when created with --user.
>
> Any help appreciated.  Thanks.
> Michael

This may be a shell quoting issue.  Try putting the --user parameter in
single quotes (leaving the backslashes around).  Some applications invoke
multiple shells, each of which parses the quoted arguments, so you may
have to quote them multiple times.  Putting single quotes around the user
name at the top level adds one more level of quoting, which may be enough.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
  -- /usr/games/fortune


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]