Hey guys,
i installed a LoginHook Script in HighSierra, which delete user files from every Active Directory User, who logged in. It worked perfectly. Here is the script:
if [ -d "/Users/$USER" ]; then rm -R /Users/$1/Downloads/ rm -R /Users/$1/Documents/ rm -R /Users/$1/Desktop/ rm -R /Users/$1/Pictures/ rm -R /Users/$1/Movies/ rm -R /Users/$1/Music/ fi exit0
The script file was saved in /Library/Scripts/skript.sh. So i run as root in terminal:
sudo defaults write com.apple.loginwindow LoginHook /Library/Scripts/skript.sh
...and everything was fine. But since Mojave it doesn`t work anymore. I googled a lot, but can“t find my case.
Can anybody help me out? It should be for a school and a i need the script, because otherwise the 128 gb ssd would be pretty much game over! ;)
