question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Setting password with command line parameter makes it visible in ps aux

See original GitHub issue
  • code-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:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
NGTmeatycommented, Mar 19, 2019

We can probably keep it in here because it’s related.

1reaction
code-ashercommented, Apr 25, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found