This is the mail archive of the
cygwin
mailing list for the Cygwin project.
cygrunsrv --install <svc> --user <user>: avoid having to enter the user's password
- From: Irfan Adilovic <irfanadilovic at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Mon, 20 May 2019 05:49:17 +0200
- Subject: cygrunsrv --install <svc> --user <user>: avoid having to enter the user's password
Hi,
(All actions here assume an elevated mintty terminal)
I have the need to automate the installation of autossh as a windows
service (=> several dozen autossh services) and when installing as a
local user, the password prompt is an issue.
Is there a way to add windows services with cygrunsrv from an elevated
mintty bash shell to run as a local user, somehow without requiring
that local user's password each time the service is installed?
So far my only solution was to install the services to run as the
default SYSTEM user which doesn't require a password, and to
cron-rsync the necessary ~local-user/.ssh/config and private keys to
the ~SYSTEM/.ssh, with appropriate ownership and permissions fixes.
But this is ugly and I'm hoping for a better solution.
(Another solution would be to somehow share the ~.ssh/ between the
local user and SYSTEM, but given the security constraints on that
folder and its contents, I don't think this is feasible -- but I'll
gladly see me wrong on this, if there's an approach)
-- Irfan
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple