vmware-archive / usb-login-scripts

A formal repository for the scripts we use on our SSH-loading USB sticks
Apache License 2.0
28 stars 10 forks source link

Auto logout at end of day #1

Closed davidje13 closed 4 years ago

davidje13 commented 7 years ago

Currently the SSH key will automatically get removed at 6:20, but the Chrome profile will remain. This should be removed automatically at the end of the day, to protect against accidentally leaving the profile on a machine.

Signout can be automated by:

// navigate to: chrome://settings-frame/

// <wait for page load here>
document.evaluate('//*[@id="profiles-list"]//*[(@role="listitem") and contains(descendant-or-self::*/text(), "MyProfileNameHere")]/button', document, null, XPathResult.ANY_TYPE, null).iterateNext().click();

// <wait for #delete-profile-ok to exist here>
document.getElementById('delete-profile-ok').click();

(error checking needed!)

The load script could add a crontab entry to run this.

Concerns: