Super User is a question and answer site for computer enthusiasts and power users. 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 the following problem:

I need to run some scripts on a Ubuntu machine but I do not want those scripts to be visible by anybody. What could be the best way to do that ? I was thinking of the following:

  • create a particular user
  • Add the scripts in this user's home directory
  • Protect + crypt the user's home directory => Can I run the script from outside if the directory is crypted ? Can superuser see the content of the home dir ?

Is there a right way to do this ?


I thing the best way would be that root own those scripts. In this case I would need to allow an another user to modify the network configuration. Is it possible to ONLY provide network rights to a user ? (via sudo or else)

share|improve this question
What are you actually wanting to accomplish here? What's in those scripts that makes you believe that it is important to keep the sysadmin from viewing their contents? – Dave Sherohman Apr 20 '11 at 9:41
@dave-sherohman Those scripts contains some admin login/password and the process used to transfer data to some other high sensibility systems. – Luc Apr 20 '11 at 10:39

A correctly implemented encrypted directory (such as the one created by the Ubuntu installer, which uses ecryptfs) will not be readable unless it's mounted.

share|improve this answer

The superuser can't see it while it's encrypted, but if you create it, (the encrypted dir) or use it, of course root can see it all.

There is no right way to do this, in fact, there cannot be any way of doing this.

If you're willing to let go of theory, I suppose you could put it all in a virtual private server, or, if you're worried about users other than root, perhaps as little as a an LXC namespace.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .