When the security level is user, then the user we set up on this machine must be joined to the SMB server, and the command is to add Linux users to the SMB server for smbpasswd-a users, smbpasswd username to modify the password of the user in the SMB server
#======================= Global Settings ===================================== configuration for all resources
[Global]
# workgroup = Nt-domain-name or workgroup-name----------------------------workgroup name (you can do this by default)
Workgroup = Soft
# server string is the equivalent of the NT Description field
Server string = Samba Server---------------------------------------------Brief description of SMB servers
Hosts allow = 192.168.1. 192.168.2.127. --------------------------------set up a host with access to the SMB server (IP, hostname, domain name)
# security mode. Most people would want user level security. The
# Security_level.txt for details. ------------------------------Specify the security level used by the SMB server. Security = share refers to the access to resources without an account password when the client is connected to an SMB server.
Security = user refers to the user name and password that must be entered when the customer condensed the SMB server to access
Security = User
# Do don't enable this option unless you have read those documents
Encrypt passwords = yes
SMB passwd file =/etc/samba/smbpasswd
#============================ Share Definitions ============================== shared resource parameter configuration
[Homes]-----------------------users to access their accounts and passwords and whether they are allowed to enter their own hosting folders
Comment = home directories (This is the default, you can not modify)
browseable = No
writable = yes
Valid users =%s
Create mode = 0664
Directory mode = 0775
[Printers]----------------------------printer configuration
Comment = All Printers
Path =/var/spool/samba
browseable = No
# Set public = yes to allow user ' Guest account ' to print
Guest OK = No
writable = no
printable = yes
; [MyShare]
; Comment = Mary ' s and Fred ' s stuff
; Path =/usr/somewhere/shared
; Valid users = Mary Fred
; public = No
; writable = yes
; printable = no
; Create mask = 0765
[PP]--------------------The following are the folders that I share
Comment = This are our soft! Share description
Path =/www/pp of the shared folder
Write list = List of users who are allowed write permissions for SMB, and the SMB user is allowed to write
Read List = Lists of users with read-only permissions
Public = yes whether to allow publishing