Sponsored Content
Full Discussion: Hiding password from ps
Top Forums Shell Programming and Scripting Hiding password from ps Post 18892 by LivinFree on Thursday 4th of April 2002 03:34:55 AM
Old 04-04-2002
Well, the C program may not work.
Check this out:
Code:
$ cat test.c
#include <stdio.h> 
main(){ system(" sleep 1234 "); } 

$ gcc -o test1 test.c
$ ./test1 &
[1] 7718
$ ps -ef
< snipped for brevity >
me      7718  7241  0 00:19 pts/1    00:00:00 ./test1
me      7719  7718  0 00:19 pts/1    00:00:00 sleep 1234
me      7720  7241  0 00:20 pts/1    00:00:00 ps -ef
$

Will this aplication prompt you for a password if you don't supply one on the command line (like sqlplus)?
In that case, you might be able to use a shell script:
Code:
#!/bin/sh
/path/to/CONCSUB <<EoF
USERNAME/PASSWORD@DB
command
another command
EoF

This may or may not work though. Either way, though, make sure you lock down permissions on the file so one one but you can read it. The commands passwords will be left in pleain text in the script and also in the compiled C program.
 

10 More Discussions You Might Find Interesting

1. IP Networking

Hiding an IP address

Is there anyone who knows how to hide an IP from being logged by the site you are visiting. I know of some paid companies but I am looking for a different solution. Is there some way in UNIX to mask the ip. Help this is urgent. Datopdog (1 Reply)
Discussion started by: datopdog
1 Replies

2. UNIX for Dummies Questions & Answers

Hiding login/password in process!

Hello, I am trying to figure out away to hide a command from users when performing a ps check. I have a ksh that purges a table in a database. If I perform a >ps -eaf |grep ksh, I get the login id and password. I do not want other users seeing this. Is there a way to hide this. The login... (5 Replies)
Discussion started by: ctcuser
5 Replies

3. Shell Programming and Scripting

Hiding password for FTP in a script

Hi, I have a simple script to ftp from unix to a mainframe to get and put files. Currently I have the password setup in a VARS file and dereference the var in my script. Doing it this way allws me to change the password in only one place but it is still viewable for many people. Is there any... (6 Replies)
Discussion started by: Cass3
6 Replies

4. Shell Programming and Scripting

Hiding the Directory

Hi, I have a directory i want to just hide this directory. Could you please tell me the command to hide directory. (2 Replies)
Discussion started by: shivanete
2 Replies

5. UNIX for Dummies Questions & Answers

Hiding Password

Hello. A bit of a puzzle here: I have a 3rd party executable, which requires the following parameters: parm1 = program_name, parm2=userid/password, parm3=additional flags. We tried passing password as a variable, but you can do grep, and see what the password actually is I found a bit... (2 Replies)
Discussion started by: Kishinevetz
2 Replies

6. UNIX for Dummies Questions & Answers

New Approach Hiding login password from ps -ef

Hello all , I looked up this site for solutions to hide login info from ps -ef | grep like using a seperate file and store the password in that especially for oracle sqlplus scripts. I just got this thought , But dont know how to implement this in UNIX. Is there a way to revoke access from... (17 Replies)
Discussion started by: simonsimon
17 Replies

7. Programming

C++ overriding Vs hiding

class B { public: void fns(void){//base def;} }; class D:public B { public: void fns(void) {//new def;} }; I was thinking the above is overriding but somewhere else i found the above is just hiding.Only virtual functions can be considered as overriding? This is the exact statement ... (1 Reply)
Discussion started by: johnbach
1 Replies

8. Shell Programming and Scripting

Scripting help/advise on hiding/masking username/password

Hi, I currently have a UNIX script with a function that uses a username and password to connect to the database, retrieve some information and then exit. At the moment, am getting the username and password from a hidden plain text file and permission set to -r--------, i.e. read only to who... (1 Reply)
Discussion started by: newbie_01
1 Replies

9. Shell Programming and Scripting

Remote call not hiding password fields

Not sure on the description, but here is a quick rundown. I have 2 servers, we'll call them serverA serverB On serverB, I am calling a script that inside it has the following: ssh srvdsadm@serverB sudo -u dsadm /opt/apps/DataStage/scripts/autoDeploy.sh ${projName} ${subProjVar}... (1 Reply)
Discussion started by: cbo0485
1 Replies

10. Shell Programming and Scripting

Password hiding in UNIX

Hi guys, I use STTY command to make the password invisible. Now I need to write the password into another file pwd.txt, but in an invisible manner, something like ******. Another thing is to when I echo the content of pwd.txt I get the password I actually typed. Thanks guys. Help me out. (5 Replies)
Discussion started by: mohanalakshmi
5 Replies
yppasswd(1yp)															     yppasswd(1yp)

Name
       yppasswd - change password in yellow pages (YP) service.

Syntax
       yppasswd [ name ]

Description
       The  command lets you change your password in the yellow pages (YP) map, a network data base service.  Only you or the superuser can change
       your YP password.

       When you enter the command, the program prompts you for the old password and then for the new password. Note that  the  passwords  are  not
       displayed on the screen.

       Next,  the  program asks you for the new password again, to verify that you have typed it correctly.  If you do not type the passwords cor-
       rectly, you will receive an error message after you enter the new password.

       Your new YP password must meet one of the following requirements:

	  o It must be a combination of at least six alphanumeric characters, or

	  o It must be a minimum of four characters, with at least one being non-alphanumeric, such as a control sequence.
       The command does not change the YP password.  This command only changes the local password file and not the YP master password  file.   See
       Chapter 3 of the Guide to the Yellow Pages Service for further information.

Diagnostics
       Please use a longer password
       Your new password does not meet the minimum length requirement.

       Mismatch- password unchanged
       You misspelled your new password or its verification.

       couldn't change passwd
       Your new password can not be activated. It must be different from your old password and your login name.

Files
       Password file

       Yellow Pages directory

See Also
       passwd(1), passwd(5yp), ypfiles(5yp), yppasswdd(8yp)
       Guide to the Yellow Pages Service

																     yppasswd(1yp)
All times are GMT -4. The time now is 11:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy