Hide and retrieve database credentials


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Hide and retrieve database credentials
# 8  
Old 10-26-2017
Of course, anyone able to read the script will be able to follow it to find the credentials. How do you plan to hide the credentials away? Can you make the file with credentials only readable by the id that runs the Autosys job?

Indeed, anyone able to use ps will also be able to see the credentials because they are on the command line to sqlplus. Can you move the credentials inside the here document that is driving the sqlplus? process?



Just a few thoughts,
Robin

Last edited by rbatte1; 10-26-2017 at 08:59 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Help with credentials when using Grep across multiple servers

Hello all, I need some help with a script I have been working on. I was wanting to know if it is possible to add authentication to it for each server it runs across? The credentials are all the same on each server. This is what I am using so far and it seems to work. I am trying to avoid... (3 Replies)
Discussion started by: Smorgen
3 Replies

2. Programming

How to hide from UNIX strings - obfuscate or hide a literal or constant?

Hi, I need to somehow pipe the password to a command and run some SQL, for example, something like echo $password | sqlplus -s system @query01.sql To make it not so obvious, I decided to try out writing a small C program that basically just do echo $password. So now I just do x9.out | sqlplus... (8 Replies)
Discussion started by: newbie_01
8 Replies

3. UNIX for Advanced & Expert Users

Need to pass credentials in one Go

Hi, We usually switch user using the below command. sudo su - user1 It then prompts for the password which we feed in. I wish to pass both the username and the password in one go thus eliminating the prompt for the password. I am using java standalone to connect to unix using... (11 Replies)
Discussion started by: mohtashims
11 Replies

4. Shell Programming and Scripting

Logging into device with other set of credentials

If I run the below code... it will login into the router and then changes to privilege mode and then stores the running configuration information to an array. In this program, I have included the username and password . In case the username and password is wrong.. it will re login for 2 times... (0 Replies)
Discussion started by: scriptscript
0 Replies

5. Shell Programming and Scripting

Wget/curl credentials validation

Experts, I login to a 3rd party and pull some valuable information with my credentials. I pass my credentials via --post-data in wget. Now my Account is locked. I want my wget to alert that the Account is locked. How can i achieve this. My idea is, get the Source page html from the... (2 Replies)
Discussion started by: sathyaonnuix
2 Replies

6. Shell Programming and Scripting

FTP credentials from a config file

Hi, I am using the following syntax to connect to an FTP server and paste the file. Based on the value in the variable $Folder, i want to connect to different folders on the same server. The credential is different to access different folders. How to get the user name and password from a... (3 Replies)
Discussion started by: ashok.k
3 Replies

7. Shell Programming and Scripting

Hide DB Credentials in unix

Hi, I my unix we have one file that contains all the database credentials. we are calling that file while connecting databse. I need to hide that file....other user should not view that file. How to do this. Please suggest me apart from permisstion(chmod) level suggestion. Regards,... (3 Replies)
Discussion started by: rsivasan
3 Replies

8. Shell Programming and Scripting

A script pls( To retrieve database information)

KSH - Unix -AIX - db2 ************** Get the input from the user say '123' (It varies) Then i want to connect to a database say "D1" then i want th extract from the database by giving "select * from tablename where input = '123' I also want to connect to another database "D2" then i... (3 Replies)
Discussion started by: rollthecoin
3 Replies

9. AIX

Telnet Credentials

Dears i am going to write a shell script to do some administration jobs and automate them , but i need to access remote servers through telnet so my question is how to pass the required credentials to telnet through shell script or can i use a file and redirect the standard input to be from that... (3 Replies)
Discussion started by: TheEngineer
3 Replies

10. UNIX for Dummies Questions & Answers

Ldap : Invalid credentials

Hi All, :) I have configure openldap but when I test this its show me a massage that "Invalid Creedientials". I search for the slove at Google, Yahoo but I did not find any solution. Plz help me. :cool: (3 Replies)
Discussion started by: Sudipta Biswas
3 Replies
Login or Register to Ask a Question
PAM_SETCRED(3)							 Linux-PAM Manual						    PAM_SETCRED(3)

NAME
pam_setcred - establish / delete user credentials SYNOPSIS
#include <security/pam_appl.h> int pam_setcred(pam_handle_t *pamh, int flags); DESCRIPTION
The pam_setcred function is used to establish, maintain and delete the credentials of a user. It should be called to set the credentials after a user has been authenticated and before a session is opened for the user (with pam_open_session(3)). The credentials should be deleted after the session has been closed (with pam_close_session(3)). A credential is something that the user possesses. It is some property, such as a Kerberos ticket, or a supplementary group membership that make up the uniqueness of a given user. On a Linux system the user's UID and GID's are credentials too. However, it has been decided that these properties (along with the default supplementary groups of which the user is a member) are credentials that should be set directly by the application and not by PAM. Such credentials should be established, by the application, prior to a call to this function. For example, initgroups(2) (or equivalent) should have been performed. Valid flags, any one of which, may be logically OR'd with PAM_SILENT, are: PAM_ESTABLISH_CRED Initialize the credentials for the user. PAM_DELETE_CRED Delete the user's credentials. PAM_REINITIALIZE_CRED Fully reinitialize the user's credentials. PAM_REFRESH_CRED Extend the lifetime of the existing credentials. RETURN VALUES
PAM_BUF_ERR Memory buffer error. PAM_CRED_ERR Failed to set user credentials. PAM_CRED_EXPIRED User credentials are expired. PAM_CRED_UNAVAIL Failed to retrieve user credentials. PAM_SUCCESS Data was successful stored. PAM_SYSTEM_ERR A NULL pointer was submitted as PAM handle, the function was called by a module or another system error occured. PAM_USER_UNKNOWN User is not known to an authentication module. SEE ALSO
pam_authenticate(3), pam_open_session(3), pam_close_session(3), pam_strerror(3) Linux-PAM Manual 06/04/2011 PAM_SETCRED(3)