Mail Archives: cygwin/2005/07/18/23:43:09
At 12:23 AM 7/18/2005, you wrote:
>On Jul 17, Larry Hall wrote:
>> At 08:58 PM 7/17/2005, Eli wrote:
>> >
>> >When I try that (after shutting down the existing sshd with
>> >cygrunsrv -E) I get errors when trying to access private key files
>> >in /etc. How do I make them accessible to my user? Maybe there is
>> >some simple way to make it so that sshd always runs as me instead
>> >of the system thing? I don't mind making it a one person service
>> >since this is used only by my script for our nighly builds (and at
>> >this point I'll go with anything that works...).
>>
>> OK. So try this:
>>
>> cygrunsrv --stop sshd
>> cygrunsrv --remove sshd
>> cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd -a -D -u eli -w "<your password>" -e "CYGWIN=tty notraverse"
>>
>> <your password> is the password you use for user 'eli'.
>
>Is it saving the password in a not-too-obvious way?
>
I don't know about this, though I expect it's true. See the cygrunsrv
source if you're interested further.
>> [...]
>> You'll need to change some permissions. Try this:
>>
>> chown eli /etc/ssh*
>> chown eli /var/log/sshd.log
>>
>> Then start the service:
>>
>> cygrunsrv --start sshd
>>
>> With any luck, that will run. Note - I haven't tried this myself
>> but it should be a pretty complete guide. You'll be the final judge
>> (and test) though. ;-)
>
>I followed all this, and ended up with:
>
> $ cygrunsrv --start sshd
> cygrunsrv: Error starting a service: StartService: Win32 error 1069:
> The service did not start due to a logon failure.
>
>Following the advice at
> http://sources.redhat.com/ml/cygwin/2001-05/msg00909.html
>I added my username to "Local Security Settings/User Rights
>Assignment/Log on as a service". After that I got a
>
> $ cygrunsrv --start sshd
> cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1053:
> The service did not respond to the start or control request in a timely fashion.
>
>and now I can't even stop or remove it -- in both cases I get
>
> $ cygrunsrv --remove sshd
> cygrunsrv: Error removing a service: ControlService: Win32 error 1061:
> The service cannot accept control messages at this time.
Yeah, that's true. You can kill the outstanding cygrunsrv process though
and that will take care of the problem though.
Forgot two things. First, your user must be a member of the local
Administrators group. Second, 'chown eli /var/empty'. That should do
it. It did for me.
>> Actually, the strong preference is that you *attach* this
>> information, not append it.
>
>(The "attach it as a straight text file" is confusing -- sounds like a
>textual attachement, which is identical in some mailers to appending
>the text.)
OK, that's not what was meant though.
>> You are apparently setting CYGWIN in your local user environment.
>> You'd want to set in it you system environment or use the method I
>> showed above to set it for just this service.
>
>I did do it in the "system variables" part of the environment
>dialog...
That should work if you start the service from somewhere that sees this
setting. But, like I said, you probably really want this set as part of
the service install.
--
Larry Hall http://www.rfk.com
RFK Partners, Inc. (508) 893-9779 - RFK Office
838 Washington Street (508) 893-9889 - FAX
Holliston, MA 01746
--
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/
- Raw text -