sh 用于删除Keychain项目的脚本

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 用于删除Keychain项目的脚本相关的知识,希望对你有一定的参考价值。

#!/bin/bash

#This script will search for a keychain item for the OLD Fileshare server and remove it.

#This will find the current logged in user

USER=$(defaults read /Library/Preferences/com.apple.loginwindow.plist lastUserName)

#This is the keychain item to delete

KEYCHAIN_ITEM="192.168.9.108"

#Command to delete the keychain item

/usr/bin/security delete-internet-password -l "$KEYCHAIN_ITEM" /Users/"$USER"/Library/Keychains/login.keychain

以上是关于sh 用于删除Keychain项目的脚本的主要内容,如果未能解决你的问题,请参考以下文章