[Configure Samba]
1. Install
Sudo apt-Get install samba
Sudo apt-Get install smbfs
2. Create a shared folder
Mkdir/home/LiY/share
Chmod 777/home/LiY/share
3. Back up and edit smb. conf to allow network users to access
Sudo CP/etc/samba/smb. conf/etc/samba/smb. conf_backup
Sudo gedit/etc/samba/smb. conf
Search for this line of text "; security = user"
Replace the following rows
Security = user
Username map =/etc/samba/smbusers
Add the following lines to the end of the file. Assume that the user allowed to access the file is newsfan. The shared folder name is share.
[Share]
Comment = shared folder with username and password
Path =/home/LiY/share
Public = Yes
Writable = Yes
Valid users = yourname
Create mask = 0777
Directory mask = 0777
Force user = A [A is the user name you are logged on to.]
Force Group = B [B is the user group corresponding to user A]
Available = Yes
Browseable = Yes
Change the value here by the way. Find [Global] and change workgroup = mshome
Workgroup = workgroup
Displays charset = UTF-8
UNIX charset = UTF-8
DOS charset = cp936
The following three lines are used to prevent Chinese directory garbled characters. Depending on your local, the UTF-8 may need to be changed to cp936. Do it yourself.
4. Now add the newsfan network access account. If this account does not exist in the system
Sudo useradd yourname
Sudo smbpasswd-A yourname
Sudo gedit/etc/samba/smbusers
Add the following line to the new file and save it.
Newsfan = "Network username"
Use this command to change the newsfan network access password in the future.
Sudo smbpasswd-A yourname