delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/10/10/11:04:04

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: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 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-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 DOT Fournier AT dfo-mpo DOT gc DOT ca>
To: "Gluszczak, Glenn" <Glenn DOT Gluszczak AT dell DOT com>,
"cygwin AT cygwin DOT com" <cygwin AT cygwin DOT 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 AT SVNSBIOMBX01 DOT ENT DOT dfo-mpo DOT ca> <91DCAC3CB99C724EB365BB64677FBE7B1EFC1B60 AT MX204CL04 DOT corp DOT emc DOT com>
In-Reply-To: <91DCAC3CB99C724EB365BB64677FBE7B1EFC1B60@MX204CL04.corp.emc.com>
MIME-Version: 1.0
X-IsSubscribed: yes
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 DOT Gluszczak AT dell DOT com] 
Sent: October-10-17 11:48 AM
To: Fournier, Danny G; cygwin AT cygwin DOT 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


- Raw text -


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