Sponsored Content
Top Forums Shell Programming and Scripting DB Password encryption in config file Post 302981261 by ashishpanchal85 on Friday 9th of September 2016 04:04:22 AM
Old 09-09-2016
DB Password encryption in config file

Hi Gurus,

I need to encrypt the Db passwords which are stored in a configuration file (.txt) as below:

Code:
stage_db_pwd=ABC
this is test line
content_db_pwd=123def
This is test line 2
stg_db_name=xyz

I want to encrypt all the password fields (identified by "pwd"), encrypt them in the same file. The output should look like this:

Code:
stage_db_pwd=%8hjdsk=
this is test line
content_db_pwd=!yhdskk*&=
This is test line 2
stg_db_name=xyz

Regards,
Ashish


Moderator's Comments:
Mod Comment Use code tags please.

Last edited by zaxxon; 09-09-2016 at 06:05 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Zipping with password or encryption

We currently take files (via FTP) off of a mainframe and save them as a text file on our server. This is done via a script. The next thing that is done to that text file is it gets zipped (using ZIP). This all works fine, but it doesn't appear that ZIP (the free version) has any way to password... (2 Replies)
Discussion started by: dsimpg1
2 Replies

2. AIX

File password protection/encryption

Can it be done? Ive read in a few places that the crypt program no longer exists on AIX...if its do-able please tell me how. (2 Replies)
Discussion started by: rdudejr
2 Replies

3. Solaris

Password Encryption (SunOS 5.8)

Hi all, I have a server in the office that we connect to via telnet. Can anyone explain please how i can encrypt the password so it cannot be picked up in plain text by sniffing software like WireShark, etc.? I'm not very experienced in Unix, so any ideas or even links would be great. ... (5 Replies)
Discussion started by: de049
5 Replies

4. UNIX for Dummies Questions & Answers

Password encryption

In unix, i know the password encrypt by using salt But how does it work? And how windows protect its password? Thank you for helping in advance (5 Replies)
Discussion started by: cryogen
5 Replies

5. Shell Programming and Scripting

Password encryption...

Hi, I have a Java app that looks for some parameters in a .properties file such as username and password. However I don't want to leave the password in a text file and I can't modify the app... Does anyone have some idea about how to encrypt/hide/etc the password so it's not freely accessible... (1 Reply)
Discussion started by: Tr0cken
1 Replies

6. UNIX for Dummies Questions & Answers

Password encryption

if I change my password on two different servers, using the same string but the encrypted password in /etc/passwd look different. If I copy an entry from one /etc/password to the other server. I can still log in to both servers using the same password. Only now both /etc/passwd entries are... (2 Replies)
Discussion started by: C0ppert0p
2 Replies

7. Cybersecurity

File encryption tools with MAC address as an encryption key

Hi all, I'm looking for secure file encryption tools that use MAC address as encryption key. FYI, I'm using Red Hat Enterprise Linux OS. For example: when A wants to send file to B A will encrypt the file with B's computer MAC/IP address as an encryption key This file can only be decrypted... (2 Replies)
Discussion started by: sergionicosta
2 Replies

8. Shell Programming and Scripting

Password encryption in RHEL

I am working on a script where we are using sqlplus command to connect to Oracle DB. But the schemaname and password used for sqlplus authentication, have to be hardcoded in the script. DBconnection=scott/tiger@SID sqlplus $DBconnection Here any user who reads the script can read the... (1 Reply)
Discussion started by: max29583
1 Replies

9. Post Here to Contact Site Administrators and Moderators

Password protected excel file without encryption or zipping

All, I have requirement to send password protected excel file in an email from unix/linux box without zipping it. Any help would be appreciated. Thanks.. (1 Reply)
Discussion started by: Durgesh Gupta
1 Replies

10. Shell Programming and Scripting

Password protected excel file without encryption or zipping

All, I have requirement to send password protected excel file in an email from unix/linux box without zipping it. Any help would be appreciated. Thanks.. (8 Replies)
Discussion started by: Durgesh Gupta
8 Replies
FS_GETCRYPT(1)						       AFS Command Reference						    FS_GETCRYPT(1)

NAME
fs_getcrypt - Displays the state of encryption for AFS file transfers SYNOPSIS
fs getcrypt [-help] DESCRIPTION
The fs getcrypt command shows the status of network traffic encryption for file traffic in the AFS client. This encryption applies to file traffic going to and coming from the AFS server for users with valid tokens. The complement of this command is fs setcrypt which sets the status of encryption on the client. CAUTIONS
AFS uses an encryption scheme called fcrypt, based on but slightly weaker than DES. Because fcrypt and DES are obsolete, the user must decide how much to trust the encryption. Consider using a Virtual Private Network at the IP level if better encryption is needed. Encrypting file traffic requires a token. Unauthenticated connections or connections authorized via IP-based ACLs will not be encrypted even when encryption is turned on. OPTIONS
-help Prints the online help for this command. All other valid options are ignored. OUTPUT
If encryption is enabled, the output is: Security level is currently crypt (data security). If encryption if disabled, the output is: Security level is currently clear. EXAMPLES
There is only one way to invoke fs getcrypt: % fs getcrypt PRIVILEGE REQUIRED
No special priviledges are required for this command. SEE ALSO
fs_setcrypt(1) The description of the fcrypt encryption mechanism at http://surfvi.com/~ota/fcrypt-paper.txt <http://surfvi.com/~ota/fcrypt-paper.txt>. COPYRIGHT
Copyright 2007 Jason Edgecombe <jason@rampaginggeek.com> This documentation is covered by the BSD License as written in the doc/LICENSE file. This man page was written by Jason Edgecombe for OpenAFS. OpenAFS 2012-03-26 FS_GETCRYPT(1)
All times are GMT -4. The time now is 01:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy