- Personal profile: Cloud computing network operation and maintenance professionals, understand operation and maintenance knowledge, master TCP/IP protocol, share network operation and maintenance knowledge and skills every day.
- Motto: The sea does not shy away from water, so it can become big; the mountain does not shy away from stones, so it can grow taller.
Personal homepage: Xiaolihui Technology's homepage
Table of contents
3. The meaning of common shared directory configuration items
Use mount to mount the shared folder
User mapping and access address restrictions
Foreword:
Samba is a software that provides file sharing and printing services, and is interoperable between Linux/Unix and Windows systems. It allows the Linux/Unix system to provide services such as files and printers to the Windows system, and also allows the Windows system to provide corresponding services to the Linux/Unix system. Samba can be used not only for home and office networks, but also for enterprise-level file sharing.
1. Samba Service Basics
SMB protocol Server Message Block, service message block
CIFS protocol Common Internet File System, common Internet file system Samba
project http://www.samba.org
focus:
1.Samba provides services based on SMB or CIFS
(SMB: Service Message Block CIFS: Common Internet File System)
2. The main program of the Samba server: ***
1>smbd: Provides shared access to files and print resources in the server
2>nmbd: Provides resolution based on NetBIOS host names
#Application Layer Protocol Transport Layer Protocol Port #
#smbd TCP 139 and 445
#nmbd UDP 137 and 138 #
Check tool for smb.conf configuration file: testparm
Security level: ***
1>user: user name and password need to be verified by this server
2> server: another server needs to be designated to verify user name and password
3> domain: user name and password need to be verified by Windows domain controller authentication username and password
Samba default file system type: cifs
Word sharing: security security allow allow deny deny
2.Samba program
- The main program of the Samba server
- smbd: Provides shared access to file and print resources on the server
- nmbd: Provides NetBIOS hostname-based resolution
- Samba configuration directory and files
- /etc/samba/
- /etc/samba/smb.conf
- Configuration file checking tool: testparm
3. The meaning of common shared directory configuration items
- comment: Comments and description information on the shared directory
- path: the actual path corresponding to the shared directory in the server
- browseable: Whether the shared directory is visible in "My Network Places"
- guest ok: whether to allow everyone to access, equivalent to "public"
- Writable: whether it is writable, the opposite of the effect of read only
4. Access shared folders
smbclient command, view and log in to use shares smbclient -L 192.168.4.11
smbclient -U sunboy //192.168.4.11/tools
Use mount to mount the shared folder
User mapping and access address restrictions
Shared account mapping (alias)
Enable mapping account
access address restriction
hosts allow configuration item: only allow specific clients
hosts deny configuration item: only deny specific clients