From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 33285 invoked by alias); 10 Oct 2017 16:54:50 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 33261 invoked by uid 89); 10 Oct 2017 16:54:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,KAM_ASCII_DIVIDERS,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: VSNSBIODMZEDG01.DFO-MPO.GC.CA Received: from vsnsbiodmzedg01.dfo-mpo.gc.ca (HELO VSNSBIODMZEDG01.DFO-MPO.GC.CA) (205.193.112.129) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 10 Oct 2017 16:54:47 +0000 Received: from VSNSBIOHC02.ENT.dfo-mpo.ca (142.2.10.29) by VSNSBIODMZEDG01.DFO-MPO.GC.CA (142.2.40.129) with Microsoft SMTP Server (TLS) id 14.3.339.0; Tue, 10 Oct 2017 13:54:33 -0300 Received: from SVNSBIOMBX01.ENT.dfo-mpo.ca ([fe80::1ed:ea1:ebb5:e9f4]) by VSNSBIOHC02.ENT.dfo-mpo.ca ([::1]) with mapi id 14.03.0339.000; Tue, 10 Oct 2017 13:54:28 -0300 From: "Fournier, Danny G" To: "Gluszczak, Glenn" , "cygwin@cygwin.com" Subject: RE: ERROR: A specified logon session does not exist. It may already have been terminated Date: Tue, 10 Oct 2017 16:54:00 -0000 Message-ID: <513AA0729B894545B2D793D01FFF8B6D4719BB61@SVNSBIOMBX01.ENT.dfo-mpo.ca> References: <513AA0729B894545B2D793D01FFF8B6D4719B909@SVNSBIOMBX01.ENT.dfo-mpo.ca> <91DCAC3CB99C724EB365BB64677FBE7B1EFC1B60@MX204CL04.corp.emc.com> <513AA0729B894545B2D793D01FFF8B6D4719B986@SVNSBIOMBX01.ENT.dfo-mpo.ca> <91DCAC3CB99C724EB365BB64677FBE7B1EFC1B90@MX204CL04.corp.emc.com> In-Reply-To: <91DCAC3CB99C724EB365BB64677FBE7B1EFC1B90@MX204CL04.corp.emc.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2017-10/txt/msg00101.txt.bz2 Glenn, I was able to run the command and find the file, albeit empty. Here are the= commands I ran: my_user@MY_SERVER ~ $ runas /noprofile /user:MY_SERVER\my_user echo hello > a.txt my_user@MY_SERVER ~ $ runas /noprofile /user:MY_SERVER\administrator echo hello > b.txt Even in the Command Prompt on the server, runas in this fashion yields an e= mpty file.=20 If I simply run echo hello > file.txt, "hello" can be seen in the file (bot= h in the Command Prompt in Windows and via Cygwin/SSH). Dan -----Original Message----- From: Gluszczak, Glenn [mailto:Glenn.Gluszczak@dell.com]=20 Sent: October-10-17 12:14 PM To: Fournier, Danny G; cygwin@cygwin.com Subject: RE: ERROR: A specified logon session does not exist. It may alread= y have been terminated It may still work but you don't see the other terminal window unless you're= on the desktop. To prove, try this command instead. runas /noprofile /user:orawin\administrator echo hello > a Then look for the file "a". I was just wondering if perhaps the issue was due to spawning a separate wi= ndow. Might be unrelated. I've never used schtasks. ----------------------------------------------------- Glenn, I suspect that runas doesn't work through SSH. I ran it without any paramet= ers which resulted in no output in the terminal. However, if I run runas through the Windows Command Prompt, I clearly see o= utput indicating that I missed required parameters. Thanks, Dan 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 Wi= ndows Server 2008 R2. Once we connect to the server using SSH, using a user where we have exchang= ed 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 t= erminated. 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 netwo= rk authentication -We have also added the user into the following Local Policy: Log on as a b= atch job and Log on as a service -The user has permission to read and execu= te schtasks.exe -We regenerated passwd and group files -Command prompts in = Windows, running as the specific user, can run schtasks.exe without any pro= blem We are able to successfully call other executables: icacls.exe, robocopy.ex= e, 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 -- 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