Encrypting the password


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Encrypting the password
# 1  
Old 02-08-2011
Java Encrypting the password

Iam using the teradata...
and running the scripts in unix,
I wan to encrypt the teradata password in Unix...

my hostname is : bprod
usename: KRN777
passwrd: passwrd

can ant one tell me the exact command to encrypth the passwrd....

thanks,
# 2  
Old 02-08-2011
What do you mean by 'encrypt the password'. Obfuscate it so that people reading the script can't get at it?

If you actually need to use the password in the script in an unimpeded and automatic way, there's no point. Anyone who'd be able to see your script would also be able to see the decryption code.

So stop people reading the script. chmod 100 script.sh would be more effective. You could make it belong to one specific user, perhaps, and disable logins for that user, so you can only run it with sudo -u username /path/to/script.sh You'd need to configure sudo to allow that of course.
# 3  
Old 02-08-2011
i think by using
PWD=`ftppwd hostname username`;

i dont know how to use or declare the password in it
or encrypt in it
# 4  
Old 02-08-2011
PWD isn't password, it's "print working directory".

You're going to need to be a lot clearer about what you want, and post more of your script, so we can have at least an inkling of what you're trying to do.
# 5  
Old 02-08-2011
BOFA_PWD is like variable
export BOFA_PWD=`ftppwd KRNSS PTP`;
bteq << EOF
.logon KRNSS/PTP,$BOFA_PWD;

in the above.... KRNSS is hostname..... PTP is username
and
.logon is teradata command hostname/username,passwrd..
# 6  
Old 02-08-2011
Wherever I see ftppwd, it's 'print working directory', not 'password'.

But, assuming ftppwd is actually a command that produces passwords (shudder), I think my answer holds. Obfuscating a password is pointless when you can't keep it obfuscated: The instant you decrypt it and use it, it becomes vulnerable again.

Depending on whatever .logon actually is there may be noninteractive authentication methods available though. I can't tell from what little you're willing to post.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. High Performance Computing

Encrypting interconnect

Hi, i've got a qusetion regarding interconnect of compute nodes. In our company we are running a Simulation Cluster which is administrated by the Simulation department. Now our central IT requires to encrypt the interconnect of the compute nodes. Does anybody in that business encrypt... (3 Replies)
Discussion started by: fiberkill
3 Replies

2. Solaris

Encrypting or maksing password in cron

Hello experts, I am an PLM application admin, use AIX/SOlaris servers where application is installed to schedule a cron in my system this what i do Login to AIX/Unix system using an OS account, Schedule a service to execute the required script - The script will have a PLM utility and... (4 Replies)
Discussion started by: kraghum
4 Replies

3. Programming

Encrypting/Decrypting passwords

I know that simply encrypting and decrypting passwords in a script is as bad as storing them in plain text, but I've been searching for an answer to this for a few days now, and haven't found an answer that fits the problem I'm having. Here's the scenario. I'll give more details than I think may... (3 Replies)
Discussion started by: mdrisser
3 Replies

4. Shell Programming and Scripting

Encrypting password

Hello All, I need to accept a password from the user and validate it, without having to hard-code it anywhere. Any ideas? (3 Replies)
Discussion started by: optimus_1
3 Replies

5. Shell Programming and Scripting

Encrypting the login password on Solaris 10

Hi, Could you pls. help me in encryting a database password on Solaris 10 Box. eg : username : test password : t est123 The request is to encrypt the test123 so that no one can understand the what the password is ? thanks (7 Replies)
Discussion started by: krackjack
7 Replies

6. Solaris

Encrypting a script......

Hiiiiii..... every one..... I have written a script, and i want to make that script confidential.So that, only i can see that script. I am using " crypt " command in solaris 9, to encrypt that script.But when i am executing this... (6 Replies)
Discussion started by: prashantshukla
6 Replies

7. UNIX for Advanced & Expert Users

encrypting files in ksh

I have an ascii file that I want to encrypt and save. I have seen this done before, but cannot remember how, nor can I find anything in any of my manuals or online help. Any ideas how to do this? Thanks, Henry (6 Replies)
Discussion started by: hwollman53
6 Replies

8. AIX

Encrypting password

I have a strange question for someone regarding the AIX 5.2 environment. Here is the scenerio: I have a script that is running a menu full of options. 1. I like food 2. I don't like food Enter Option:_ Enter userID:_ Enter Password:_ (The menu is conversational only so go with me on... (6 Replies)
Discussion started by: Justman
6 Replies

9. Shell Programming and Scripting

Encrypting a password for shell script

All, I want to encrypt a database system administration password into a file or environment variable. Then, I want to decrypt the password from the file or environment variable so nobody sees the clear text password. For example, I have the database password of developement. I need to... (1 Reply)
Discussion started by: bubba112557
1 Replies

10. UNIX for Dummies Questions & Answers

encrypting Unix flatfile

Hi, I am new to unix. I have a flat file that needs to be pgp encyrpted in ASCII format and ftped in Ascii format to remote location. Can any one tell me the steps involved in the pgp encryption of the unix file. I will really appreciate if any one can help me with the pgp encryption shell... (1 Reply)
Discussion started by: rkumar28
1 Replies
Login or Register to Ask a Question