Sponsored Content
Top Forums Shell Programming and Scripting Encrypt DB password in Script Post 302679669 by Corona688 on Tuesday 31st of July 2012 11:40:47 AM
Old 07-31-2012
Obscuring it isn't much help. You have to be able to retrieve it, and anything you can retrieve, so can anyone else.

Putting it in variables won't help, it'll still be visible in ps.
This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. 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

2. Shell Programming and Scripting

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.... (1 Reply)
Discussion started by: DSDexter
1 Replies

3. Shell Programming and Scripting

how to set password/encrypt a shell script

Hi, I have written a shell script in unix for my customer. Now I want to make it only execute and not to read/write. Can anybody help me how to set password protect/encript my script. Thanks Suresh (3 Replies)
Discussion started by: suresh3566
3 Replies

4. UNIX for Advanced & Expert Users

Encrypt the password ,source it in a expect script...!!

Hello folks I have a conf file ,say 'pass.conf' ,which is storing ascii password : PASS1111. I need to encrypt this password once and store it in a file. I ,then need to write a script which would read this encrypted password and decrypts it.The o/p o this script shud be this decrypted... (8 Replies)
Discussion started by: ak835
8 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

how to encrypt a password in shell script

Hi, I have run the below script which is connected to db2 v9.5. There is no issue. The only problem is how to encrypt the dbpwd? #!/bin/ksh #---- Set Environment dbalias="dev1db" dbuser="user1" dbpwd="password" #---- Connect to the Database cd /opt/ibm/db2/V9.5/bin db2 "connect to... (1 Reply)
Discussion started by: lookinginfo
1 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 Password file and decrypt in a shell script

Hi All, I have stored Oracle database passwords in a hidden file - .pass_file. My shell script reads the hidden file, gets the password and then logs in to the Oracle database and runs some SQL script. My requirement is: I need to provide the shell script to be executed by someone else. So,... (1 Reply)
Discussion started by: sunpraveen
1 Replies

9. Shell Programming and Scripting

Encrypt and decrypt a password in shell script

Hi All, very good morning all. I am trying to connect to informatica repository by using shell script. I have written pmrep connect command in the script file. But i need to provide repository, domain ,username and password to connect. Username and password are hard coded in the script... (8 Replies)
Discussion started by: SekhaReddy
8 Replies

10. Shell Programming and Scripting

Encrypt and decrypt the password in a Shell Script

Hello, I have the following UNIX shell script which connects to the teradata database and executes the SQL Queries. For this, I am passing database name, username and password. I don't want to reveal my password to anyone. So, is there any way that I can encrypt my password and read the... (2 Replies)
Discussion started by: ronitreddy
2 Replies
gettxt(1)							   User Commands							 gettxt(1)

NAME
gettxt - retrieve a text string from a message database SYNOPSIS
gettxt msgfile : msgnum [dflt_msg] DESCRIPTION
gettxt retrieves a text string from a message file in the directory /usr/lib/locale/locale/LC_MESSAGES . The directory name locale corre- sponds to the language in which the text strings are written; see setlocale(3C). msgfile Name of the file in the directory /usr/lib/locale/locale/LC_MESSAGES to retrieve msgnum from. The name of msgfile can be up to 14 characters in length, but may not contain either (null) or the ASCII code for / (slash) or : (colon). msgnum Sequence number of the string to retrieve from msgfile. The strings in msgfile are numbered sequentially from 1 to n, where n is the number of strings in the file. dflt_msg Default string to be displayed if gettxt fails to retrieve msgnum from msgfile. Nongraphic characters must be represented as alphabetic escape sequences. The text string to be retrieved is in the file msgfile, created by the mkmsgs(1) utility and installed under the directory /usr/lib/locale/locale/LC_MESSAGES . You control which directory is searched by setting the environment variable LC_MESSAGES. If LC_MES- SAGES is not set, the environment variable LANG will be used. If LANG is not set, the files containing the strings are under the directory /usr/lib/locale/C/LC_MESSAGES . If gettxt fails to retrieve a message in the requested language, it will try to retrieve the same message from /usr/lib/locale/C/LC_MES- SAGES/ msgfile. If this also fails, and if dflt_msg is present and non-null, then it will display the value of dflt_msg; if dflt_msg is not present or is null, then it will display the string Message not found!!. EXAMPLES
Example 1 The environment variables LANG and LC_MESSAGES. If the environment variables LANG or LC_MESSAGES have not been set to other than their default values, the following example: example% gettxt UX:10 "hello world " will try to retrieve the 10th message from /usr/lib/locale/C/UX/msgfile. If the retrieval fails, the message "hello world," followed by a newline, will be displayed. ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of gettxt: LC_CTYPE and LC_MESSAGES. LC_CTYPE Determines how gettxt handles characters. When LC_CTYPE is set to a valid value, gettxt can display and handle text and filenames containing valid characters for that locale. gettxt can display and handle Extended Unix Code (EUC) characters where any individual character can be 1, 2, or 3 bytes wide. gettxt can also handle EUC characters of 1, 2, or more column widths. In the "C" locale, only characters from ISO 8859-1 are valid. LC_MESSAGES Determines how diagnostic and informative messages are presented. This includes the language and style of the messages, and the correct form of affirmative and negative responses. In the "C" locale, the messages are presented in the default form found in the program itself (in most cases, U.S. English). FILES
/usr/lib/locale/C/LC_MESSAGES/* default message files created by mkmsgs(1) /usr/lib/locale/locale/LC_MESSAGES/* message files for different languages created by mkmsgs(1) ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWloc | |CSI |Enabled | +-----------------------------+-----------------------------+ SEE ALSO
exstr(1), mkmsgs(1), srchtxt(1), gettxt(3C), setlocale(3C), attributes(5), environ(5) SunOS 5.11 20 Dec 1996 gettxt(1)
All times are GMT -4. The time now is 12:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy