<?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: store a password for a script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/store-a-password-for-a-script/m-p/2445098#M769353</link>
    <description>One technique is to keep the password in a file that is only readable by a particular user (that nobody can log in as) and to use the setuid bit (set-owner-ID-on file-execution - see man chmod) on the script that reads it.&lt;BR /&gt;&lt;BR /&gt;This script would have to be responsible for its own security and would only return the password to one of a set of users or whatever restriction you wanted to employ.&lt;BR /&gt;&lt;BR /&gt;You can also use the 'crypt' command to encrypt the password and use the setuid technique to obtain the encryption key.&lt;BR /&gt;&lt;BR /&gt;I use a combination of both the above techniques for securely obtaining Oracle passwords for use by backup scripts etc.&lt;BR /&gt;&lt;BR /&gt;On the subject of Oracle, never supply the password as a command line argument to any Oracle command as it can be seen in a 'ps' listing. For example instead of:-&lt;BR /&gt;&lt;BR /&gt;sqlplus system/&lt;PASSWORD&gt; &amp;lt;&lt;EOD&gt;&lt;/EOD&gt;&lt;BR /&gt;do&lt;BR /&gt;&lt;BR /&gt;sqlplus &amp;lt;&amp;lt; EOD&lt;BR /&gt;system/&lt;PASSWORD&gt;&lt;/PASSWORD&gt;&lt;/PASSWORD&gt;</description>
    <pubDate>Wed, 13 Sep 2000 13:07:02 GMT</pubDate>
    <dc:creator>John Palmer</dc:creator>
    <dc:date>2000-09-13T13:07:02Z</dc:date>
    <item>
      <title>store a password for a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/store-a-password-for-a-script/m-p/2445096#M769351</link>
      <description>Can anyone suggest a way of storing a password, so it can be used in a script, without breaking 'all security rules'.&lt;BR /&gt;&lt;BR /&gt;The best I can come up with is to create a user with a name which is almost imposible to remember, with an equally hard to memorise password. And store each in a different files with access rights, so they are hard to find/read. Not very secure in my opinion... (the script will give it all away)&lt;BR /&gt;&lt;BR /&gt;Any better suggestions?</description>
      <pubDate>Wed, 13 Sep 2000 12:53:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/store-a-password-for-a-script/m-p/2445096#M769351</guid>
      <dc:creator>Geetam</dc:creator>
      <dc:date>2000-09-13T12:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: store a password for a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/store-a-password-for-a-script/m-p/2445097#M769352</link>
      <description>&lt;BR /&gt;You could try using the crypt command on these passwords when they are stored in a file, and also use crypt to decrypt them when needed. This way at least they are a bit more secure when stored in a file.</description>
      <pubDate>Wed, 13 Sep 2000 12:58:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/store-a-password-for-a-script/m-p/2445097#M769352</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2000-09-13T12:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: store a password for a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/store-a-password-for-a-script/m-p/2445098#M769353</link>
      <description>One technique is to keep the password in a file that is only readable by a particular user (that nobody can log in as) and to use the setuid bit (set-owner-ID-on file-execution - see man chmod) on the script that reads it.&lt;BR /&gt;&lt;BR /&gt;This script would have to be responsible for its own security and would only return the password to one of a set of users or whatever restriction you wanted to employ.&lt;BR /&gt;&lt;BR /&gt;You can also use the 'crypt' command to encrypt the password and use the setuid technique to obtain the encryption key.&lt;BR /&gt;&lt;BR /&gt;I use a combination of both the above techniques for securely obtaining Oracle passwords for use by backup scripts etc.&lt;BR /&gt;&lt;BR /&gt;On the subject of Oracle, never supply the password as a command line argument to any Oracle command as it can be seen in a 'ps' listing. For example instead of:-&lt;BR /&gt;&lt;BR /&gt;sqlplus system/&lt;PASSWORD&gt; &amp;lt;&lt;EOD&gt;&lt;/EOD&gt;&lt;BR /&gt;do&lt;BR /&gt;&lt;BR /&gt;sqlplus &amp;lt;&amp;lt; EOD&lt;BR /&gt;system/&lt;PASSWORD&gt;&lt;/PASSWORD&gt;&lt;/PASSWORD&gt;</description>
      <pubDate>Wed, 13 Sep 2000 13:07:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/store-a-password-for-a-script/m-p/2445098#M769353</guid>
      <dc:creator>John Palmer</dc:creator>
      <dc:date>2000-09-13T13:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: store a password for a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/store-a-password-for-a-script/m-p/2445099#M769354</link>
      <description>Geetam:&lt;BR /&gt;&lt;BR /&gt;It depends on what your script is trying to do.  For example, let's say that you want a script that will automate logging onto another machine to execute some commands, you might want to consider using ssh with private/public key combinations with ssh.&lt;BR /&gt;&lt;BR /&gt;The SSH documentation describes how you can setup two hosts to talk without exchanging passwords (only  exchanging keys - which are unique to the machine-user combination)&lt;BR /&gt;&lt;BR /&gt;security by obsurity is not very advisable!&lt;BR /&gt;&lt;BR /&gt;Alternatively, you could write a program in c, and compile it with the password somehow embeded... maybe if you give more of an idea of what your program does, you might get more.</description>
      <pubDate>Wed, 13 Sep 2000 13:08:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/store-a-password-for-a-script/m-p/2445099#M769354</guid>
      <dc:creator>Kofi ARTHIABAH</dc:creator>
      <dc:date>2000-09-13T13:08:24Z</dc:date>
    </item>
  </channel>
</rss>

