Server Fault is a question and answer site for system and network administrators. 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 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 4 down vote accepted

Samba can do this with share level passwords. Each directory would be a different share with its own password defined in smb.conf.

share|improve this answer
+1. NFS isn't capable of password-based authentication unless you're using NFSv4 with Kerberos authentication. You almost certainly want to be using Samba. – jgoldschrafe Nov 9 '10 at 16:12

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.