Sponsored Content
Full Discussion: How to Encrypt password
Top Forums Shell Programming and Scripting How to Encrypt password Post 302364421 by DSDexter on Friday 23rd of October 2009 03:10:36 AM
Old 10-23-2009
How to Encrypt password

Hello,

I have a paramter file, In which I store all the user-ids and passwords for the project. So if a user just invokes the paramter file he has access to all the variables, which i have exported in the parmatere file.

Now if a user echo's the variable which stores the databse password. He can clearly view it on the screen.

I define the password variable something like this.

Code:
var_pwd=pa$$worD
export var_pwd

So if I do

echo $var_pwd, It displays the password. I dont want this to be displayed as is, the output of echo should be some encryted text. How can i do this?

Thanks
DSDexter
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

encrypt and decrypt password

how do i encrypt and decrypt a password (2 Replies)
Discussion started by: sanwish
2 Replies

2. Shell Programming and Scripting

Expect Script....encrypt password and use

Could someone please help me...I have an expect script. There's a need for a log in during the script and a password is required...right now the password is just a variable in the expect script...what would be the best way to put that in an encrypted flat file and have the expect script pull the... (2 Replies)
Discussion started by: cubs0729
2 Replies

3. UNIX and Linux Applications

How to encrypt oracle password table ?

Hi Oracle & Unix expert, Could you tell me how to encrypt oracle table ? Thanks. (1 Reply)
Discussion started by: olaris
1 Replies

4. Shell Programming and Scripting

Encrypt and save password

Hello all, I need to encrypt and save a password in a file and later decrypt to determine the original password string. Please suggest how can I use the linux commands or other approach to accomplish this. Thanks for your help. (1 Reply)
Discussion started by: cheerful
1 Replies

5. Shell Programming and Scripting

How to hide/encrypt password in script?

Hi I have following problem Im writing a script (in bash ) , where need to be written login & passwd for databas client . Its need to in following form login passwd@dbhostname . The problem is so anybody can read it so the passwd & login are visible and thats not very safety . Can... (8 Replies)
Discussion started by: kvok
8 Replies

6. Shell Programming and Scripting

DB2 Connect Encrypt Password

Hi All, If someone can help me with password encryption. We have shell scripts that connect to a database using db2 connect and we have the password hardcoded in the script. Can someone let me know if there's a way to encrypt this password? I've seen alot of users suggest we create an... (3 Replies)
Discussion started by: rethymno19
3 Replies

7. Shell Programming and Scripting

Encrypt password but use * when typing password

Hi, I came across the following script for encrypting the password in this forum #! /usr/bin/ksh exec 4>/dev/tty function getpass { typeset prompt=$1 typeset backspace=$(echo \\b\\c) typeset enter=$(echo \\r\\c) typeset savesetting=$(stty -g) ... (9 Replies)
Discussion started by: dbashyam
9 Replies

8. Shell Programming and Scripting

Encrypt DB password in Script

Hi, I have a SQL which i want to run through a shell script. query_result=`/home/oracle/product/11.2.0/bin/sqlplus -S uname/pwd@DBNAME <<! set heading off feedback off trimspool on set pagesize 0 set linesize 9999 spool $PARAM_PATH/param_name.txt; Select sysdate from dual; spool off;... (6 Replies)
Discussion started by: chetan.c
6 Replies

9. Shell Programming and Scripting

Encrypt Plaintext Password?

How do I encrypt a plaintext password that I need hardcoded in a bash script? (3 Replies)
Discussion started by: wyclef
3 Replies

10. UNIX for Beginners Questions & Answers

Encrypt and Decrypt a File with Password

Hello, I have few files on unix which are payroll related and I need them to encrypt with password so others wouldn't see the data. I use ETL tool and would like to know the unix command that does encryption/decryption to use in the ETL. Thank you, Sri (3 Replies)
Discussion started by: eskay
3 Replies
PQRM(1) 							       pqrm								   PQRM(1)

NAME
pqrm - Remove job from NetWare print queue SYNOPSIS
pqrm [ -h ] [ -S server ] [ -U user name ] [ -P password | -n ] [ -C ] queue_name job_ID [ another_job_ID ... ] DESCRIPTION
pqrm remove specified jobs from the NetWare print queue available to you on some server. If you are already connected to some server, this one is used. pqrm looks up the file $HOME/.nwclient to find a file server, a user name and possibly a password. See nwclient(5) for more information. Please note that the access permissions of .nwclient MUST be 600, for security reasons. OPTIONS
queue_name queue_name is used to specify queue. You can not use wildcards in the name. job_ID , another_job_ID job_ID is used to specify which job has to be deleted. -S server server is the name of the server you want to use. -U user name If the user name your NetWare administrator gave to you differs from your unix user-id, you should use -U to tell the server about your NetWare user name. -P password You may want to give the password required by the server on the command line. You should be careful about using passwords in scripts. -n -n should be given to mount shares which do not require a password to log in. If neither -n nor -P are given, pqstat prompts for a password. -C By default, passwords are converted to uppercase before they are sent to the server, because most servers require this. You can turn off this conversion by -C. SEE ALSO
nwclient(5), nprint(1), slist(1), ncpmount(8), ncpumount(8), pqlist(1), pqstat(1) CREDITS
pqrm was written by Petr Vandrovec (vandrove@vc.cvut.cz) pqrm 03/03/1998 PQRM(1)
All times are GMT -4. The time now is 06:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy