how to Hide Passwords From UNIX ps Command


 
Thread Tools Search this Thread
Special Forums Cybersecurity how to Hide Passwords From UNIX ps Command
# 1  
Old 09-15-2009
how to Hide Passwords From UNIX ps Command

Hi,
By reporting the process status with ps, any Unix user will see the command line arguments
#ps -ef
UID PID PPID C STIME TTY TIME CMD
lsc 13837 13825 0 May 11 pts/17 0:01 -ksh
oracle 4698 6294 0 12:00:40 ? 0:00 sqlplus -s system/manager
appluser 4229 4062 0 12:00:03 ? 0:00 sqlldr scott/tiger


So this is a security issue.
1.How the password should not be stored in a shell environment variable
# 2  
Old 09-15-2009
This topic has been discussed many many times on this forum and elsewhere. A simple search of this forum or the Internet will show you many ways to accomplish what you want to do. For example I entered "oracle hide password" in the forum search box and got overy 10 pages of replies.
how to Hide Passwords From UNIX ps Command-unixpng
# 3  
Old 09-15-2009
For Oracle, one way is to store the program in a file and get Oracle to execute it.

Code:
sqlplus /NOLOG @programname.sql

Within the file programname.sql the first line will be an Oracle "CONNECT" statement, for example:
connect SYS/change_on_install as SYSDBA ;


This method is really the normal way and by having the program in a file avoids the clash with shell from characters such as "$" .
Don't forget to protect the file from prying eyes with unix permissions.

Last edited by methyl; 09-15-2009 at 02:46 PM.. Reason: ;
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Ubuntu

Hide command details in top?

I am pulling data from remote SFTP server via LFTP. I really like its features. I have executed following command through screen. lftp -u xxxxx,xxxxx -e "set sftp:connect-program 'ssh -a -x -i /sftp/user/downloads/.ssh/id_dsa';mirror -vvv -c /data/ /sftp/user/downloads/2014_ic; quit"... (1 Reply)
Discussion started by: zsycho
1 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

When did UNIX start using encrypted passwords, and not displaying passwords when you type them in?

I've been using various versions of UNIX and Linux since 1993, and I've never run across one that showed your password as you type it in when you log in, or one that stored passwords in plain text rather than encrypted. I'm writing a script for work for a security audit, and two of the... (5 Replies)
Discussion started by: Anne Neville
5 Replies

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

5. Shell Programming and Scripting

Hide status value from awk system command

Hi, When i use the system( ) function inside a awk, i am getting the ouput with a 0 appended in a new line. Can someone guide me to eliminate the extra line containing 0. Ex : awk -F"|" '{print system("convert.sh" $1}' The output is displayed with 0 in a new line. ... (8 Replies)
Discussion started by: muruganksk
8 Replies

6. UNIX for Advanced & Expert Users

How to hide command line parameters?

Hello I want to hide command line parameters of my programs/scripts to not to be seen with 'ps' command. How can I do that? thanks in advance. (6 Replies)
Discussion started by: xyzt
6 Replies

7. UNIX for Advanced & Expert Users

About unix passwords.

How the unix is maintaining the password ? How it does the encryption and how the passwords are stored in the system and where it is stored ? How it is better when compared to other OS ? (1 Reply)
Discussion started by: nagalenoj
1 Replies

8. HP-UX

How to hide files in unix

Hi all I am new to unix...... i am working on HP-UX I like to know how to hide files and how to view hided files created by other users also please help me Sireesha (1 Reply)
Discussion started by: Sireesha NP
1 Replies

9. Shell Programming and Scripting

Hide Passwords

Is there a way not to display the password in the sys out when your korn shell script logs into sqlplus? (3 Replies)
Discussion started by: lesstjm
3 Replies

10. UNIX for Dummies Questions & Answers

Unix passwords?

The local policy is set in our LAN so that passwords have to be 8 characters and contain a capital letter, a small letter and a special character. Is Unix able to restrict users passwords to certain lengths and characters. (1 Reply)
Discussion started by: wmosley2
1 Replies
Login or Register to Ask a Question