X-Recipient: archive-cygwin@delorie.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:from:to:subject:date:message-id:references
	:in-reply-to:content-type:content-transfer-encoding
	:mime-version; q=dns; s=default; b=fnCaNz0YTAhFbJ7ew9pAu2R+WVCkJ
	Vm1W0yHHkiVuNglujP7aseMCcjCgo/xR2K0VP0O7m7iVGl5gEXnjxeMhWiQ0CRj+
	e70KYTt+MfE3QMCrOc85W5rEOVF0VbV/kIR+85RJX9VVYzdnN2oNJbHusJZ/uLTB
	p+RqsUaTNw6RKI=
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:from:to:subject:date:message-id:references
	:in-reply-to:content-type:content-transfer-encoding
	:mime-version; s=default; bh=zlvkjUTQNCo4YGJsKGrCKjK5Byo=; b=juW
	rH6qVRbXhIN5OpN0ETPw2SP6ik2I3tsnrNkToGwpmWMu1KSODen9UUtMAuV5r9le
	A/2uTKUeLTMTHPnfPARevJxrawLg3TckOCilXN374Jq346pSAWhBySSvLGy0DyOe
	rrFF+vzGtZ8utPal+rUKDFE+r3jBekQX6AgZznZY=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=danny, Danny, H*r:0300, exchanged
X-HELO: VSNSBIODMZEDG01.DFO-MPO.GC.CA
From: "Fournier, Danny G" <Danny.Fournier@dfo-mpo.gc.ca>
To: "Gluszczak, Glenn" <Glenn.Gluszczak@dell.com>,
        "cygwin@cygwin.com"	<cygwin@cygwin.com>
Subject: RE: ERROR: A specified logon session does not exist. It may already have been terminated
Date: Tue, 10 Oct 2017 15:03:02 +0000
Message-ID: <513AA0729B894545B2D793D01FFF8B6D4719B986@SVNSBIOMBX01.ENT.dfo-mpo.ca>
References: <513AA0729B894545B2D793D01FFF8B6D4719B909@SVNSBIOMBX01.ENT.dfo-mpo.ca> <91DCAC3CB99C724EB365BB64677FBE7B1EFC1B60@MX204CL04.corp.emc.com>
In-Reply-To: <91DCAC3CB99C724EB365BB64677FBE7B1EFC1B60@MX204CL04.corp.emc.com>
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
X-IsSubscribed: yes
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id v9AF42Tl006997

Glenn,

I suspect that runas doesn't work through SSH. I ran it without any parameters which resulted in no output in the terminal.

However, if I run runas through the Windows Command Prompt, I clearly see output indicating that I missed required parameters.

Thanks,

Dan

-----Original Message-----
From: Gluszczak, Glenn [mailto:Glenn.Gluszczak@dell.com] 
Sent: October-10-17 11:48 AM
To: Fournier, Danny G; cygwin@cygwin.com
Subject: RE: ERROR: A specified logon session does not exist. It may already have been terminated

Does schtasks.exe open a separate/new terminal session?
You could check if a command like "runas" works through ssh.

runas /noprofile /user:mymachine\administrator dir

Glenn

---------------------------------------------------------------------------


We recently upgraded Cygwin to 2.9.0(0.318/5/3) from 2.0.4(0.287/5/3) on Windows Server 2008 R2.

Once we connect to the server using SSH, using a user where we have exchanged keys for, we call the following command:
schtasks.exe /Run /TN "SomeJobName"

This will give the following error:
ERROR: A specified logon session does not exist. It may already have been terminated.

We will also get the same error by simply invoking schtasks.exe without any parameters, which is supposed to list the jobs currently configured on the server.

What we have done:

-Most articles found state to change the following Local Policy to disabled (which was set already):
Network access: Do not allow storage of passwords and credentials for network authentication

-We have also added the user into the following Local Policy: Log on as a batch job and Log on as a service -The user has permission to read and execute schtasks.exe -We regenerated passwd and group files -Command prompts in Windows, running as the specific user, can run schtasks.exe without any problem

We are able to successfully call other executables: icacls.exe, robocopy.exe, sc.exe and even powershell.exe.

We also tested against another server with Cygwin 2.7.0(0.306/5/3) and got the same issue.

Dan


--
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


