Posted on 01-31-2019 03:02 PM
I have come to the conclusion that try to use the Guest User account in a school setting, and managing it via jamf policies and profiles is more trouble than it is worth. So what I'd like to do is create a password-less user called 'Student' and manage it as if it were the Guest account. Is there anyone here who has done this already and has a logout script they can share? If not, I am prepared to slog my way thru it and then share what I come up with back to the community. Here is a list of things I am thinking of including right off:
I already disallow the use of mail, messages, safari, and other apps via software restrictions, so that should not be a problem.
Anything else?
Posted on 02-01-2019 08:30 AM
It occurs to me that the chrome piece of it can be elegantly handled by leveraging chrome's own mechanisms to delete all browsing data between launches. Probably there is a way to set that with a plist.
Posted on 02-01-2019 09:55 AM
@Morningside If the guest users home is at /Users/guest, then this should work:
#!/bin/bash
/usr/bin/pkill -a -i "Google Chrome"
rm -Rf /Users/guest/Library/Application Support/Google/Chrome
rm -Rf /Users/guest/Desktop/*
rm -Rf /Users/guest/Documents/*
rm -Rf /Users/guest/Downloads/*
exit 0
Posted on 02-01-2019 11:06 AM
@ryan.ball Thanks for the script! I am starting in on a new project to create my own guest-like account which I am calling 'Student'. So I'll be changing 'guest' to 'Student' in your script. Right now tho, I am still trying to figure out how to create a passwordless local account. In Jamf, the policy requires a password!!
Posted on 02-01-2019 12:17 PM
@Morningside I think you can do it like so:
#!/bin/bash
/usr/local/bin/jamf createAccount -username "student" -realname "Student" -password "" -home "/Users/student" -shell "/bin/bash"