#!/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