<?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: Running sqlplus from a unix shell script, how do I handle passwords? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/running-sqlplus-from-a-unix-shell-script-how-do-i-handle/m-p/2713482#M780927</link>
    <description>&lt;!--!*#--&gt;I agree that OS Authentication is the best means of doing it. &lt;BR /&gt;However if I want to follow the properties file approach, how do I pass the username/password to the sqlplus command via shell script? I am doing something like -&lt;BR /&gt;&lt;BR /&gt;DBURL=$(cat temp.txt)&lt;BR /&gt;echo $DBURL&lt;BR /&gt;&lt;BR /&gt;sqlplus $DBURL &amp;lt;&amp;lt; EOF&lt;BR /&gt;exec packageName.procName();&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;The sqlplus command is not recognizing the DBURL parameter. How do I pass this shell script variable to sqlplus command?&lt;BR /&gt;I am new to shell scripting. Please help.&lt;BR /&gt;Thanks.........&lt;BR /&gt;</description>
    <pubDate>Mon, 10 Jul 2006 11:09:58 GMT</pubDate>
    <dc:creator>Suwarna</dc:creator>
    <dc:date>2006-07-10T11:09:58Z</dc:date>
    <item>
      <title>Running sqlplus from a unix shell script, how do I handle passwords?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-sqlplus-from-a-unix-shell-script-how-do-i-handle/m-p/2713472#M780917</link>
      <description />
      <pubDate>Mon, 29 Apr 2002 21:04:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-sqlplus-from-a-unix-shell-script-how-do-i-handle/m-p/2713472#M780917</guid>
      <dc:creator>wvsa</dc:creator>
      <dc:date>2002-04-29T21:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: Running sqlplus from a unix shell script, how do I handle passwords?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-sqlplus-from-a-unix-shell-script-how-do-i-handle/m-p/2713473#M780918</link>
      <description>Here is one method (assuming your ORACLE_SID is already set):&lt;BR /&gt;&lt;BR /&gt;S1=/tmp/cmds${$}.sql&lt;BR /&gt;&lt;BR /&gt;# simply list all users and exit&lt;BR /&gt;&lt;BR /&gt;cat &amp;lt;&amp;lt; !EOF &amp;gt;&amp;gt; ${S1}&lt;BR /&gt;select * from all_users;&lt;BR /&gt;exit;&lt;BR /&gt;!EOF!&lt;BR /&gt;&lt;BR /&gt;sqlplus username/topsecret &amp;lt; ${S1}&lt;BR /&gt;&lt;BR /&gt;rm -f ${S1}&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 29 Apr 2002 21:14:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-sqlplus-from-a-unix-shell-script-how-do-i-handle/m-p/2713473#M780918</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-04-29T21:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: Running sqlplus from a unix shell script, how do I handle passwords?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-sqlplus-from-a-unix-shell-script-how-do-i-handle/m-p/2713474#M780919</link>
      <description>Hi wvsa,&lt;BR /&gt;&lt;BR /&gt; Would be handled by sending a string @ login like&lt;BR /&gt;&lt;BR /&gt;username/password@ORACLESID&lt;BR /&gt;&lt;BR /&gt;or something like that - depends on the type of DB accessed.&lt;BR /&gt;&lt;BR /&gt;Any way it needs the string you'll have to deal with the fact that the PW will be in plain text in the script.&lt;BR /&gt;Only option would be to use 3rd-party SW to encrypt/decrypt the PW on either end.&lt;BR /&gt;Search the forum for "ecnrypted passwords" for ways others have done this.&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Jeff</description>
      <pubDate>Mon, 29 Apr 2002 21:15:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-sqlplus-from-a-unix-shell-script-how-do-i-handle/m-p/2713474#M780919</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2002-04-29T21:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Running sqlplus from a unix shell script, how do I handle passwords?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-sqlplus-from-a-unix-shell-script-how-do-i-handle/m-p/2713475#M780920</link>
      <description>If you dont mind your script being a little interactive, you can prompt the user for the Username/Password when the script starts up:&lt;BR /&gt;&lt;BR /&gt;echo "Enter the User Name for the DB"&lt;BR /&gt;read user&lt;BR /&gt;stty -echo&lt;BR /&gt;echo "Enter the Password for $user"&lt;BR /&gt;read pass&lt;BR /&gt;stty echo&lt;BR /&gt;&lt;BR /&gt;sqlplus $user/$pass ......</description>
      <pubDate>Tue, 30 Apr 2002 00:40:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-sqlplus-from-a-unix-shell-script-how-do-i-handle/m-p/2713475#M780920</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2002-04-30T00:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: Running sqlplus from a unix shell script, how do I handle passwords?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-sqlplus-from-a-unix-shell-script-how-do-i-handle/m-p/2713476#M780921</link>
      <description>Storing passwords in scripts is a problem for a couple reasons:&lt;BR /&gt;&lt;BR /&gt;1.  You have it change it in a number of places when your password changes.&lt;BR /&gt;2.  It is a security risk if you forget to change the permissions on the script so no other user can read it.&lt;BR /&gt;&lt;BR /&gt;Two alternatives are:&lt;BR /&gt;&lt;BR /&gt;1.  Use other forms of authentication:  Oracle OS Authentication or Network authentication.  Take a look at the Admin Guide for more info on these.&lt;BR /&gt;&lt;BR /&gt;2.  Store the password in a file and read it in every script:  &lt;BR /&gt;&lt;BR /&gt;PWD=$(cat /home/admin/passwd.txt)&lt;BR /&gt;&lt;BR /&gt;Make sure the permissions on this file don't allow others to read it.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 30 Apr 2002 03:44:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-sqlplus-from-a-unix-shell-script-how-do-i-handle/m-p/2713476#M780921</guid>
      <dc:creator>Mark Seaman</dc:creator>
      <dc:date>2002-04-30T03:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: Running sqlplus from a unix shell script, how do I handle passwords?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-sqlplus-from-a-unix-shell-script-how-do-i-handle/m-p/2713477#M780922</link>
      <description>Have you considered using Expect?&lt;BR /&gt;&lt;A href="http://expect.nist.gov/" target="_blank"&gt;http://expect.nist.gov/&lt;/A&gt;</description>
      <pubDate>Tue, 30 Apr 2002 07:16:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-sqlplus-from-a-unix-shell-script-how-do-i-handle/m-p/2713477#M780922</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2002-04-30T07:16:17Z</dc:date>
    </item>
    <item>
      <title>Re: Running sqlplus from a unix shell script, how do I handle passwords?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-sqlplus-from-a-unix-shell-script-how-do-i-handle/m-p/2713478#M780923</link>
      <description>We run sqlplus from several scripts using the following:&lt;BR /&gt;&lt;BR /&gt;sqlplus -s username/password @report_something.sql&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Doug&lt;BR /&gt;</description>
      <pubDate>Tue, 30 Apr 2002 10:59:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-sqlplus-from-a-unix-shell-script-how-do-i-handle/m-p/2713478#M780923</guid>
      <dc:creator>Douglas Arneson</dc:creator>
      <dc:date>2002-04-30T10:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: Running sqlplus from a unix shell script, how do I handle passwords?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-sqlplus-from-a-unix-shell-script-how-do-i-handle/m-p/2713479#M780924</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I strongly agree with Mark Seaman!  Storing Oracle passwords in shell scripts is a BIG security issue!&lt;BR /&gt;&lt;BR /&gt;Next to having the password visible in the script for anyone who can access the script (and the administration to keep passwords in line with the database); you also have an issue that ANYBODY can see the command "sqlplus user/password" with a simple "ps -ef"!!&lt;BR /&gt;&lt;BR /&gt;My favourite solution still is OS authentication (the OPS$-logins).  Personally I strongly advise against Oracle passwords in shell scripts; in fact I blow away these scripts whenever I find them, and as long as the programmers don't do the same with me, I'll continue doing so in the future ;)&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;Thierry.&lt;BR /&gt;</description>
      <pubDate>Tue, 30 Apr 2002 11:20:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-sqlplus-from-a-unix-shell-script-how-do-i-handle/m-p/2713479#M780924</guid>
      <dc:creator>Thierry Poels_1</dc:creator>
      <dc:date>2002-04-30T11:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: Running sqlplus from a unix shell script, how do I handle passwords?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-sqlplus-from-a-unix-shell-script-how-do-i-handle/m-p/2713480#M780925</link>
      <description>Thierry - What is: OS authentication (the OPS$-logins) and how would one use it?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Hiren</description>
      <pubDate>Tue, 30 Apr 2002 12:36:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-sqlplus-from-a-unix-shell-script-how-do-i-handle/m-p/2713480#M780925</guid>
      <dc:creator>Hiren Patel</dc:creator>
      <dc:date>2002-04-30T12:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: Running sqlplus from a unix shell script, how do I handle passwords?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-sqlplus-from-a-unix-shell-script-how-do-i-handle/m-p/2713481#M780926</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Create user ops$XXXXX&lt;BR /&gt;identified externally&lt;BR /&gt;default tablespace x&lt;BR /&gt;temporary tablespace y;&lt;BR /&gt;&lt;BR /&gt;OS_AUTHENT_PREFIX in your init.ora will define the prefix of the externally authenticated users; default used to be "OPS$", but can be set to anything you want, or can even be empty.&lt;BR /&gt;&lt;BR /&gt;After the user has been created and the necessary grants have been given (connect, custom roles, ...) the Unix (or other OS) user XXXXX will be able to connect to the database without supplying a password; i.e. "sqlplus /" or "runform /" will be sufficient.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;Thierry.</description>
      <pubDate>Tue, 30 Apr 2002 13:53:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-sqlplus-from-a-unix-shell-script-how-do-i-handle/m-p/2713481#M780926</guid>
      <dc:creator>Thierry Poels_1</dc:creator>
      <dc:date>2002-04-30T13:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: Running sqlplus from a unix shell script, how do I handle passwords?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-sqlplus-from-a-unix-shell-script-how-do-i-handle/m-p/2713482#M780927</link>
      <description>&lt;!--!*#--&gt;I agree that OS Authentication is the best means of doing it. &lt;BR /&gt;However if I want to follow the properties file approach, how do I pass the username/password to the sqlplus command via shell script? I am doing something like -&lt;BR /&gt;&lt;BR /&gt;DBURL=$(cat temp.txt)&lt;BR /&gt;echo $DBURL&lt;BR /&gt;&lt;BR /&gt;sqlplus $DBURL &amp;lt;&amp;lt; EOF&lt;BR /&gt;exec packageName.procName();&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;The sqlplus command is not recognizing the DBURL parameter. How do I pass this shell script variable to sqlplus command?&lt;BR /&gt;I am new to shell scripting. Please help.&lt;BR /&gt;Thanks.........&lt;BR /&gt;</description>
      <pubDate>Mon, 10 Jul 2006 11:09:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-sqlplus-from-a-unix-shell-script-how-do-i-handle/m-p/2713482#M780927</guid>
      <dc:creator>Suwarna</dc:creator>
      <dc:date>2006-07-10T11:09:58Z</dc:date>
    </item>
  </channel>
</rss>

