Samba server-Linux Enterprise Application-Linux server application information. For details, refer to the following section. Configuration File
1) The/etc/samba/smb. conf file consists of two parts:
2) global
This configuration is related to the entire samba service.
Samba server group or windows Domain Name
Workgroup = MYGROUP
Brief Introduction to samba Server
Server string = My samba server
Set hosts, domains, and subnets for accessing the server
Hosts allow = 192.168.1., 192.168.0. 127., client1, abc.com
Hosts allow = 192.168.16. hosts t 192.168.16.4 (allow access from all hosts EXCEPT 192.168.16.4)
Sets the printer configuration file automatically loaded when samba is started.
Printcap name =/etc/printcap
Set whether to allow printing of all printers in the configuration file to automatically load upon startup
Load printers = yes
Set guest Account Name
Guest account = pcguest
Specify the security level used by the samba server: user, share, server, domain, ads
Security = user
Set the NIC to be monitored
Interfaces = eth0 or
Interfaces = 192.168.16.127 or
Interfaces = 192.168.16.177/24 or
Interfaces = 192.168.16.177/255.255.255.0
Set the samba server to act as the wins server at the same time to convert the NetBIOS name to the corresponding IP address.
Wins support = yes
Set the IP address of the wins Server
A samba server cannot act as both a wins server and a client. If a samba server is not a wins server but needs a wins server, set the wins server to w. x. y. z project to specify the wins server, and this server must also be able to register in the DNS server
Wins server = 192.168.16.127
You can use the testparm command to check whether there is a syntax error in the smb. conf configuration file.
$ Testparm
3) share definitions
This setting is specific to the shared directory and only applies to the current shared resources.
In the configuration, use the; and # As the annotator.
The configuration file format is represented by "set project = set value ".
[Homes] set the user's personal home directory
The samba Service provides a main directory for each samba user, which is only valid for the user himself.
Comment = Home Directories description of the shared directory
Browserbale = no whether users are allowed to browse the home directories of all users
Writeable = yes whether to allow writing to your home directory
The preceding three settings are valid for all users and cannot be set for individual users.
Set User shared directory
[Share]
Comment = Samba's share Directory
Read list = tom read-only users
Write list = @ share Writable User Group
Writable = yes or no if all users have the same permissions, you can use this setting
Path =/home/share shared directory
. Service Password File
Samba has two password-related files.
/Etc/samba/smbpasswd
This file does not exist after samba is installed. You can use the smbpasswd file to generate
Smbpasswd-a Linux User Name (the user must already exist on the Linux System)
For example, smbpasswd-a tom
/Etc/samba/smbusers
This file is used to control user ing
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