home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
-
- #simple password script
-
- PASSWORD=Schmoo
-
- PROTECTEDFILE=/usr/me/securefile.html
-
- if [ $# = 0 ]
-
- then
-
- cat << EOM
-
- Content-Type: text/html
-
- <TITLE>Password script</TITLE>
-
- <ISINDEX>
-
- <H1>This page is protected. Enter password</H1>
-
- EOM
-
- elif [ "$#" = "$PASSWORD" ]
-
- then
-
- echo Location: $PROTECTEDFILE
-
- echo
-
- else
-
- cat << EOM2
-
- Content-Type: text/html
-
-
-
- <TITLE> FAIL!</TITLE>
-
- <ISINDEX>
-
- <H1>Password failed! Try again.</H1>
-
- EOM2
-
- fi
-
-
-
-