Parsing SambaServer configuration files in Linux

Source: Internet
Author: User
& Nbsp; reading tips: In Linux, you can access Windows hosts in the LAN through the Samba client, or provide files, printers, and other services to Windows hosts through the Samba server. Samba uses/etc/samba/smb. conf as its main configuration file. Direct modification does not take effect directly until you are using it #  

Tip: In Linux, you can access Windows hosts in the LAN through the Samba client, or provide services such as files and printers to Windows hosts through the Samba server. Samba uses/etc/samba/smb. conf, as its main configuration file, does not take effect directly until you restart the Samba service using the # service sma restart command.

Samba uses/etc/samba/smb. conf as its main configuration file. Direct modification does not take effect until you are using

# Service sma restart

Command to restart the Samba service. Below are several useful parameters for the smb. conf file:

Workgroup = WORKGROUP-NAME ############## set the name to join a workgroup

Server string = brief comment about server ############# this option is optional and is mainly used to COMMENT on the Samba service Windows system.

Host allow = 192.168.1. 192.168.2. 127. ############# this item is important to security. it strictly limits the Samba accessible range. by default, access from all IP addresses is allowed ..

Printcap name =/etc/printcap ############ set the printer configuration file path

Load printers = yes ######## whether to share the printer

Printing = cups ################ printer type. if the printer type is linux standard, do not change it.

Guest account = pcguest ################# if you want the user 'pcguest 'to log on as an anonymous user ..; remove the preceding comments. Make sure the user is in/etc/passwd. The pcguest can be changed to a local user set by the user as needed.

Loginfile =/var/log/samba/% m. log ################### log creates different log files for each logged-in user (Samba user) in this directory.

Passwd Server ################### password verification Server. When you use linux through Samba in Windows. Automatically transmits the username and password used to log on to windows to Samba. Samba then verifies the two information items with windows server. If it is incorrect, a dialog box is displayed, asking the user to re-enter the user name and password. The password SERVER can be an NT Server (usually a primary domain controller) or another Samba SERVER. Therefore, if Security = share, delete the line about the password server.

Password Level-= 8 ######################### Password Level settings

Encrypt password = yes ############## the user password must be encrypted. Because 98/NT currently uses an encrypted password. Therefore, you must use an unencrypted password.

Smb Passwd file =/etc/samba/smbpasswd ############ when you set the password verification server to a Samba server, you need to use this line to specify the password file to be verified. The most important thing is the path set in the password file.

Uin passwd sync = yes

Passwd program =/usr/bin/passwd % u ############## the next two lines are used to update the linux system after the Windows password is changed. password, make sure that the 'encrypt password' and 'smb passwd file' items are enabled.

Pam password change = yes ############# use PAM when the user requests to change the password. No local password program/user/bin/passwd required

Username map =/etc/samba/smbusers ############## set the corresponding user name in this file, for example, root = administrator admin, if every windows user has an account on the samba server, you can leave it unspecified,

Include =/etc/samba/smb. conf % m ############## this line allows you to customize the basic configuration file for each computer, % M indicates the name of the computer NETBIOS is connected.

Obey pam restrictions = yew ############# when a user authenticates, the user must comply with PAM's management restrictions.

Socket options = TCP_NODELAY SO_RCVBUF = 8192 SO_SNDBUF = 8192 ############# set the Socket options for sessions between servers and customers, this setting will optimize the transmission speed.

Interfaces = 192.168.12.2/24 192.168.13.2/24 ############## the multi-network interface must be listed here.

Remote browse sync = 192.168.3.25 192.168.2.255 ############## set Remote browsing for both the current row and the next row

Remote announce = 192.168.1.255 192.168.2.44

# Browser Control Options

Local master = no

Oslevel = 33

Domain master = yes

Preferred master = yes

Domain logons = yes

Logon script = % M. bat ############# set the logon script for the current row and next row

Logon script = % U. bat

Wins support = yes ############## wins server support

Wins server = w. x. y. z ############## wins client settings

Wins proxy = yes ############## set wins proxy

Dns proxy = no ############# dns proxy settings, which do not perform DNS queries on the client by default

[Homes] ############# settings for users to access their own directories

Browseable = no ############# user's private directory, which does not need to be browsed by others

Writeable = yes ############# permission for users to write data to their own directories

[Netlogon]

Guest OK = yes

Share modes = no

[Profiles] ############## default profiles settings

[Printer] ############## printer settings

Path =/var/spool/samba ############## a printer pool (spool) user must create a directory

Browseable = no ############# this row stores temporary printer files.

Set public = yes to allow user 'guest prinr ############## if this parameter is set, the guest user can use the printer.

Printable = yes ############## whether the user can print

[Temp]

Read only = no ############## read-only or writable

Public = yes ############## share or not

Configure a share-level server

Workgroup = linux

Hosts allow = 192.168.1. ############## comment out if you do not want to restrict it

Printcap =/etc/printcap

Load printers = yes

Printers = lprng

Guest account = abc ############# specify a user account abc as an existing user account in samba.

Logfiles =/var/log/sa

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.