Install or package an app that requests changes to Accessibility

careybell
New Contributor III

Background:
Users do not have Admin privileges. Meaning they can not make changes to the Security/Privacy > Accessibility settings.

The problem:
We have a request to install Amethyst to a couple of our Macs. I was trying to use Composer to take a snapshot but in doing so it puts the plist files in the local machines user name (/Users/Generic_account). I am unsure how to get Composer to direct the changes to a /Users/~ account or what ever account is running at the time of install. 377fab1b54f049a7a5ff6275dd9d7e54

Am I going about this wrong?

6 REPLIES 6

sdagley
Esteemed Contributor II

Build your installer as a dmg and when you import it into Casper Admin you can set the "Fill existing user home directories (FEU)" and "Fill user templates (FUT)" options in the (aptly named) Options tab.

careybell
New Contributor III

3d5f00d0eafe46f09e949e0db7287490

BOOM! That was it. Thanks a bunch.

jacob_salmela
Contributor II

You can also use tccutil:

brew install tccutil
tccutil --insert com.amethyst.Amethyst

jhuls
Contributor III

I normally don't get time to peruse different threads but did today and stumble across this gem tccutil. Thanks @jacob_salmela !

Look
Valued Contributor III

I am not sure what tccutil does so it might in effect be the same thing but you can read and write to the Accessibility database with sqlite3, the following command shows you what is in there:

sqlite3 /Library/Application Support/com.apple.TCC/TCC.db 'select * from access'

You can add and remove things with commands similar to these:

sqlite3 /Library/Application Support/com.apple.TCC/TCC.db "delete from access where client='/Library/Scripts/LecternRes/LecternRes.sh';"
sqlite3 /Library/Application Support/com.apple.TCC/TCC.db "REPLACE INTO access VALUES('kTCCServiceAccessibility','/Library/Scripts/LecternRes/LecternRes.sh',1,1,1,NULL,NULL);"

This removes and re-adds permissions for the script '/Library/Scripts/LecternRes/LecternRes.sh' but you might be able to do something similar by looking at what was in the database after a normal installation and replicate scripting it in there.
Sorry no idea where it all came form originally it was a little while ago that I had the requirement (in this case I was attempting to manipulate the display settings through the GUI).

jacob_salmela
Contributor II

tccutil actually runs those same commands; it just simplifies the syntax so it's easy to remember. But if you don't want to install additional software, the above will work just fine.