#!/bin/bash # Script accept password using read commnad # Not *very secure*, this script is for learning purpose only # ------------------------------------------------------------------------- # This script is part of nixCraft shell script collection (NSSC) # Visit http://bash.cyberciti.biz/ for more information. # ------------------------------------------------------------------------- PASS="abc123" read -s -p "Password: " mypassword echo "" [ "$mypassword" == "$PASS" ] && echo "Password accepted" || echo "Access denied"
4000+ howtos and counting! If you enjoyed this article, join 45000+ others and get free email updates!
Click here to subscribe via email.
Click here to subscribe via email.
- Download Script
- Email this to a friend
- Rss Feed
- Last Updated: 04/10/08






