Dear All,
I am facing some troubles in my project according to RTS. What am I trying to do is the following thing:
1. Run RTS as a service when server boots up (active monitoring of the resources).
2. Run the job using mentioned service which will synchronize 2 windows shares using two different username and passwords.
2.1. Windows Shares are workgroup shares.
I do not know how to proceed. What I can do is set up the same username and password for both shares but still those will not be the same as "SYSTEM" account running RTS Service. I tried to run it this way but it is starting RTS app only - no actions are done.
Please help me solving the problem.
Service run as system accessing two Windows shares
- Posts: 8
- Joined: 19 Feb 2021
-
- Posts: 4270
- Joined: 11 Jun 2019
Run it as the user you create for the shares
-
- Posts: 2574
- Joined: 22 Aug 2012
As you noticed, the default user for running Task Scheduler tasks is SYSTEM, and the SYSTEM user has no defined user credentials network resources. So, you have to define the Scheduled Task(s) to be run under (Windows) user credentials for which the credentials towards external resources are stored in the Credential Manager. And obviously, those stored credentials need to have proper (read or) write access to the relevant shares on your network resource(s).
Note, that a Windows user can not simultaneously connect to one and the same network resource under different network credentials. (There is a tedious workaround ...). So, if you need to simultaneously connect to one and the same network resource (e.g. a NAS) under different network user credentials, you need to do so from two different Windows user accounts.
Also note, that drive mappings (or defining network user credentials) in the Windows user Startup folder will not work, as Startup items are only executed at user login, not when running a Scheduled Task as a given Windows user.
Further note, that scheduled tasks never show up in the users task bar, only in the task manager.
Note, that a Windows user can not simultaneously connect to one and the same network resource under different network credentials. (There is a tedious workaround ...). So, if you need to simultaneously connect to one and the same network resource (e.g. a NAS) under different network user credentials, you need to do so from two different Windows user accounts.
Also note, that drive mappings (or defining network user credentials) in the Windows user Startup folder will not work, as Startup items are only executed at user login, not when running a Scheduled Task as a given Windows user.
Further note, that scheduled tasks never show up in the users task bar, only in the task manager.
- Posts: 8
- Joined: 19 Feb 2021
Well, I tried every described solution with no luck. My tries ended with the following actions and result:
Actions:
1. Created local user on the server.
2. Created Scheduled Task as administrator and set up to be run as user created in point 1.
3. Task definition has chacked "Run whether user is logged on or not" as this tusk should be user-independed when it comes to start up. In our environment autologin is not allowed.
4. Task triggers at system startup with 1 minute of delay (to be sure every service starts up).
5. Actions of the task are defined accordingly to what is described on FFS site and I am running RTS application (not FFS) to automate task.
6. I have set up the account created on point 1 to be able to run tasks without need to login in local policies of Windows Server 2019.
Result:
1. When user is not logged in, task is not starting. No RTS exe application is running.
2. When I reboot the Server - task is also not starting.
2. Manual start of task does not result to start RTS until user is logged in.
How to proceed with such? I need to run task automatically at system start, without involving user or setting up automatic login of the user. From the other hand I need to access the shares on independent PCs (non-domain).
Actions:
1. Created local user on the server.
2. Created Scheduled Task as administrator and set up to be run as user created in point 1.
3. Task definition has chacked "Run whether user is logged on or not" as this tusk should be user-independed when it comes to start up. In our environment autologin is not allowed.
4. Task triggers at system startup with 1 minute of delay (to be sure every service starts up).
5. Actions of the task are defined accordingly to what is described on FFS site and I am running RTS application (not FFS) to automate task.
6. I have set up the account created on point 1 to be able to run tasks without need to login in local policies of Windows Server 2019.
Result:
1. When user is not logged in, task is not starting. No RTS exe application is running.
2. When I reboot the Server - task is also not starting.
2. Manual start of task does not result to start RTS until user is logged in.
How to proceed with such? I need to run task automatically at system start, without involving user or setting up automatic login of the user. From the other hand I need to access the shares on independent PCs (non-domain).
-
- Posts: 2574
- Joined: 22 Aug 2012
Your use case is still pretty unclear.
Where are the the shares hosted that you try to access ? On a NAS or alike?
What is the "server" you mention above?
Apparently it is a Windows server.
But what is it "serving"? Is it a file server, serving the shares you mention, is it a domain server, or both?
What user identification method are you using? Local accounts, LDAP, domain-based, Active Directory?
In my earlier reply I assumed your shares are on a NAS and you use local accounts on that NAS.
> In our environment autologin is not allowed.
Not sure what you mean here.
For scheduled tasks to run under given user credentials, you have to provide the password for that user when defining that scheduled task.
Where are the the shares hosted that you try to access ? On a NAS or alike?
What is the "server" you mention above?
Apparently it is a Windows server.
But what is it "serving"? Is it a file server, serving the shares you mention, is it a domain server, or both?
What user identification method are you using? Local accounts, LDAP, domain-based, Active Directory?
In my earlier reply I assumed your shares are on a NAS and you use local accounts on that NAS.
> In our environment autologin is not allowed.
Not sure what you mean here.
For scheduled tasks to run under given user credentials, you have to provide the password for that user when defining that scheduled task.
- Posts: 8
- Joined: 19 Feb 2021
I wish I could add some screenshots here. :-) Let's start from the beginning.
Looking at
1. Left side:
Windows 10 PC, working based on workgroup (non-AD-joined),
source files located on share,
access to share using local account (user-A) with password.
2. Right side: Windows Server 2019 server, working based on AD (domain-joined),
result folder locally on hard disk,
local account (not Active Directory) is used to access local files and share from point 1 (user-A),
here RTS and FFS are installed,
here Scheduled task is defined,
The local user has cached (saved) privileges for share from point 1 (can access it).
The Scheduled Task is defined on the server (2) using ActiveDirectory administrator account. Run under under given user credentials is set and configured to use local user. Startup of the task is set to start with system start (with delay of 1 minute).
I am looking for the following solution:
1. Run task with system startup without the need to login local user on Windows Server 2019. Automatic login of the user (auto log in) is not possible.
2. The task must run in the background. File synchronization must be done each 10 seconds.
Manual start of the RTS works perfectly (from administrator acccount and from user-A account too). Automatic start does not work.
I hope this configuration is more clear for you.
Looking at
1. Left side:
Windows 10 PC, working based on workgroup (non-AD-joined),
source files located on share,
access to share using local account (user-A) with password.
2. Right side: Windows Server 2019 server, working based on AD (domain-joined),
result folder locally on hard disk,
local account (not Active Directory) is used to access local files and share from point 1 (user-A),
here RTS and FFS are installed,
here Scheduled task is defined,
The local user has cached (saved) privileges for share from point 1 (can access it).
The Scheduled Task is defined on the server (2) using ActiveDirectory administrator account. Run under under given user credentials is set and configured to use local user. Startup of the task is set to start with system start (with delay of 1 minute).
I am looking for the following solution:
1. Run task with system startup without the need to login local user on Windows Server 2019. Automatic login of the user (auto log in) is not possible.
2. The task must run in the background. File synchronization must be done each 10 seconds.
Manual start of the RTS works perfectly (from administrator acccount and from user-A account too). Automatic start does not work.
I hope this configuration is more clear for you.
-
- Site Admin
- Posts: 7327
- Joined: 9 Dec 2007
Why can't you?I wish I could add some screenshots here. giwlak, 22 Feb 2021, 11:59
- Posts: 8
- Joined: 19 Feb 2021
Hi,
I managed to run it as expected. Missing parameter was "Start in (optional)" in scheduled task definition. I put there location of exe file without quotes (") and it worked now.
Anyway thank you for help! :-)
I managed to run it as expected. Missing parameter was "Start in (optional)" in scheduled task definition. I put there location of exe file without quotes (") and it worked now.
Anyway thank you for help! :-)
-
- Posts: 2574
- Joined: 22 Aug 2012
By the way:
For posting images in the forum, click the "Full Editor & Preview" button, just left of the "Submit" button.
There you can add images.
For posting images in the forum, click the "Full Editor & Preview" button, just left of the "Submit" button.
There you can add images.