Update Source list
Open "Terminal Window", enter sudo apt-get update
Open "Terminal Window", enter sudo apt-get install samba Samba-common
Create a new shared directory and set permissions
Open "Terminal Window", enter sudo mkdir/home/share "--Return to shared directory share new success.
Enter the sudo chmod 777/home/share--> carriage return so that the user has write access to the shared directory.
Open configuration file smb.conf
Enter sudo vim/etc/samba/smb.conf, add at the end of the file
[MyShare]
Comment = My share directory
Path =/home/share
browseable = yes
writable = yes
Create a new user to access the shared resource and set a password
Enter sudo useradd smbuser--> Enter and the user is created successfully.
Enter sudo smbpasswd-a smbuser--> carriage return-Enter two times the password and return-the password is set successfully, this user belongs to the SMB group. Similar to adding other users and passwords.
Enter the sudo service smbd restart to restart Samba services--return-to-service restart success.
To access a shared directory named MyShare
In the Test Run window under Windows, type "\\192.168.30.158"-carriage return-double-click on myshare--> Carriage return-Enter user name and password--Return to access success
Ubuntu Samba Service Setup