invalid windows credentials
-
- Posts: 19
- Joined: Wed Dec 25, 2019 2:13 am
invalid windows credentials
I am using the scheduler wizard to insert a task, when i get up to step 5 and it automatically locates the user account, it has my domain and username but it fails when i enter the password with invalid credentials.
Why is this happening
How can i check what is being selected by the wizard ?
Why is this happening
How can i check what is being selected by the wizard ?
Re: invalid windows credentials
Hello,
Can you try to use double-slash in user name after the domain name?
For example:
DOMAIN\\UserName instead of DOMAIN\\UserName.
Please let me know if this helped.
Can you try to use double-slash in user name after the domain name?
For example:
DOMAIN\\UserName instead of DOMAIN\\UserName.
Please let me know if this helped.
-
- Posts: 19
- Joined: Wed Dec 25, 2019 2:13 am
Re: invalid windows credentials
No, that doesn't work. Apparently is it looking only at the Windows 10 Pro Administrator account and no other account is allowed to be used.
Tried
\\Doman\username
\\Domain\\username
Domain\\username
Domain\username
\\username
None work
Tried
\\Doman\username
\\Domain\\username
Domain\\username
Domain\username
\\username
None work
-
- Posts: 19
- Joined: Wed Dec 25, 2019 2:13 am
Re: invalid windows credentials
How does the wizard know which account to look up by default and if i use any other accounts that work it rejects and it, giving the impression it is only using one account the local admin.
Re: invalid windows credentials
Hello,
The wizard just uses GetUserName() Windows API to get the current user name for this field in wizard's UI. But you can enter anything you want into this field. So you can always enter manually the proper user name. And this will be used to set the task's credentials.
The wizard just uses GetUserName() Windows API to get the current user name for this field in wizard's UI. But you can enter anything you want into this field. So you can always enter manually the proper user name. And this will be used to set the task's credentials.
Best regards,
Igor Siticov.
Igor Siticov.
-
- Posts: 19
- Joined: Wed Dec 25, 2019 2:13 am
Re: invalid windows credentials
Every time i enter any windows user name and password it tells me invalid credentials not allowing me to go further.
Re: invalid windows credentials
You're using a demo project from VCL Scheduling Agent delivery, am I right?
Are you able to create "Quick Demo Tasks" from "Quick Demos" menu on toolbar?
Is you active account has administrative privileges? May be you can't set task's user credentials due to limited rights on the current account?
Are you able to create "Quick Demo Tasks" from "Quick Demos" menu on toolbar?
Is you active account has administrative privileges? May be you can't set task's user credentials due to limited rights on the current account?
Best regards,
Igor Siticov.
Igor Siticov.
-
- Posts: 19
- Joined: Wed Dec 25, 2019 2:13 am
Re: invalid windows credentials
No, i am using it in my production application and using the latest version.
It fails in saTask unit
pRegisteredTask := itf.RegisterTaskDefinition(Name, FTaskDefinition,
TASK_CREATE_OR_UPDATE, AAccountName, APassword,
TASK_LOGON_PASSWORD, '');
This raises error EOSERROR, What does that mean ?
FTaskManager.CurrentFolderPath = '\'
It fails in saTask unit
pRegisteredTask := itf.RegisterTaskDefinition(Name, FTaskDefinition,
TASK_CREATE_OR_UPDATE, AAccountName, APassword,
TASK_LOGON_PASSWORD, '');
This raises error EOSERROR, What does that mean ?
FTaskManager.CurrentFolderPath = '\'
-
- Posts: 19
- Joined: Wed Dec 25, 2019 2:13 am
Re: invalid windows credentials
I uninstalled and resintalled getting the EOSError in SATASK Unit. No message as to why.
-
- Posts: 19
- Joined: Wed Dec 25, 2019 2:13 am
Re: invalid windows credentials
Apparently it seems that there is an issue if you use the local default admin, it does not work and returns a EOSERROR
I tried trapping it but it was blank.
There must be a Windows 10 thing about it.
I tried trapping it but it was blank.
There must be a Windows 10 thing about it.
Re: invalid windows credentials
Can you try to temporary modify the mentioned code in saTask.pas unit as the following:
and add Dialogs to uses and let me know the message displayed. This will help to detect what kind of problem is there.
Or you can modify wizard's code and enclose FTask.SetAccountInformation(wsAccount, wsPassword); into similar try/except block to detect the error message and error code.
Code: Select all
try
pRegisteredTask := itf.RegisterTaskDefinition(Name, FTaskDefinition,
TASK_CREATE_OR_UPDATE, AAccountName, APassword,
TASK_LOGON_PASSWORD, '');
except
on E: EOSError do
begin
ShowMessage(Format('%s'#13#10'Error code: %d', [E.Message, E.ErrorCode]));
raise;
end;
end;
Or you can modify wizard's code and enclose FTask.SetAccountInformation(wsAccount, wsPassword); into similar try/except block to detect the error message and error code.
Best regards,
Igor Siticov.
Igor Siticov.
-
- Posts: 19
- Joined: Wed Dec 25, 2019 2:13 am
Re: invalid windows credentials
It gave me a error code 5 which is access denied. This just recently started since using the new update. What UAC permission do i need to adjust towards ? I do not want the application that i developed to be executed as administrator otherwise clients will complain about that.
-
- Posts: 19
- Joined: Wed Dec 25, 2019 2:13 am
Re: invalid windows credentials
One more piece, i ran it with Administrator rights and set to create the task with the highest privilege, it allows to be used without the error code. What would i need to adjust in the UAC to bypass this ?
Re: invalid windows credentials
What kind of trigger do you try to use for this task?
Just some notes from MSDN:
In short: you can't create a task with "administrator" settings when running under non-admin user.
This doesn't mean that you must use "Run as Admin" to run your application to add admin tasks, just current OS user shall have admin rights.
So if you run your application under "limited" user then you are unable to add tasks that contain any admin related settings.
Just some notes from MSDN:
Also:Only a member of the Administrators group can create a task with a boot trigger.
https://docs.microsoft.com/en-us/window ... ning-tasksYou cannot register a task that has more privileges than the account requesting the registration.
In short: you can't create a task with "administrator" settings when running under non-admin user.
This doesn't mean that you must use "Run as Admin" to run your application to add admin tasks, just current OS user shall have admin rights.
So if you run your application under "limited" user then you are unable to add tasks that contain any admin related settings.
Best regards,
Igor Siticov.
Igor Siticov.
Re: invalid windows credentials
Highest privilege setting requires admin rights for the user.rbaroniunas wrote: ↑Thu Jul 16, 2020 2:12 pm set to create the task with the highest privilege, it allows to be used without the error code. What would i need to adjust in the UAC to bypass this ?
Best regards,
Igor Siticov.
Igor Siticov.