delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/05/19/23:49:52

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:from:date:message-id:subject:to
:content-type; q=dns; s=default; b=yfF/r851FguynZUXcMJ5qfxDRECX1
pDXplcSlG0pBGOXgG7It4x3WDzPGHhvijGXXgU8P0PzTCUhxwFLABf//VIU7upf5
cyQeSSu9i8+qySYrtpAdQn/+doIVr6IGz7fQs+xQs9bZpmhXb4NYhUmVfJ9czyz7
4jVB+5W6jU0/M8=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:from:date:message-id:subject:to
:content-type; s=default; bh=n3sQEhUUekM7F8xDAaLsQYacEVk=; b=kZx
7Xu7Kuyxw6bW5MrVlIZI3jDE24TJ6UdynrYmczMIM0ZezqvAtphnVeL4FpPpdKWp
AB0kS1FeTw4ZIZ8xbuJ14W6GtBeBpFYXIChGRPPRdyPOz9E5SsLuULFS9CLuCTQQ
KvR6hbqSOWR9Fy1AtwJTwqGHuPpCwNu0S9yFdSWM=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=0.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=enter, HX-Languages-Length:1115, gladly, dozen
X-HELO: mail-wr1-f65.google.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=H1yyB8dkI3/M0ViwzYznep4cY4tlAAHDR6/pki74GzA=; b=BXQC8sPs5wt/o6iiqhnjTnFCNqtVq+EgPot3H462NJTItxMDKXg4HYZ/DQahdawzdZ Aa3fj9AuneCYuqJR2bsl+gK1fAnmjiFENjrnnSDnAISV0Z3PEKeWlQMMqxxYmW+AS6Uw igwrBVwQ7bmd6OGZehEmp3eCc3NGDcbrrnhymXtTbCH4TNqu96DINSG8lgo+tOQbmuys NEb9xLYi5xQxNUsnTfyeB8SrB08C6nhvpZ4sjQ9mxtWCYkfsLjyz6lAWl5X+cglHzp2N d0cTdNCRdVpeq4SSlrTGLPIFLn7IjAvZ+BwoSAt4ppDG0w94wUC0VVnZAbSi0lU0ukj8 wL6Q==
MIME-Version: 1.0
From: Irfan Adilovic <irfanadilovic AT gmail DOT com>
Date: Mon, 20 May 2019 05:49:17 +0200
Message-ID: <CAJoYywWVTtoq1dN9hy5oxvdYzFN0qk70s-UNX198rZYiULreVA@mail.gmail.com>
Subject: cygrunsrv --install <svc> --user <user>: avoid having to enter the user's password
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019