Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have to execute a program that passes in as command line options the username and password. Is there a way to hide the username & password from appearing in the /proc entry for this process.

share|improve this question
Closely related question, "Hide processes from other users based on groups under Linux". (NetBSD supports this, too, via security.models.bsd44.curtain=1) Of course these things only hide the command line from other non-privileged users, you and root still see it. – sr_ Mar 15 '12 at 8:08
I am satisfied as long as non-privileged users cannot see it. – Bon Ami Mar 15 '12 at 8:17
Possible duplicate: "How to make a process invisible to other users?" and these links. – sr_ Mar 15 '12 at 8:34
The coming 3.3 kernel can hide processes between users. See my answer here – jofel Mar 15 '12 at 10:14

If you you wrote the application or have access to the source code, you can modify it to not show that information in proc.

In C, the parameters passed to a program are communicated as a pointer to a character array (a pointer to a pointer to the characters). This array is modifiable by the application, and any modifications you make are reflected in the /proc/ entry. This includes the 0th element, which is the executable's filename.

Other languages have similar equivalents. Just modify the argument list through whichever mechanism the language implements.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.