In a previous How To I showed you how to share a folder on a windows network. Today I will detail how to setup a password on that folder. If you havent shared a folder already and installed SAMBA, then head to my other How To.
- First open terminal on your Raspberry Pi
- We will need to greate a group for the samba users run the command sudo addgroup privateshares
- Next create a user by running the command sudo useradd tech -G privateshares , This will create a user named “tech” and add them to the group created earlier
- Then set their password by running the command sudo smbpasswd -a tech
- You will need to type the password twice for the user
- Next run the command sudo leafpad /etc/samba/smb.conf
- Find the section you added in the previous tutorial.
comment=Raspberry Pi Share
- Add the following to the bottom
- valid users = @privateshares
read only = no
- Save and close the text window
- Now in windows head to \\<your pi name>\Home
- You should be asked for your username and password.