public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Irfan Adilovic <irfanadilovic@gmail.com>
To: cygwin@cygwin.com
Subject: cygrunsrv --install <svc> --user <user>: avoid having to enter the user's password
Date: Mon, 20 May 2019 03:49:00 -0000	[thread overview]
Message-ID: <CAJoYywWVTtoq1dN9hy5oxvdYzFN0qk70s-UNX198rZYiULreVA@mail.gmail.com> (raw)

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

             reply	other threads:[~2019-05-20  3:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-20  3:49 Irfan Adilovic [this message]
2019-05-21  2:20 ` Chris Wagner
2019-05-22 16:31   ` Irfan Adilovic
2019-05-22 21:35 ` Andrey Repin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJoYywWVTtoq1dN9hy5oxvdYzFN0qk70s-UNX198rZYiULreVA@mail.gmail.com \
    --to=irfanadilovic@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).