Shell Script accept password using read commnad
Posted in Script
#!/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"
Download - Email this to a friend - Printable version
Related Other Helpful Shell Scripts:
- Shell script iptables based firewall for virtuozzo VPS for REDHAT Linux
- Shell Script to start DLink PCL wireless lan card 520 / 510
- Linux Firewall: Simple Shell Script To Stop and Flush All Iptables Rules
- Shell Script to Start and Login via Netgear WG311 Marvell 88w8335 Wireless Card
- Shell script to Finding Accounts with No Password ( null password account )
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: bash script, echo command, linux, password shell script, read command, script collection, shell script, unix ~ Last updated on: April 10, 2008

