Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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 written a command line application in C++ that is used to access an online user account via a SOAP API. In order to avoid having any login details written to file anywhere on my machine for security purposes, I decided to write the application as taking the username and passwords as command line arguments. I then found that upon running a ps -aux command that those sensitive arguments are actually visible in the process list. Is there anyway that these can be masked? I am probably being overly sensitive about the security aspects here but I would like to avoid this data being accessible in any way.

If not, are there any other options available other than using encryption algorithms to decrypt this data from a file or passing in encrypted command line arguments?

share|improve this question

The kernel maintains internal pointers to the start and end of the arguments array in the process address space. So, you have to do it in tricky way. You will find a brief explanation here.

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.