linux install Samba service

 Samba

Samba is implemented on Linux and UNIX systems SMB protocol a free software consists of server and client programs. The SMB (Server Block the Messages, information service block) in a local area network to share files and a printer on the communication protocol provides shared service resource files and printers among different computers within the LAN is. The SMB protocol is a client / server type protocol, clients can access the shared file systems on servers, printers and other resources through the protocol.

1, the installation

# yum install -y samba samba-client

# rpm -qa | grep samba
samba-common-libs-4.9.1-6.el7.x86_64
samba-client-4.9.1-6.el7.x86_64
samba-client-libs-4.9.1-6.el7.x86_64
samba-libs-4.9.1-6.el7.x86_64
samba-4.9.1-6.el7.x86_64
samba-common-4.9.1-6.el7.noarch
samba-common-tools-4.9.1-6.el7.x86_64

2, Configuration

# cat /etc/samba/smb.conf

[, Ltd. Free Join]                                                                            # define a global strategy
Workgroup = SAMBA                                                      # Defining Group
Security = the User                             # security level, there are four

                                                     #share: users do not need samba server account password to login

                #user: the samba server is responsible for checking account and password to provide services (default)

                                                    #server: Work in charge of checking account password by another Windows or samba server

                                                    #domain: Specifies the Windows domain control server to validate the user's account and password

backend = tdbsam passdb                 # user background, there are three

                 #smbpasswd: Use smb tool smbpasswd samba to the system user to set a password, the client will use this password to access the samba resources. smbpasswd in / etc / samba sometimes need to manually create the file.

                #tdbsam: use the database to create user database file. Database file called passdb.tdb, in / etc / samba in. passdb.tdb can use smbpasswd -a user to create samba, samba to create the user must be a system user. Pdbedit can also be used to create a samba account. pdbedit many parameters. Listed several important:

#pdbedit -a username: New User

#pdbedit -x username: Delete User

#pdbedit -L: lists the user list, the database file is read passdb.tdb

#pdbedit -Lv: listed in the user list Details

#pdbedit -c "[D]" -u username: suspend the user account

#pdbedit -c "[]" -u username: restore the user account

                # Ldapsam: LDAP-based account management to authenticate the user. First, to establish the LDAP service setting "passdb backend = ldapsam: ldap: // LDAP Server"

= the CUPS Printing
printcap name = the CUPS
the Load Printers = yes                                      # Samba client does not open any resource within 10 minutes,
                                                                   the # server will shut down automatically answer.
Options = RAW the CUPS                                                        # Print Properties

[Homes]                                                                         # shared the name of
the Comment = Home Directories                                       # comment, share descriptive information
! Valid the Users =% S,% S% D% w
browseable = No                                                          # shared directory can be viewed whether
the Read only = No
the inherit acls = Yes

[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No

[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @printadmin root
force group = @printadmin
create mask = 0664
directory mask = 0775

Guess you like

Origin www.cnblogs.com/zwj-linux/p/11612091.html