<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to hide password using shell script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-password-using-shell-script/m-p/2702809#M901892</link>
    <description>Hi clay,&lt;BR /&gt;&lt;BR /&gt;I had a test. You are right.&lt;BR /&gt;&lt;BR /&gt;thanks clay and chan</description>
    <pubDate>Fri, 12 Apr 2002 16:44:38 GMT</pubDate>
    <dc:creator>Catherine_3</dc:creator>
    <dc:date>2002-04-12T16:44:38Z</dc:date>
    <item>
      <title>How to hide password using shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-password-using-shell-script/m-p/2702806#M901889</link>
      <description>Hi everyone,&lt;BR /&gt;I met a problem&lt;BR /&gt;I have a shell script:&lt;BR /&gt;&lt;BR /&gt;echo " input Host name "&lt;BR /&gt;read HOST&lt;BR /&gt;echo "input User Name "&lt;BR /&gt;read USERID&lt;BR /&gt;echo " input Password"&lt;BR /&gt;read PASSWD&lt;BR /&gt;&lt;BR /&gt;ftp -n -i $HOST &amp;lt;&amp;lt;- EOF&lt;BR /&gt;user $USERID $PASSWD&lt;BR /&gt;..&lt;BR /&gt;..&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;I want to hide my password and don't appear on &lt;BR /&gt;the screen.&lt;BR /&gt; &lt;BR /&gt;Thanks a lot</description>
      <pubDate>Fri, 12 Apr 2002 16:09:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-password-using-shell-script/m-p/2702806#M901889</guid>
      <dc:creator>Catherine_3</dc:creator>
      <dc:date>2002-04-12T16:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide password using shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-password-using-shell-script/m-p/2702807#M901890</link>
      <description>#!/usr/bin/sh &lt;BR /&gt;&lt;BR /&gt;trap 'stty echo; exit' 0 1 2 3 15 &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;echo "Enter Password: \c" &lt;BR /&gt;stty -echo &lt;BR /&gt;read PASSWD &lt;BR /&gt;stty echo &lt;BR /&gt;&lt;BR /&gt;I should add that the trap command is really not optional. You see, the stty command alters the tty device not just your script. Any subsequent processes would also have the echo turned off if you exited in the -echo state. The trap, insure that the terminal is restored upon exit even via a Ctrl-C (or whatever your n'rupt is set to). &lt;BR /&gt;&lt;BR /&gt;I suggest that you comment out the trap statement and do a ctrl-c when entering the password and you will see just what I mean. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards, Clay &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 12 Apr 2002 16:15:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-password-using-shell-script/m-p/2702807#M901890</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-04-12T16:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide password using shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-password-using-shell-script/m-p/2702808#M901891</link>
      <description>You would put ..&lt;BR /&gt;&lt;BR /&gt;stty -echo&lt;BR /&gt;&lt;BR /&gt;before the "read password" part&lt;BR /&gt;and&lt;BR /&gt;&lt;BR /&gt;stty echo&lt;BR /&gt;&lt;BR /&gt;after that.</description>
      <pubDate>Fri, 12 Apr 2002 16:15:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-password-using-shell-script/m-p/2702808#M901891</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2002-04-12T16:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide password using shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-password-using-shell-script/m-p/2702809#M901892</link>
      <description>Hi clay,&lt;BR /&gt;&lt;BR /&gt;I had a test. You are right.&lt;BR /&gt;&lt;BR /&gt;thanks clay and chan</description>
      <pubDate>Fri, 12 Apr 2002 16:44:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-password-using-shell-script/m-p/2702809#M901892</guid>
      <dc:creator>Catherine_3</dc:creator>
      <dc:date>2002-04-12T16:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide password using shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-password-using-shell-script/m-p/2702810#M901893</link>
      <description>Hi &lt;BR /&gt;&lt;BR /&gt;By the way, I just want to make the cursor move and display "******"&lt;BR /&gt;so How to do that ?</description>
      <pubDate>Fri, 12 Apr 2002 16:47:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-password-using-shell-script/m-p/2702810#M901893</guid>
      <dc:creator>Catherine_3</dc:creator>
      <dc:date>2002-04-12T16:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide password using shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-password-using-shell-script/m-p/2702811#M901894</link>
      <description>That is much more difficult because you have to turn off line-buffered entry and enable character by character input. That is something generally not done from the shell.&lt;BR /&gt;You can use the command 'tput cup row column' to position the cursor. Man tput, terminfo for details.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 12 Apr 2002 17:56:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-password-using-shell-script/m-p/2702811#M901894</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-04-12T17:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide password using shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-password-using-shell-script/m-p/2702812#M901895</link>
      <description>Thanks a lot Clay</description>
      <pubDate>Fri, 12 Apr 2002 19:12:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-password-using-shell-script/m-p/2702812#M901895</guid>
      <dc:creator>Catherine_3</dc:creator>
      <dc:date>2002-04-12T19:12:55Z</dc:date>
    </item>
  </channel>
</rss>

