Study Notes for Linux practice engineers 9

Source: Internet
Author: User

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

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.