typeset -U PATH
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/local/bin/airport
sudo diskutil partitionDisk /dev/disk2 4 GPT ExFAT Tails 32G APFS Keys 10M ExFAT Drive 1G ExFAT Go\ Drive R
sudo diskutil apfs encryptVolume disk3s1 -user disk
diskutil erasedisk ExFAT GoDrive disk2 #format for Linux only
diskutil erasedisk MS-DOS GODRIVE disk2 #format for Mac/Linux
sudo gdd if=~/Downloads/debian.iso of=/dev/disk2 status=progress bs=4M
sudo kextunload -b io.macfuse.filesystems.macfuse
Storing and retrieving passwords in bash scripts from the macOS keychain #password
security -i unlock-keychain
security add-generic-password -T /usr/bin/security -s "Keychain item name here" -a "username here" -w
PASSWORD=$(security find-generic-password -s "Keychain item name here" -a "username here" -w)
pw_name="CLI Test"
pw_account="armin"
if ! cli_password=$(security find-generic-password -w -s "$pw_name" -a "$pw_account"); then
echo "could not get password, error $?"
exit 1
fi
echo "the password is $cli_password"
/etc/pam.d/sudo
auth sufficient pam_tid.so