ERROR: A specified logon session does not exist. It may already have been terminated

Gluszczak, Glenn Glenn.Gluszczak@dell.com
Tue Oct 10 15:14:00 GMT 2017


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 window.  Might be unrelated.
I've never used schtasks.

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


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


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



More information about the Cygwin mailing list