<?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 make shell scripts that calls sqlplus secure ? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-shell-scripts-that-calls-sqlplus-secure/m-p/3027981#M910176</link>
    <description>There are several tools around to translate your shell code and perl code to C.&lt;BR /&gt;Then you can compile those new programs and see how they work.&lt;BR /&gt;Production use it's not encouraged. But it can save you a lot of programming time.&lt;BR /&gt;&lt;BR /&gt;-------------&lt;BR /&gt;If it's a SQL script for a customer why don't you try to write it in C calling the appropiate libraries? I know it's kind of hard but it's the only way 'trully secure'.</description>
    <pubDate>Mon, 21 Jul 2003 14:31:55 GMT</pubDate>
    <dc:creator>Edgar Avila</dc:creator>
    <dc:date>2003-07-21T14:31:55Z</dc:date>
    <item>
      <title>how to make shell scripts that calls sqlplus secure ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-shell-scripts-that-calls-sqlplus-secure/m-p/3027977#M910172</link>
      <description>&lt;BR /&gt;    Hi, I was just wondering out there.  I have written tons and tons of database scripts for sybase and oracle, but since these scripts were only for our internal group running on our internal boxes, security was never a big concern, so we simply hard-coded username and passwords for the database user.&lt;BR /&gt;&lt;BR /&gt;     Now, I need to write a script on a customer site, and they are concerned about hard coding the username and password on the script itself.    &lt;BR /&gt;&lt;BR /&gt;      HOW do you reference username and especially passwords securely, on a shell, perl script in an unix environment ? &lt;BR /&gt;&lt;BR /&gt;       Just want to know what the best practices out there is !!!&lt;BR /&gt;&lt;BR /&gt;      Thanks,&lt;BR /&gt;&lt;BR /&gt;Henrique</description>
      <pubDate>Sat, 19 Jul 2003 13:23:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-shell-scripts-that-calls-sqlplus-secure/m-p/3027977#M910172</guid>
      <dc:creator>Henrique Silva_3</dc:creator>
      <dc:date>2003-07-19T13:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to make shell scripts that calls sqlplus secure ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-shell-scripts-that-calls-sqlplus-secure/m-p/3027978#M910173</link>
      <description>There are two approaches:&lt;BR /&gt;&lt;BR /&gt;1. Simply replace the hardcoded user/password text with a prompt to the user to supply the required text. This of course means the script is now interactive only.&lt;BR /&gt;&lt;BR /&gt;2. Write a program (not a script) that validates the user is authorized to run the current script. Then the program returns back the user ID and password to be used inside the script.&lt;BR /&gt;&lt;BR /&gt;The #2 solution isn't perfect but scripts can NEVER be secured since they must be readable as well as executable. Programs can be execute-only but scripts must be read by the shell in order to run.</description>
      <pubDate>Sat, 19 Jul 2003 17:14:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-shell-scripts-that-calls-sqlplus-secure/m-p/3027978#M910173</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2003-07-19T17:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to make shell scripts that calls sqlplus secure ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-shell-scripts-that-calls-sqlplus-secure/m-p/3027979#M910174</link>
      <description>This isn't secure from the script standpoint, but the following should work:&lt;BR /&gt;&lt;BR /&gt;echo password | sqlplus username&lt;BR /&gt;&lt;BR /&gt;This should keep the password from being visible to the "ps" command which is what I assume you are worried about.&lt;BR /&gt;&lt;BR /&gt;The best way is to use an externally identified user, which can only be accessed from the user on the local system (normally). &lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Brian</description>
      <pubDate>Sun, 20 Jul 2003 01:44:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-shell-scripts-that-calls-sqlplus-secure/m-p/3027979#M910174</guid>
      <dc:creator>Brian Crabtree</dc:creator>
      <dc:date>2003-07-20T01:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: how to make shell scripts that calls sqlplus secure ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-shell-scripts-that-calls-sqlplus-secure/m-p/3027980#M910175</link>
      <description>hi, &lt;BR /&gt;&lt;BR /&gt;This is called OS authentication.&lt;BR /&gt;&lt;BR /&gt;For a unix environment, just &lt;BR /&gt;&lt;BR /&gt;create user USERNAME identified externally;&lt;BR /&gt;&lt;BR /&gt;then you can "sqlplus /"&lt;BR /&gt;&lt;BR /&gt;It is what I use.  I set my:&lt;BR /&gt;&lt;BR /&gt;os_authent_prefix                    string      ops$&lt;BR /&gt;&lt;BR /&gt;to ops$ actually, so that when I &lt;BR /&gt;&lt;BR /&gt;create user ops$yogeeraj identified by password;&lt;BR /&gt;&lt;BR /&gt;I have the OPTION of either&lt;BR /&gt;&lt;BR /&gt;a) using "sqlplus /"&lt;BR /&gt;b) "sqlplus ops$yogeeraj/password"&lt;BR /&gt;&lt;BR /&gt;as I choose (eg: when logged in locally, I use /, coming in over the network -- I use the password)&lt;BR /&gt;&lt;BR /&gt;$ sqlplus scott/tiger&lt;BR /&gt;&lt;BR /&gt;well, it is trivial for someone to ps -aef | grep sqlplus and see my credentials.  sqlplus / -- they get nothing&lt;BR /&gt;&lt;BR /&gt;In my scripts, run in the background (backups and what not), we use sqlplus /, we don't HAVE any passwords encoded in there.&lt;BR /&gt;&lt;BR /&gt;CAUTION: setting remote_os_authent to true will be serious security loop hole.&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;Yogeeraj</description>
      <pubDate>Sun, 20 Jul 2003 17:35:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-shell-scripts-that-calls-sqlplus-secure/m-p/3027980#M910175</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2003-07-20T17:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to make shell scripts that calls sqlplus secure ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-shell-scripts-that-calls-sqlplus-secure/m-p/3027981#M910176</link>
      <description>There are several tools around to translate your shell code and perl code to C.&lt;BR /&gt;Then you can compile those new programs and see how they work.&lt;BR /&gt;Production use it's not encouraged. But it can save you a lot of programming time.&lt;BR /&gt;&lt;BR /&gt;-------------&lt;BR /&gt;If it's a SQL script for a customer why don't you try to write it in C calling the appropiate libraries? I know it's kind of hard but it's the only way 'trully secure'.</description>
      <pubDate>Mon, 21 Jul 2003 14:31:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-shell-scripts-that-calls-sqlplus-secure/m-p/3027981#M910176</guid>
      <dc:creator>Edgar Avila</dc:creator>
      <dc:date>2003-07-21T14:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to make shell scripts that calls sqlplus secure ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-shell-scripts-that-calls-sqlplus-secure/m-p/3027982#M910177</link>
      <description>Hmm, &lt;BR /&gt;several Options:&lt;BR /&gt;OPS$ - Connect already explained above.&lt;BR /&gt;If OS-DBA User can be used,&lt;BR /&gt;"connect .... as sysdba" may be a way out.&lt;BR /&gt;&lt;BR /&gt;The best thing would be to write a stored procedure instead of a script and let oracle execute it as a job. No password, no prompt, and all access stuff defined inside the database.&lt;BR /&gt;Limitation: A stored procedure is not able to start a database.&lt;BR /&gt;&lt;BR /&gt;Hope this helps&lt;BR /&gt;Volker</description>
      <pubDate>Mon, 21 Jul 2003 17:46:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-shell-scripts-that-calls-sqlplus-secure/m-p/3027982#M910177</guid>
      <dc:creator>Volker Borowski</dc:creator>
      <dc:date>2003-07-21T17:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: how to make shell scripts that calls sqlplus secure ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-shell-scripts-that-calls-sqlplus-secure/m-p/3027983#M910178</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;apart from using os authentication, you can also use stored procedures/Packages -- coupled with DBMS_JOB to schedule the execution.&lt;BR /&gt;&lt;BR /&gt;With this approach, if the server (database) is not up -- the jobs will be run when the server comes up -- it is all in the database..&lt;BR /&gt;&lt;BR /&gt;e.g. DBMS_JOB&lt;BR /&gt;create or replace procedure analyze_my_tables&lt;BR /&gt;as&lt;BR /&gt;begin&lt;BR /&gt;   for x in ( select table_name from user_tables )&lt;BR /&gt;   loop&lt;BR /&gt;      execute immediate &lt;BR /&gt;  'analyze table '||x.table_name||' compute statistics';&lt;BR /&gt;   end loop;&lt;BR /&gt;end;&lt;BR /&gt;/&lt;BR /&gt;&lt;BR /&gt;Now to schedule this to run tonight at 3 a.m. (tomorrow morning in fact), and everyday thereafter at 3am, use the following:&lt;BR /&gt;&lt;BR /&gt;declare&lt;BR /&gt;  l_job umber;&lt;BR /&gt;begin&lt;BR /&gt;  dbms_job.submit( job  =&amp;gt; l_job,&lt;BR /&gt;     what  =&amp;gt; 'analyze_my_tables;',&lt;BR /&gt;     next_date =&amp;gt; trunc(sysdate)+1+3/24,&lt;BR /&gt;     interval =&amp;gt; 'trunc(sysdate)+1+3/24');&lt;BR /&gt;end;&lt;BR /&gt;/&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hope this helps too!&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;Yogeeraj</description>
      <pubDate>Tue, 22 Jul 2003 03:55:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-shell-scripts-that-calls-sqlplus-secure/m-p/3027983#M910178</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2003-07-22T03:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: how to make shell scripts that calls sqlplus secure ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-shell-scripts-that-calls-sqlplus-secure/m-p/3027984#M910179</link>
      <description>Hi,&lt;BR /&gt;mixing up previous answer, and adding some fantasy, i suggest you the following:&lt;BR /&gt;&lt;BR /&gt;- implement ssh, this way you will have secure OS account&lt;BR /&gt;&lt;BR /&gt;- then implement OPS$ mechanism, to access the database, so connection over network will be cripted and password sniffing through ps won't be feasible&lt;BR /&gt;&lt;BR /&gt;- if you need extra access to password, you can set up a ops$ user that has only one view, that contains users and password, this last is weak, because you will have to have password in plain text in a table, althought in oracle, but this could help you in little changes of your script/procedure, providing a wrapper program that extracts the user/password.&lt;BR /&gt;&lt;BR /&gt;  Massimo&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Jul 2003 06:48:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-shell-scripts-that-calls-sqlplus-secure/m-p/3027984#M910179</guid>
      <dc:creator>Massimo Bianchi</dc:creator>
      <dc:date>2003-07-22T06:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to make shell scripts that calls sqlplus secure ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-shell-scripts-that-calls-sqlplus-secure/m-p/3027985#M910180</link>
      <description>Hi Henrique&lt;BR /&gt;&lt;BR /&gt;There was a previous thread on same type of issue. I don't know if answers were satisfactory as no point was assigned ...&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xb90f31ec5e34d711abdc0090277a778c,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xb90f31ec5e34d711abdc0090277a778c,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Jean-Luc</description>
      <pubDate>Tue, 22 Jul 2003 11:46:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-shell-scripts-that-calls-sqlplus-secure/m-p/3027985#M910180</guid>
      <dc:creator>Jean-Luc Oudart</dc:creator>
      <dc:date>2003-07-22T11:46:28Z</dc:date>
    </item>
  </channel>
</rss>

