First write a small script:
#!/bin/tcsh -f
osascript -e 'set volume 0'
I named mine
mute.sh and saved it to
/usr/local/bin/. Next, make it executable:
sudo chmod u+x /usr/local/bin/mute.sh
Add it as a logout hook using the
defaults write command:
sudo defaults write com.apple.loginwindow LogoutHook /usr/local/bin/mute.sh
And last, make a small AppleScript with Script Editor to set the sound back to a normal level when the user logs back in.
set volume 3
Save it as a run-only application, and add it to your login items. Restart and listen to the startup sound, because you won't have to hear it again.