* Can't create scheduled task over ssh as current user
@ 2019-02-19 19:14 John Oxley
2019-02-19 19:22 ` Bill Stewart
0 siblings, 1 reply; 4+ messages in thread
From: John Oxley @ 2019-02-19 19:14 UTC (permalink / raw)
To: cygwin
Hello all,
I'm running a Windows 10 VM with a fairly recent installation of Cygwin (last month or so).
If I ssh into the box as the user "foo", I cannot create a scheduled task for the user:
foo@host $ schtasks /create /ru foo /rp fooPassword /sc HOURLY /tn foobar /tr 'echo foo'
ERROR: The user name or password is incorrect.
If on the otherhand I log in as the user "bar" and run exactly the same command, the scheduled task is created
bar@host $ schtasks /create /ru foo /rp fooPassword /sc HOURLY /tn foobar4 /tr 'echo foo'
SUCCESS: The scheduled task "foobar4" has successfully been created.
If I log into the VM with remote desktop as the user foo, I can create the task.
I have tried substituting /ru and /rp with /u and /p but get the error
ERROR: User credentials are not allowed on the local machine.
I am not sure what is going on and would love some help.
Thanks
-John
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Can't create scheduled task over ssh as current user
2019-02-19 19:14 Can't create scheduled task over ssh as current user John Oxley
@ 2019-02-19 19:22 ` Bill Stewart
2019-02-19 19:40 ` John Oxley
0 siblings, 1 reply; 4+ messages in thread
From: Bill Stewart @ 2019-02-19 19:22 UTC (permalink / raw)
To: cygwin
On Tue, Feb 19, 2019 at 12:02 PM John Oxley wrote:
> I'm running a Windows 10 VM with a fairly recent installation of Cygwin (last month or so).
>
> If I ssh into the box as the user "foo", I cannot create a scheduled task for the user:
>
> foo@host $ schtasks /create /ru foo /rp fooPassword /sc HOURLY /tn foobar /tr 'echo foo'
> ERROR: The user name or password is incorrect.
>
> If on the otherhand I log in as the user "bar" and run exactly the same command, the scheduled task is created
>
> bar@host $ schtasks /create /ru foo /rp fooPassword /sc HOURLY /tn foobar4 /tr 'echo foo'
> SUCCESS: The scheduled task "foobar4" has successfully been created.
>
> If I log into the VM with remote desktop as the user foo, I can create the task.
>
> I have tried substituting /ru and /rp with /u and /p but get the error
> ERROR: User credentials are not allowed on the local machine.
>
> I am not sure what is going on and would love some help.
Regarding schtasks:
The /u and /p parameters mean "credentials for the user that has
permission to create a task," not "credentials for the task itself"
(credentials for the task itself are /ru and /rp). They only work for
a remote machine (/s parameter).
With that said: Why do you need to ssh to the machine to create a
task? Just create the task remotely from the machine you're on.
I'd recommend PowerShell anyway for more flexibility (New-ScheduledTask, etc.).
Bill
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Can't create scheduled task over ssh as current user
2019-02-19 19:22 ` Bill Stewart
@ 2019-02-19 19:40 ` John Oxley
2019-02-19 20:20 ` Bill Stewart
0 siblings, 1 reply; 4+ messages in thread
From: John Oxley @ 2019-02-19 19:40 UTC (permalink / raw)
To: cygwin
________________________________
From: cygwin-owner@cygwin.com <cygwin-owner@cygwin.com> on behalf of Bill Stewart <bstewart@iname.com>
Sent: 19 February 2019 19:15
To: cygwin@cygwin.com
Subject: Re: Can't create scheduled task over ssh as current user
On Tue, Feb 19, 2019 at 12:02 PM John Oxley wrote:
>> I'm running a Windows 10 VM with a fairly recent installation of Cygwin (last month or so).
>> If I ssh into the box as the user "foo", I cannot create a scheduled task for the user:
>> foo@host $ schtasks /create /ru foo /rp fooPassword /sc HOURLY /tn foobar /tr 'echo foo'
>> ERROR: The user name or password is incorrect.
> Regarding schtasks:
> The /u and /p parameters mean "credentials for the user that has
> permission to create a task," not "credentials for the task itself"
> (credentials for the task itself are /ru and /rp). They only work for
> a remote machine (/s parameter).
Yeah, I figured that out. I was trying to use "/s hostname /u foo /p fooPassword" to try and force a remote setup.
> With that said: Why do you need to ssh to the machine to create a
> task? Just create the task remotely from the machine you're on.
In this case I am on a Linux machine. I have a lot of automation setup from Linux boxes to manage the Windows VMs.
> I'd recommend PowerShell anyway for more flexibility (New-ScheduledTask, etc.).
I started off with PowerShell but re-wrote to schtasks to make this post shorter. Exactly the same thing happens:
> Register-ScheduledTask -TaskName $taskName -Action $action -Trigger $trigger -RunLevel Highest -User foo -Password $fooPassword
Register-ScheduledTask : The user name or password is incorrect.
At line:1 char:1
+ Register-ScheduledTask -TaskName $taskName -Action $action -Trigger $ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : AuthenticationError: (PS_ScheduledTask:Root/Microsoft/...S_ScheduledTask) [Register-Schedule
dTask], CimException
+ FullyQualifiedErrorId : HRESULT 0x8007052e,Register-ScheduledTask
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Can't create scheduled task over ssh as current user
2019-02-19 19:40 ` John Oxley
@ 2019-02-19 20:20 ` Bill Stewart
0 siblings, 0 replies; 4+ messages in thread
From: Bill Stewart @ 2019-02-19 20:20 UTC (permalink / raw)
To: cygwin
On Tue, Feb 19, 2019 at 12:28 PM John Oxley wrote:
> I started off with PowerShell but re-wrote to schtasks to make this post shorter. Exactly the same thing happens:
>
> > Register-ScheduledTask -TaskName $taskName -Action $action -Trigger $trigger -RunLevel Highest -User foo -Password $fooPassword
> Register-ScheduledTask : The user name or password is incorrect.
> At line:1 char:1
> + Register-ScheduledTask -TaskName $taskName -Action $action -Trigger $ ...
> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> + CategoryInfo : AuthenticationError: (PS_ScheduledTask:Root/Microsoft/...S_ScheduledTask) [Register-Schedule
> dTask], CimException
> + FullyQualifiedErrorId : HRESULT 0x8007052e,Register-ScheduledTask
Interesting; I don't know why you're getting error 0x52E (1326 - 'The
user name or password is incorrect').
What is the version of the cygwin1.dll you're using?
3.0 now uses Kerberos/MSV1_0 S4U authentication, meaning you can run
sshd using the SYSTEM account (recommended).
Bill
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-02-19 19:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-19 19:14 Can't create scheduled task over ssh as current user John Oxley
2019-02-19 19:22 ` Bill Stewart
2019-02-19 19:40 ` John Oxley
2019-02-19 20:20 ` Bill Stewart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).