suggeted reading:
1. Man smb.conf
2. Man smbpasswd
Steps:
Do the following commands
sudo apt-get install Samba
Cd/etc/samba
SUDP CP smb.conf Smb.conf.bak
sudo vim/etc/smb.conf
In the file smb.conf, find sections [homes], uncomment and modify the related lines, you'll get the following lines in [H Omes] section:
Comment = Home directories
browseable = yes
Read Only = no
Create mask = 0775
Directory mask = 0775
If you're a Linux user, let's say, with Name ' abc ' and when you connect this Linux PC with Samba, you shall also use the SAM e name, which is ' abc '. This would allow your to access your home directory in your Linux PC.
Suppose your user name is "ABC", you Need to do:
sudo smbpasswd-a ABC
This command would allow you to add a samba user as well as to set the password for samba.
Then does the following command to enable the user:
SMBPASSWD-E ABC
Now, on your Windows PC, you can connect \\[IPADDRESS]\ABC, supplying the user name and the password. Then you'll be able to access your home directory.
That should is done for the most of the users. But your may is satisfied with the full home directory open to the connected user
If your you want to limit your accessible directory other than the default one, you can add one more line in your [homes] Section (Suppose-a directory named ' Workdir '):
Path =%h/workdir
Here, in Samba ' s language,%H means the home directory of the Linux user.
Install Samba on Linux 16.04 LTS