Posted on 05-04-2016 09:22 AM
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.
Am I going about this wrong?
Posted on 05-04-2016 09:37 AM
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.
Posted on 05-04-2016 10:15 AM
BOOM! That was it. Thanks a bunch.
Posted on 05-04-2016 10:24 AM
You can also use tccutil:
brew install tccutil
tccutil --insert com.amethyst.Amethyst
Posted on 05-04-2016 11:22 AM
I normally don't get time to peruse different threads but did today and stumble across this gem tccutil. Thanks @jacob_salmela !
Posted on 05-04-2016 02:30 PM
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).
Posted on 05-05-2016 05:25 AM
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.