Posted on 10-30-2018 01:22 PM
so for the life of me i can't sort this out. The below works great locally but can't make it work when i push it out via jamf. Save me guys.
security delete-internet-password -s thingiwanttokill
Posted on 10-30-2018 01:29 PM
Same issue that comes up daily, maybe even hourly, on this site. It's because most everything run from a jamf policy runs as root. The command you have works fine when in Terminal because you are running it as you, meaning it knows which keychain to look in for the item to delete. Unless you tell it to either run the security command as the user (probably the best approach) or at the very least direct security
at the current user's login.keychain, it won't work, because it's actually looking in /private/var/root/Library/Keychains/
for the item. Not gonna be in there.
Posted on 11-01-2018 06:09 AM
So im looking for something like this?
loggedInUser=$(stat -f%Sgu /dev/console) security delete-internet-password -s /Users/$loggedInUser/Library/Keychains/thing.chathamfinancial.com