Reputation: 2258
So I'm working to hide the password from the ps -aux
list, or w
list in linux.
I'm using rlwrap and sqlplus, connecting thusly:
rlwrap sqlplus user/pass@connect_identifier
And it shows my pass in plaintext in the who
list.
Anyone know how I can make it so that it does not show the password?
Upvotes: 1
Views: 1713
Reputation: 60993
It is best to prompt for a password, read it from stdin or a file, or get it from an environment variable. However if you really want to change what is shown by ps
you can use a function commonly called setproctitle()
. On some BSD systems this is in the C library, but there are various other implementations. Of course, if you do this then there is still a brief period where another user could see the original arguments before you change them.
Upvotes: 1