<?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: Passwords in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/passwords/m-p/2666994#M931827</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I think I have found the elegant solution you wanted:&lt;BR /&gt;&lt;BR /&gt;Execute this:&lt;BR /&gt;&lt;BR /&gt;# ps -fp `echo $$`&lt;BR /&gt;&lt;BR /&gt;$ ksh&lt;BR /&gt;$ ps -fp `echo $$`&lt;BR /&gt;     UID   PID  PPID  C    STIME TTY       TIME COMMAND&lt;BR /&gt; user1 16088 16079  0 15:01:49 pts/0     0:00 ksh&lt;BR /&gt;&lt;BR /&gt;$ csh&lt;BR /&gt;sys 21: ps -fp `echo $$`&lt;BR /&gt;     UID   PID  PPID  C    STIME TTY       TIME COMMAND&lt;BR /&gt; user1 16334 16088  0 15:06:28 pts/0     0:00 csh&lt;BR /&gt;&lt;BR /&gt;kite 22: sh&lt;BR /&gt;$ ps -fp `echo $$`&lt;BR /&gt;     UID   PID  PPID  C    STIME TTY       TIME COMMAND&lt;BR /&gt; user1 16345 16334  0 15:06:40 pts/0     0:00 sh&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong</description>
    <pubDate>Tue, 19 Feb 2002 07:06:15 GMT</pubDate>
    <dc:creator>Steven Sim Kok Leong</dc:creator>
    <dc:date>2002-02-19T07:06:15Z</dc:date>
    <item>
      <title>Passwords</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwords/m-p/2666989#M931822</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;Is there a way to enter a password from within a shell script and not have it echoed to the screen?&lt;BR /&gt;&lt;BR /&gt;Thank you, Neil</description>
      <pubDate>Mon, 18 Feb 2002 22:14:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwords/m-p/2666989#M931822</guid>
      <dc:creator>Neil Edwards</dc:creator>
      <dc:date>2002-02-18T22:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: Passwords</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwords/m-p/2666990#M931823</link>
      <description>Hi Neil:&lt;BR /&gt;&lt;BR /&gt;You bet. The trick is to use stty -echo.&lt;BR /&gt;&lt;BR /&gt;#!/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;Regards, Clay&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Feb 2002 22:16:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwords/m-p/2666990#M931823</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-02-18T22:16:07Z</dc:date>
    </item>
    <item>
      <title>Re: Passwords</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwords/m-p/2666991#M931824</link>
      <description>Look at the expect programming language.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.ee.ualberta.ca/hppd/hpux/Tcl/expect-5.33/" target="_blank"&gt;http://hpux.ee.ualberta.ca/hppd/hpux/Tcl/expect-5.33/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;GL,&lt;BR /&gt;C</description>
      <pubDate>Mon, 18 Feb 2002 22:17:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwords/m-p/2666991#M931824</guid>
      <dc:creator>Craig Rants</dc:creator>
      <dc:date>2002-02-18T22:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: Passwords</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwords/m-p/2666992#M931825</link>
      <description>Hi again Neil:&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;Regards, Clay&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Feb 2002 22:19:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwords/m-p/2666992#M931825</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-02-18T22:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: Passwords</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwords/m-p/2666993#M931826</link>
      <description>Hi Neill,&lt;BR /&gt;&lt;BR /&gt;there is another command which I use very often in shell scripts:&lt;BR /&gt;&lt;BR /&gt;tput --&amp;gt; a command which can be used to take influence on the behaviour of your cursor (and more)&lt;BR /&gt;&lt;BR /&gt;man tput will show you the possibilities of the command. You will find a "invisible"- button which makes the entered textstring invisible at the screen, after reading the input you make the input visible again -- that's it!&lt;BR /&gt;&lt;BR /&gt;Allways stay on the bright side of life!&lt;BR /&gt;&lt;BR /&gt;Peter</description>
      <pubDate>Tue, 19 Feb 2002 07:00:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwords/m-p/2666993#M931826</guid>
      <dc:creator>Peter Kloetgen</dc:creator>
      <dc:date>2002-02-19T07:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Passwords</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwords/m-p/2666994#M931827</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I think I have found the elegant solution you wanted:&lt;BR /&gt;&lt;BR /&gt;Execute this:&lt;BR /&gt;&lt;BR /&gt;# ps -fp `echo $$`&lt;BR /&gt;&lt;BR /&gt;$ ksh&lt;BR /&gt;$ ps -fp `echo $$`&lt;BR /&gt;     UID   PID  PPID  C    STIME TTY       TIME COMMAND&lt;BR /&gt; user1 16088 16079  0 15:01:49 pts/0     0:00 ksh&lt;BR /&gt;&lt;BR /&gt;$ csh&lt;BR /&gt;sys 21: ps -fp `echo $$`&lt;BR /&gt;     UID   PID  PPID  C    STIME TTY       TIME COMMAND&lt;BR /&gt; user1 16334 16088  0 15:06:28 pts/0     0:00 csh&lt;BR /&gt;&lt;BR /&gt;kite 22: sh&lt;BR /&gt;$ ps -fp `echo $$`&lt;BR /&gt;     UID   PID  PPID  C    STIME TTY       TIME COMMAND&lt;BR /&gt; user1 16345 16334  0 15:06:40 pts/0     0:00 sh&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong</description>
      <pubDate>Tue, 19 Feb 2002 07:06:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwords/m-p/2666994#M931827</guid>
      <dc:creator>Steven Sim Kok Leong</dc:creator>
      <dc:date>2002-02-19T07:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: Passwords</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwords/m-p/2666995#M931828</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Eh what happened?!&lt;BR /&gt;&lt;BR /&gt;I was responding to another thread and my response ended up in this thread instead. :{&lt;BR /&gt;&lt;BR /&gt;In any case, I agree with Clay that stty -echo and stty echo does the job nicely for "invisible" passwords. I used the following in one of my scripts:&lt;BR /&gt;&lt;BR /&gt;echo "Enter passwd: \c"&lt;BR /&gt;trap "" 1 2 3&lt;BR /&gt;stty -echo&lt;BR /&gt;read passwd&lt;BR /&gt;stty echo&lt;BR /&gt;trap 1 2 3&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong</description>
      <pubDate>Tue, 19 Feb 2002 07:12:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwords/m-p/2666995#M931828</guid>
      <dc:creator>Steven Sim Kok Leong</dc:creator>
      <dc:date>2002-02-19T07:12:56Z</dc:date>
    </item>
  </channel>
</rss>

