Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 ?

UPDATE

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

2 Answers 2

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

Your Answer

 
discard

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.