We have created a scheduled task in Windows 2019 to cleanup IIS log files per the following link: https://learn.microsoft.com/en-us/iis/manage/provisioning-and-managing-iis/managing-iis-log-file-storage.
In order to avoid the use of SYSTEM we have created a local, limited privilege account that has modify permissions on the IIS log directory.
We have then configured the task to execute the script as this user. The task is configured with the below settings:
- Run whether user is logged on or not
- Do not store password. The task will only have access to local computer resources.
The task appears to work as expected, but there are a few items we don't fully understand.
Questions:
- Will the task cease execution when the local user's password expires, or will S4U continue to work?
- Is this a smart way to execute the task? Most examples use the
SYSTEMaccount which does not seem to be a secure way to accomplish this.
Thank you.
Most examples use the SYSTEM account which does not seem to be a secure waywhy is using system to purge log files insecure?