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:references:in-reply-to:from:date :message-id:subject:to:content-type; q=dns; s=default; b=JDkesKX YvJS9A9Rjn4DFLrC2Wb9xoMPlubaxRBsnJ9K+w2GAQLf3+hM560qnwsUgiTq299R byF1Qkyuaa+v0WQbcK9k64rJRUFx+EzF5Z4pc+tOY2e12Y76bwoRI1q0M256gn+O XqI6lRq5Ki5mPR+eYZvGmNGt0Rf/HM/88JYU= 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:references:in-reply-to:from:date :message-id:subject:to:content-type; s=default; bh=6J0b1z9mDDB1Z lcOnGFEYfqpjOI=; b=X7ixQVFPwLzsVOEpGl57oUQOVCCZXmGVrt2EKEOlOz9Qg K9RpIFnCs6O7zNkBrf/Fku9xj3YJD00ndnd6SvfsKnhTbWnoRFJdzk/yfIdbds0R Rq/HwWJKDRChRjo58nyMzXjUANuCLStPzXmHiayanDj2XJecNc+mv7zL65//9c= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=wagner, sk:unsubsc, chris, Easy X-HELO: mail-wr1-f68.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=f4Ldrl6F7n5B76nudY/yHZU0baXsLUYPTxS25mlNT2E=; b=eWnXpR89jZc6ivzBXpgxDzBTYYjIfd9L3fLT4BSBjSXMJ6XKVAWKVpCcP8Z+EP9HTI yI9Ohpv+fI+b4OneQ4wP5h0Gdna4taS899+xuCS9Hqzr5NmhSR9ifvJuifzPz0vE+Maq DedrJpCqVJG2LuQFgvkyV3CgI1RBoekq27qupX0WbA0AQu7aP20lv2jHjR9188BxO4o1 yxJjw3KVXCWi7DeYR7FOzunZW+9XK4/4gkTAzsnxPPaWrbV3AQoTXEGr+lfOqJ/jJutq Z0XaRLONHfA5CJV/Wz470M3axo9dNEvgEuV7tEqJXqSzH63oJRYCxIZc9OD0knCep2IT FsSg== MIME-Version: 1.0 References: <55eb0fac0febf91e25b30f906b552403 AT plebeian DOT com> In-Reply-To: <55eb0fac0febf91e25b30f906b552403@plebeian.com> From: Irfan Adilovic Date: Wed, 22 May 2019 18:30:46 +0200 Message-ID: Subject: Re: cygrunsrv --install --user : avoid having to enter the user's password To: cygwin AT cygwin DOT com Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes On Tue, 21 May 2019 at 04:20, Chris Wagner wrote: > > Hi Irfan, > > I'm assuming that there is some reason you don't want to use the > password option: > -w, --passwd Optional password for user. Only needed > if a user is given. If a user has an empty > password, enter `-w '. If a user is given > but > no password, cygrunsrv will ask for a > password > interactively. Nope, no reason, I completely missed this option... While I was hoping to not have to enter any password (like for SYSTEM, but I guess that account's special) -- this is also fine, thanks a lot. -- Irfan > The password prompt can be scripted with Perl. (Assuming you *have* the > password) > > use IO::Pty::Easy; > $io = IO::Pty::Easy->new; > @cmd = qw{cygrunsrv -I name -t manual -p /c/foo.exe -u name}; > $io->spawn(@cmd); > printf "read: %s\n", $io->read; > printf "write: %s\n", $io->write("foo\n"); > printf "read: %s\n", $io->read; > printf "write: %s\n", $io->write("foo\n"); > printf "read: %s\n", $io->read; > $io->close; > > > Hope that helps. > -Chris > > > On 2019-05-19 11:49 pm, Irfan Adilovic wrote: > > 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? > > > -- > 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 > -- 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