1849783 Members
3747 Online
104044 Solutions
New Discussion

hide password

 
SOLVED
Go to solution
xertusit
Trusted Contributor

hide password

Hi guys,
I must write a script in order to automate the login.
I would want to flat file (ascii) for the password of the systems.
is it possible, by for example Perl functions or commands, to hide the this flat file?

Thanks Massimo
8 REPLIES 8
Geoff Wild
Honored Contributor

Re: hide password

DOn't think so...

Best way would be to setup ssh with keys so you can login without password.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Arunvijai_4
Honored Contributor

Re: hide password

Hello,

You may require to check these threads,

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=139806
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=80836

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
James R. Ferguson
Acclaimed Contributor

Re: hide password

Hi Massimo:

Aside from Geoff's suggestion to use SSH, you should look at the 'netrc(4)' manpages. Perhaps that (less secure) methodology helps you.

Regards!

...JRF...
xertusit
Trusted Contributor

Re: hide password

sorry guys,
I explain better the issue:
. in a flat file I have the login name and the relative password (called file A)
. in another file (a perl script) I build two arrays with the values specified in file A.

I would encrypt the file A in order to hide the password by a simple cat command.


Massimo
Peter Godron
Honored Contributor

Re: hide password

Hi,
if you just wish to en/decrypt the file have a look at the crypt command. man crypt
Patrick Wallek
Honored Contributor

Re: hide password

Have a look at the 'crypt' command to encrypt a file.

# man crypt

for details.
James R. Ferguson
Acclaimed Contributor
Solution

Re: hide password

Hi (again) Massimo:

Perl has the 'crypt' function built-in.

Regards!

...JRF...
xertusit
Trusted Contributor

Re: hide password

thnxs all