Red Hat linux network courses stickers --16

1.SAMBA file-sharing services

In 1987, Microsoft and Intel jointly developed the SMB (Server Messages Block, Server Message Block) protocol, designed to address sharing resources such as files or printers on the LAN, which also makes sharing files among multiple hosts change more and more simple. By 1991, when she was a college student Tridgwell order to solve the system files between Linux and Windows systems to share problems, we developed a SMBServer service program based on the SMB protocol.

samba service is a file-sharing service, can be very good for file sharing between linux and window, you can also share files between linux and linux.

samba service program called samba, but in Linux, samba service called smb

Install samba service program is very simple:

# yum install samba

Configuration 2.samba service program

Samba service configuration file path is: /etc/samba/smb.conf, there are 320 lines.

And can be removed by screening at #; beginning of the line, and $ ^ remove blank lines, then writes the result of the screening profile

cat /etc/samba/smb.conf.bak | grep -v "#" | grep -v ";" | grep -v "^$" > /etc/samba/smb.conf


[global]
# Global parameters.

workgroup = MyGroup # Workgroup name

server string = Samba Server Version %v # Server provides information,% v parameter to display the version number of SMB

log file = /var/log/samba/log.%m # Define storage location and name of the log file parameter% m for visiting hostname

max log size = 50 # Define the maximum capacity of the log file is 50KB

security = user # Secure authentication mode, a total of four kinds

#share: visiting the host without authentication password; more convenient, but poor security

#user: visitors need to verify the password provided by the host before they can access; improved security

#server: use a separate remote host authentication password provided by visiting the host (centralized management accounts)

#domain: using a domain controller for authentication

passdb backend = tdbsam # Define user types the background, there are three kinds

#smbpasswd: set a password using the smbpasswd command Samba service program for users of the system

#tdbsam: Create a database file and build Samba daemon uses user command pdbedit

#ldapsam: perform account verification service based on LDAP

load printers = yes # Set whether to share the printer device in the Samba service starts

cups options = raw # Printer Options
[homes]
# Shared parameters

comment = Home Directories #Description

browseable = no # Specify the shared information is visible in the "Network Neighborhood"

writable = yes # Define whether the write operation can be performed, and "read only" contrary
[printers]
# Printer sharing parameters

comment = All Printers

path = / var / spool / samba Actual path (important) # shared files.

browseable = no

guest ok = no # Whether visible to everyone, it is equivalent to the "public" parameter.

writable = no

printable = yes


3. Configure shared resources

[database] Share name database
comment = Do not arbitrarily modify the database file Do not warn the user free to modify the database
path = /home/database Shared directory is / home / database
public = no Close "visible to everyone"
writable = yes Allowing a write operation
pdbedit command is used to manage SMB service program account information database, the format is "pdbedit [Options] account." Need to use once the account information is written to the database in the first -a parameter, change your password after performing, you no longer need this parameter when deleting accounts and other operations.
#pdbedit -a -u smbuser
new password:此处输入该账户在Samba服务数据库中的密码
retype new password:再次输入密码进行确认
Unix username: smbuser

使用windows //IP地址可以连接samba服务器了,输入设置的用户名和密码即可

1ac4527c0b621522462e48cf802f84ab_watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl8zNjUyMjA5OQ==,size_16,color_FFFFFF,t_70.png

Guess you like

Origin blog.51cto.com/9481214/2480566