SambaSecurity level
[Global]
Security = <level>
1. Share
A Windows user can access the shared list without authentication.
2. User
For a Windows client, you must enter a user to access the shared name list, and create a user account on the server.
3. Server
The client must enter a valid user for access, but the authentication process is performed on another server. The user account is saved on the authenticated server.
Share: the user is only valid for Windows clients. Linux clients can access the Share Name List at the user level without a password. Security only protects the list of shared names of hosts. Access to directories is determined by directory rules.
# Hostname view Host Name
# Nmblookup my-Server Query Host IP address (related to Samba NetBIOS name)
# Man smb. conf
VI search skills:
/% M enter "/" before entering the string to be searched
/RedHat: Search for the "RedHat" String
Shift + G jump to the end of the file
The default server name is the same as the first part of the machine DNS.
For example, fedora.cyrich.com, the Samba server name is fedora.
Access Control
I. Global Control
[Global]
Hosts deny = all
Hosts allow = 192.168.0.
Ii. Local Access Control
[Docs]
Hosts deny = 192.168.0.
Hosts allow = 192.168.0.1
[RedHat]
Hosts allow = 192.168.0.
Host deny = 192.168.0.1 (invalid)
Priority allowed !!
The format syntax behind hosts. You can use man 5 host. Access to view help
1. Start with .edu.cn
2. End at 192.168.0.
3.192.168.0.0/255.255.255.0
192.168.0.0/24
4. All local unknown DNS cannot be resolved
5. Specify a file at the beginning/
6. hosts allow = 192.168.0.0 255.t 192.168.0.1
Allow access from hosts in the 192.168.0 network segment, except 192.168.0.1
TIPS:
# Tail/etc/samba/smb. conf
Display the last 10 lines of the file
Shift + D delete a row in VI