I have network server on ubuntu server with Samba. I want to set a password to a specific folder.
Does anybody know how to do this?
You will have to add a new user for that folder with different password ofc.:
Below is an example with user secretuser:
Add user and set password:
useradd secretuser
passwd secretuser
Add samba user:
smbpasswd -a secretuser
Add a user to a Samab share:
[accounts] comment = Accounts data directory
path = /path/to/folder
valid users = user1 user2 secretuser
public = no
writable = yes
Restart the samba:
service smb restart