Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com From: Andrew Schulman Subject: Re: Running cygwin service via cygrunsrv under account without password in Win XP Pro - impossible? Date: Fri, 3 Jun 2005 11:31:38 -0400 Lines: 47 Message-ID: References: <000b01c5683f$1138ca50$7aa279d1 AT oomph> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit User-Agent: 40tude_Dialog/2.0.15.1 (f7c0b0b1.15.368) X-Archive: Yes X-IsSubscribed: yes > cygrunsrv: Error starting a service: StartService: Win32 error 1069: > The service did not start due to a logon failure. > > This happens only if my account has no password. Once I set any password - > it works great. Autossh starts under cygrunsrv as a service under my account > and sets all my ssh tunnels and everything works perfect. I remove password, > then try every possible way to tell Windows to run it under account without > password - no luck. Error 1069 again and again. > > My account has administrative privileges and "logon as a service" privilege. > I use Windows XP Professional. The cygwin version is the latest (installed > two days ago). > > cygrunsrv.README says: > > -w, --passwd > Optional password for user. Only needed if a user is given. If a > user has an empty password, enter `-w ' with no . > cygrunsrv -I svc_name -p /usr/bin/svc.exe -u foo -w "" Isn't '-w ""' different from just '-w'? In other words, cygrunsrv.README is telling you to use no password, while you're giving it an empty password, which is different. I dunno, but it's worth a try. > This is what I have tried, plus I tried omitting -w option at all and just > pressing Enter key when asked for password by cygrunsrv interactively. I > also tried setting empty password in the Services control panel, by going to > the service properties and then setting my account and empty password in the > LogOn tab there. All with the same result - error 1069. > > Here's the cygrunsrv command lines I've tried (neither works): > > cygrunsrv -I ubcgw -p /bin/autossh -t manual -a '-M 0 -L 143:imap:143 -L > 25:smtp:25 mail.ubc.ca' -e AUTOSSH_NTSERVICE=yes -u vadym -w "" > cygrunsrv -I ubcgw -p /bin/autossh -t manual -a '-M 0 -L 143:imap:143 -L > 25:smtp:25 mail.ubc.ca' -e AUTOSSH_NTSERVICE=yes -u vadym So you could try the first one again, leaving the '-w' but omitting the "". Another option is to run the service as user SYSTEM. This is what I do, and I've never had any trouble. But of course you're right to try to run it under a lower-privilege account. Good luck, and let us know what you find out. Andrew. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/