Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Password issue Windows 11 task scheduler #57

Open
akrtanner opened this issue Feb 21, 2023 · 6 comments
Open

Password issue Windows 11 task scheduler #57

akrtanner opened this issue Feb 21, 2023 · 6 comments
Labels
documentation Improvements or additions to documentation needs research Deep system issue that needs research

Comments

@akrtanner
Copy link

Using Windows task scheduler to automatically run the script regularly (in batch mode). Works fine (as long as "run with highest privileges" is checked) but after restarting the computer it asks for the password again. It then won't even accept it, saying "invalid Google username or password" before shutting down. However if I then run the script manually it works fine, and if I refresh the task in the scheduler then it goes back to working normally without requesting the password again.

Summary: I've got the script working fine, but it fails with Windows Scheduler after a system restart.

@djsudduth djsudduth added bug Something isn't working needs research Deep system issue that needs research labels Feb 22, 2023
@djsudduth
Copy link
Owner

Hmmm....wondering about the context of the user in the scheduler. KIM saves the Keep token in the Windows credential locker using the keyring python lib once you've logged in. However, it seems when the system is rebooted the user context in the scheduler (which would be different that your user account I assume) can't find the credential locker value of the key. Do you know if the task starts up before you've logged in on Windows under your account?

Take a look at this thread @akrtanner
https://www.reddit.com/r/sysadmin/comments/jrpuoc/windows_credential_manager_issue_retrieving/

@akrtanner
Copy link
Author

akrtanner commented Feb 22, 2023

@djsudduth that sounds like the same issue for sure. I'm the only user on this machine so I don't log in as such, but I did have the "run task as soon as possible after a scheduled start is missed" option checked in Task Scheduler settings so perhaps it was running right away on startup before the key could be found. After trying a few options it's now working fine, but I'm unable to replicate the issue even when I try to. Fingers crossed.

@djsudduth
Copy link
Owner

@akrtanner - ok! I will leave this open for now. Let me know if it pops up again in the next 2 weeks or so. If I don't hear anything I'll close this issue. (But, I will add some documentation on schedulers for this)

@djsudduth djsudduth added documentation Improvements or additions to documentation and removed bug Something isn't working labels Feb 22, 2023
@djsudduth
Copy link
Owner

@akrtanner - can you describe specifically what you did to fix this issue? I want to make sure I add the correct instructions. PS - does it matter that the batch mode has std output to the terminal? Would a silent mode help you at all?

@akrtanner
Copy link
Author

@djsudduth still getting the issue, but not every time I restart. Have tried unchecking "run task as soon as possible after a scheduled start is missed" in Task Scheduler and will let you know how I go. I don't know whether a silent mode would help at this stage.

@djsudduth
Copy link
Owner

@akrtanner - checking in a year later. Did you discover any fixes to this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation needs research Deep system issue that needs research
Projects
None yet
Development

No branches or pull requests

2 participants