1. Install Samba
sudo apt-get install samba smbfs
2. Edit Samba Configuration File
Find the line which is commented out - “; security=user” and change it to: -
security = user
username map = /etc/samba/smbusers
Find the line “encrypt passwords = no” and change it to “encrypt passwords = true”
Add a section for each share that you want to be available: -
[data]
browseable = yes
comment = Data
path = /data
force user = viglen
force group = users
read only = No
guest ok = Yes
3. Add “smbusers” file
A new file is now needed to map smb users onto local linux users. Create the file: -
sudo vi /etc/samba/smbusers
and add the following to it: -
viglen = "viglen"
4. Change SMB Password for user
Set a password for the viglen smb user by running the following command: -
sudo smbpasswd viglen
5. Restart Samba
sudo /etc/init.d/samba restart
6. Test Connection from Windows
Open a windows command prompt (Start -> cmd) and enter the following command (with the correct IP address and password)
net use q: \\aaa.bbb.ccc.ddd\data password /user:viglen
You should get a message “The command completed successfully.”, and Q: should be accessible through Windows Explorer etc.
To remove the share, enter the following command: -
net use /d q:
No comments:
Post a Comment