<?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 password .. tricky question in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/password-tricky-question/m-p/3818824#M66552</link>
    <description>How can i hide a user login and password in a script ?? ..</description>
    <pubDate>Thu, 06 Jul 2006 11:41:33 GMT</pubDate>
    <dc:creator>nightwish</dc:creator>
    <dc:date>2006-07-06T11:41:33Z</dc:date>
    <item>
      <title>password .. tricky question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/password-tricky-question/m-p/3818824#M66552</link>
      <description>How can i hide a user login and password in a script ?? ..</description>
      <pubDate>Thu, 06 Jul 2006 11:41:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/password-tricky-question/m-p/3818824#M66552</guid>
      <dc:creator>nightwish</dc:creator>
      <dc:date>2006-07-06T11:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: password .. tricky question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/password-tricky-question/m-p/3818825#M66553</link>
      <description>Use environment variables ??? After all, I don't know exactly what you are up to.</description>
      <pubDate>Thu, 06 Jul 2006 11:55:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/password-tricky-question/m-p/3818825#M66553</guid>
      <dc:creator>Georg Tresselt</dc:creator>
      <dc:date>2006-07-06T11:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: password .. tricky question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/password-tricky-question/m-p/3818826#M66554</link>
      <description>I want to do a script that suppots himself authentication .. For that i need to inclue the user login and the password in the script .. It exists anyay to do this without leaving password to the sigth of the users that read the script ?? !! ..</description>
      <pubDate>Thu, 06 Jul 2006 12:08:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/password-tricky-question/m-p/3818826#M66554</guid>
      <dc:creator>nightwish</dc:creator>
      <dc:date>2006-07-06T12:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: password .. tricky question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/password-tricky-question/m-p/3818827#M66555</link>
      <description>You can try with a shell script compiler like CCsh:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.comeaucomputing.com/faqs/ccshfaq.html" target="_blank"&gt;http://www.comeaucomputing.com/faqs/ccshfaq.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;If you will try that, just ensure that the resulting binary command won't show the user and password when you run the "strings" command over the file.&lt;BR /&gt;&lt;BR /&gt;Of course, you always can remove the read permissions.</description>
      <pubDate>Thu, 06 Jul 2006 13:35:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/password-tricky-question/m-p/3818827#M66555</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2006-07-06T13:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: password .. tricky question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/password-tricky-question/m-p/3818828#M66556</link>
      <description>Hi Nightwish,&lt;BR /&gt;&lt;BR /&gt;There are possibly several ways to do what you're after, securely. It all depends on exactly what you're trying to do.&lt;BR /&gt;&lt;BR /&gt;You mention that the script needs to authenticate against something. Is this something usual like telnet/ftp/http?&lt;BR /&gt;&lt;BR /&gt;Also, who would normally run the script? If it is only ever run by the user whos details it contains, simply set the permissions so that only the user can access the script (chmod 400 &amp;lt;script&amp;gt; then other users cannot access it)..&lt;BR /&gt;&lt;BR /&gt;If the script is for general use, then it all depends on how secure you want it to be...&lt;BR /&gt;&lt;BR /&gt;Tell us more detail and we might be able to help.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Andy Bruce</description>
      <pubDate>Thu, 06 Jul 2006 19:53:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/password-tricky-question/m-p/3818828#M66556</guid>
      <dc:creator>Andrew Bruce</dc:creator>
      <dc:date>2006-07-06T19:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: password .. tricky question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/password-tricky-question/m-p/3818829#M66557</link>
      <description>The use of script is for gerenal use .. And basically is to authenticate by ftp and telnet .. But my problem is i need to acess several machines .. And for that I have to specify a user and a password .. The tricky question is how i hide that user and is password in a script .. whithout the comand sudo ... &lt;BR /&gt;&lt;BR /&gt;Thanks for the contibution ..&lt;BR /&gt;&lt;BR /&gt;Regards ..</description>
      <pubDate>Fri, 07 Jul 2006 06:01:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/password-tricky-question/m-p/3818829#M66557</guid>
      <dc:creator>nightwish</dc:creator>
      <dc:date>2006-07-07T06:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: password .. tricky question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/password-tricky-question/m-p/3818830#M66558</link>
      <description>Well, one way to run ftp in a script would be the use of an .netrc file. As this file contains user name and password unecrypted, one may well argues that that is not exactly hidden.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.die.net/doc/linux/man/man5/netrc.5.html" target="_blank"&gt;http://www.die.net/doc/linux/man/man5/netrc.5.html&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 07 Jul 2006 08:27:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/password-tricky-question/m-p/3818830#M66558</guid>
      <dc:creator>Georg Tresselt</dc:creator>
      <dc:date>2006-07-07T08:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: password .. tricky question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/password-tricky-question/m-p/3818831#M66559</link>
      <description>Replace Telnet and FTP with ssh and sftp or &lt;BR /&gt;scp and use authorized keys.  No login required&lt;BR /&gt;if you have the correct keys.  &lt;BR /&gt;&lt;BR /&gt;You can password protect the key and and use a&lt;BR /&gt;key agent, or leave the key unpassword protected and trust the security of the&lt;BR /&gt;system. The unpassword protected variant is more secure than your script would be as&lt;BR /&gt;the key must be appropriately secured to &lt;BR /&gt;work.&lt;BR /&gt;&lt;BR /&gt;Access by keys can be restricted in various&lt;BR /&gt;ways if required.  This would further enhance&lt;BR /&gt;security over using a script.&lt;BR /&gt;&lt;BR /&gt;In addition to not having to hide the password&lt;BR /&gt;in the file, you also won't be passing it&lt;BR /&gt;over the network in clear text. Another&lt;BR /&gt;gain in security.&lt;BR /&gt;</description>
      <pubDate>Fri, 07 Jul 2006 10:50:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/password-tricky-question/m-p/3818831#M66559</guid>
      <dc:creator>Bill Thorsteinson</dc:creator>
      <dc:date>2006-07-07T10:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: password .. tricky question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/password-tricky-question/m-p/3818832#M66560</link>
      <description>Bill is rigth, there is no possible way you ca hide password in script if you are using telnet or ftp.&lt;BR /&gt;&lt;BR /&gt;The reason is simple as far as telnet and ftp aren't using any sort of encryption, the password is sended as plain text.&lt;BR /&gt;Which means in the moment you are logging you write those informations in socket as plain text. So anyone can tcpdump or anothert network analyzator and see it in packet.&lt;BR /&gt;Or even if you will encrypt it in script and script it self will decrypt this befor sending,  anyone who can copy or modify your script is able to add one line with print loggin password just befor writen this information to the socket.&lt;BR /&gt;&lt;BR /&gt;So anybody who is able to listen on network or modify your script will be able to get the password.&lt;BR /&gt;&lt;BR /&gt;Sure you can make some sort of encrypted password and decrypt it just befor sending as  I said but it will hide password just for BFUs.</description>
      <pubDate>Fri, 14 Jul 2006 06:34:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/password-tricky-question/m-p/3818832#M66560</guid>
      <dc:creator>g33k</dc:creator>
      <dc:date>2006-07-14T06:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: password .. tricky question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/password-tricky-question/m-p/3818833#M66561</link>
      <description>Just a quick one if your really want to do something this in a script, it's not good at all but it will stop the casual browser seeing the password content in the script(s)....&lt;BR /&gt;&lt;BR /&gt;Do a man ascii, and use echo -e to print the numerical value of each letter in the passwd.&lt;BR /&gt;&lt;BR /&gt;eg: Pass=hello&lt;BR /&gt;&lt;BR /&gt;PASSWD=`echo -e "\150\145\154\154\157"`&lt;BR /&gt;&lt;BR /&gt;etc...&lt;BR /&gt;&lt;BR /&gt;It's not good or safe at all, but it may deter the casual on looker... You can create your own key file and mix up the number in an array, although it's pretty pointless as it's so easy to reverse.&lt;BR /&gt;&lt;BR /&gt;-=ChaZ=-</description>
      <pubDate>Mon, 31 Jul 2006 05:04:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/password-tricky-question/m-p/3818833#M66561</guid>
      <dc:creator>Charles Harris</dc:creator>
      <dc:date>2006-07-31T05:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: password .. tricky question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/password-tricky-question/m-p/3818834#M66562</link>
      <description>Remember that if the user needs to execute a script, he/she must be able to read it.&lt;BR /&gt;&lt;BR /&gt;If the user can read a script, he/she can also make a copy of it. Then he/she can edit his/her own copy of the script and remove all password checks you can make. If the user runs the modified script, it will be able to do the same things the password-protected version would.&lt;BR /&gt;&lt;BR /&gt;If this problem is solvable in your specific case, consider storing a md5sum of the password instead of the password itself. When the user inputs the password, you can then pipe the user input through md5sum and then compare the md5sums. If they match, the password is correct. &lt;BR /&gt;</description>
      <pubDate>Tue, 01 Aug 2006 07:50:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/password-tricky-question/m-p/3818834#M66562</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2006-08-01T07:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: password .. tricky question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/password-tricky-question/m-p/3818835#M66563</link>
      <description>Matti pls. note one more thing... not even md5sum is safe becuase of md5 colisions and ofcourse rainbow crack(well need a lot of space but it's not such problem). If I should do sometihng similar I would use radder some salted hash md5crypt for example.&lt;BR /&gt;&lt;BR /&gt;But anyway we all here know that telnet and ftp are not save in any case.</description>
      <pubDate>Tue, 01 Aug 2006 08:14:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/password-tricky-question/m-p/3818835#M66563</guid>
      <dc:creator>g33k</dc:creator>
      <dc:date>2006-08-01T08:14:16Z</dc:date>
    </item>
  </channel>
</rss>

