Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Posts
    68

    Unanswered: shell script for password

    Dear all
    i want to write one unix shell script ,in that script i need to accept
    passwrod from command prompt , but i want to diplay *** while accepting password .


    regards

  2. #2
    Join Date
    Aug 2004
    Location
    Rome, Italy
    Posts
    81
    I don't know how to do it, but actually you can use a command which makes the password invisible.

    ---------------------
    echo "Insert your Password: "
    stty -echo
    read MY_PASSWORD
    echo ""
    stty echo
    echo "The password you entered is $MY_PASSWORD"
    ----------------------
    ----------------------
    the output of this script is:

    Insert your Password:
    The password you entered is lsdkjfsfh

    ----------------------------------------------

    In case you knew all this, just forget it.

    bye,
    ducasio

  3. #3
    Join Date
    Nov 2003
    Posts
    68

    thanku

    Thank u for u r reply.
    At present i am using this method only,
    pl tell me how to display instead hiding i want to display some special character.
    For examples
    Enter password: abcd
    Instead of abcd i want to display ******** .
    For each character i want to display 2 special characters.



    regards

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •