Skip to content

Instantly share code, notes, and snippets.

@RyanScottLewis
Created August 6, 2010 15:33
Show Gist options
  • Save RyanScottLewis/511496 to your computer and use it in GitHub Desktop.
Save RyanScottLewis/511496 to your computer and use it in GitHub Desktop.
sudo -k
zenity --entry --hide-text \
--width=350 \
--title="Root Password" \
--text="Enter your root password:" | sudo -S -v
if [ "$?" != 0 ]; then
zenity --error --text="Sorry, bad password"
exit
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment