Setting password with command line parameter makes it visible in ps aux
See original GitHub issuecode-server
version: 1.32.0-275-linux-x64- OS Version: Ubuntu 18.04
Description
Setting password with command line parameter makes it visible in ps aux
Steps to Reproduce
./code-server --password=supersecret $CODE_SERVER_ROOT
ps aux
Possible solution
Seems that there’s some possible ways to hide it mentioned here
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:5 (4 by maintainers)
Top Results From Across the Web
bash - Hiding secret from command line parameter on Unix
First, you can NOT hide command line arguments. They will still be visible to other users via ps aux and cat /proc/$YOUR_PROCESS_PID/cmdline at...
Read more >Setting password with command line parameter makes it ...
The recommended way now to set a password is by using the PASSWORD environment variable, which will prevent the password from displaying in...
Read more >How to hide a password passed as command line argument?
So passing the commands with the passphrase does not show up in ps or /proc at all. $ darkcoind masternode start <mypassphrase> $...
Read more >How does ps know to hide passwords? - Unix Stack Exchange
In this article it is described for C, how to do this. The following example hides/deletes all command line arguments: #include <string.h> int ......
Read more >Reading command line password argument with "ps" in Linux
I was recently reading an article online about some methods to hide password argument from system status programs like “ps” or “top” in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We can probably keep it in here because it’s related.
The recommended way now to set a password is by using the
PASSWORD
environment variable, which will prevent the password from displaying in the process listing.https://github.com/codercom/code-server/commit/a3ac4567e39133e736e7e74365f10e9b97861621 also makes it so the password is only logged when it was generated.