Need help to temporarily disable Parental Controls on a locked machine

Hello all,

I need help to temporarily disable Parental Controls on a locked machine. At my schoolsite they have made it so teachers can do their classroom attendance online.

The only problem is that I do not want to allow teachers to be able to access their classroom computers as an administrator, only as a student which very limited abilities and strict parental controls. I need to retain these limitations mainly to preserve the sovereignty of a “safe” computing experience.

What I have learned is that this specific website only allows the teacher to be able to login only if they are logged in as an administrator and then only on an unrestricted (admin level) machine.

So what I need is an applescript or other option that would:

  1. disable parental controls on safari temporarily
  2. open a specific web address on have this newly opened website window be on the front of all opened Safari windows.

so I am guessing it needs to be an applescript around these lines…


do shell script "command" user name "School Admin Account" password "pword" with administrator privileges

tell application "Safari"
	activate

	tell application "Safari"
		make new document with properties {URL:"http://www.apple.com"} with administrator privileges


	end tell
end tell
quit

Thank you for all of your help beforehand.

Regards,
paulmattallen

I don’t think you can disable parental controls from the shell like you’re asking. However, you can run a specific application with elevated privileges if you want. So you might try to do this for Safari and see if it works.

Here’s an example:
Sometimes I want to edit my “hosts” file which is located in /private/etc/hosts. I want to open that file in the TextEdit application so I can edit it. Normally I can’t just open that file in TextEdit because it’s not owned by me. However I can elevate my privileges temporarily to open it like this…

set theFile to "/private/etc/hosts"
set uname to "username"
set psswrd to "password"

do shell script "/Applications/TextEdit.app/Contents/MacOS/TextEdit " & theFile user name uname password psswrd with administrator privileges

You’ll see that to open TextEdit from the command line I need to target the TextEdit executable file which is inside the TextEdit.app application bundle. Also, I can supply my username and password so that I’m not asked to provide those. So you may be able to construct a similar command to run Safari with elevated privileges.

I would not advise this approach though because putting a username and password inside of an applescript is very insecure. It’s easy to look at an applescript using a text editor application and view its text, so your password would not be secure. You can see post #2 here for one way to secure passwords in applescript.