Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 a Linux box which should share a few directories to other systems over the LAN. The other systems are running linux as well.

I'd like to associate a different password for each folder without creating different users. Is there a way to achieve that?

Feel free to put NFS and SSH combos into the mix. The key point is that I need different passwords for different directories, like this:

EXPORTED DIR: /opt/dir1 PASSWORD: 'foo'

EXPORTED DIR: /usr/lib/dir2 PASSWORD: 'bar'

share|improve this question
up vote 2 down vote accepted

If you simply want to password protect each folder then you'll have to use something like Samba. There is no other method of sharing a file system/directory I know of that'll allow you to put a (shared) password on a share.

share|improve this answer

If the folders are small in size perhaps encrypt each with a different password using gpg.

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.