Samba configuration file Parameter Parsing-Linux general technology-Linux technology and application information. The following is a detailed description. Workgroup = MYGROUP
// This indicates the group to which the SAMBA server will be displayed in "Network Neighbor" in the Windows operating system. The default value is MYGROUP, Which is case insensitive.
Server string = Samba Server
// The description displayed after the Windows client starts the SAMBA server content window.
; Hosts allow = 192.168.1. 192.168.2. 127.
// This option is not used in the case of silence. It can be used to set the host, subnet, or Domain Allowed To access the SAMBA server in the LAN. If more than one name must be separated by commas.
Example:
Hosts allow = 172.17.2.20.t172.17.2.50
Allow host connection from 172.17.2. *. *, but exclude 172.17.2.50
Hosts allow = 172.17.2.0/255.255.255.0.0
Allow all hosts from the 172.17.2.0 subnet to connect
Hosts allow = M1, M2
Allow connections from M1 and M2 computers
Hosts allow = @ xq
Allow all computers from the XQ domain to connect
Printcap name =/etc/printcap
// Set the name and path of the printer configuration file automatically loaded at startup.
Load printers = yes
// Indicates whether to allow all printers in the printer. The browsing list is automatically loaded when the printer is started to support the browsing function of the client.
Printing = cups
// This option is used to specify the print system type.
Guest account = pcguest
// This option is not used by default. It is used to set the Guest account name.
Log file =/var/log/samba/% m. log
// This option creates individual records for all computers connected to the SAMBA server
Max log size = 0
// You can set the maximum log size for each record. The unit is KB.
Security = user
// Specify the security level used by the SAMBA server
Password server =
// This function is not used in the default configuration and takes effect only when the previous option is set to "security = server". It is used to specify the name of the password service, therefore, to use the NETBIOS name, you can also use "password server = *" to automatically find available domain controllers.
Password level = 8
// This option is used to avoid errors generated when the password uppercase digits are allowed to be different between the SAMBA server and the client.
Username level = 8
// This option is used to avoid errors caused by the difference in the upper-case digits of the account allowed between the SAMBA server and the client.
Encrypt passwords = yes
// Indicates whether to specify whether the user password is encrypted and sent to the SAMBA server
Smb passwd file =/etc/samba/smbpasswd
// Password file path used by the SAMBA server
; Ssl CA certFile =/usr/share/ssl/certs/ca-bundle.crt
// It is used to specify all files with trusted CA names
Unix password sync = Yes
// This option can be used to synchronize the encrypted content in the SAMBA password file.
Passwd program =/usr/bin/passwd % u
// This item is used to specify the program for setting the UNIX account password, where % uindicates the user name
Passwd chat = * New * password * % n \ n * Retype * new * password * % n \ n * passwd: * all * authentication * tokens * updated * successfully *
// This option is used to set the indicator string displayed on the screen when the user converts the Linux Password to the SAMBA server password and generates an interactive window with the user
Pam password change = yes
// This option indicates that you can use PAM to modify the password of the SMB client, instead of the program specified in the "passwd program" option.
Username map =/etc/samba/smbusers
// This option specifies a configuration file that contains the user data on the client and server.
Include =/etc/samba/smb. conf. % m
// This option allows the SAMBA server to use other configuration files
Obey pam restrictions = yes
// This option determines whether to use the PAM account and session management commands
Socket options = TCP_NODELAY SO_RCVBUF = 8192 SO_SNDBUF = 8192
// This option is very important when writing TCP/IP programs, because you can adjust the efficiency of SAMBA Server Runtime.
Interfaces = 192.168.12.2/24 192.168.13.2/24
// This option enables the SAMBA server to monitor multiple interfaces. If the server has multiple NICs, configure this option.
You can write it as follows during Configuration:
Interfaces = eth0
Interfaces = 172.17.4.150
; Remote announce = 192.168.1.255 192.168.2.44
// This option allows NMBD to regularly publish the IP address and group name of the SAMBA server to a remote network or host.
#========= Share Definitions ==========================
[Homes] // contents of the home directory settings for the user's day
Comment = Home Directories // Home directory comment
Browseable = no // whether other users are allowed to browse their home directories
Writable = yes // whether to allow writing to a personal directory
Valid users = % S // user allowed to log on, % S indicates the user currently logged on
Create mode = 0664 // default permission for creating a file
Directory mode = 0775 // default permission for creating a directory
Map to guest = bad user
// When you enter an incorrect account and password, you can use the "map to guest" option to set the processing method, however, the preceding "security" option must be set to "user", "server", and "domain"
Description
User Access Denied
Server if the account is correct but the password is incorrect, Allow Logging in with Guest
Domain if both the account and password are incorrect, you can still log on with Guest
[Netlogon] // The "netlogon" directory setting when logging on to the domain
Comment = Network Logon Service // home directory comment
Path =/usr/local/samba/lib/netlogon // local path to access the resource
Guest OK = yes // Password required for connection
Writable = no // whether to allow write to this directory
Share modes = no // whether to allow files in the directory to be shared among different users
[Profiles] // contents of the user configuration file directory
Path =/usr/local/samba/profiles // The local path to which the resource is actually accessed
Browseable = no // whether to allow browsing this main directory
Guest OK = yes // Password required for connection
[Printers] // set the printer environment content
Comment = All Printers // printer Annotation
Path =/var/spool/samba // print the queue path
Public = yes // whether to allow Guest Printing
Browseable = no // whether to allow browsing of the temporary disk content in the printer
Guest OK = no // do you need a password for connection?
Writable = no // whether to allow write to this
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service