Samba service construction

 Samba service focus:

1. The main program of Samba service

smbd: Provides shared access to files and print resources in the server

nmbd : Provides NetBIOS hostname-based resolution

2. Samba service script

    /etc/init.d/smb

3. Samba configuration file

/etc/samba/smb.conf

Common configuration instructions for configuration files:

  [global]   global configuration

    workgroup: the name of the workgroup (can be customized)

    server string: description of the server

    security: security level (that is, the authentication method for user login), there are the following 4 options

           share ( can be accessed anonymously ) user ( requires account password ) server ( passes authentication to other servers,

After authentication, you can access Samba) domain ( domain environment authentication )

        log file : the location of the log file, the " %m " variable represents the client address

        max log size : The size of a single log file, in KB , if it is 5KB , then after the file capacity is reached,

                    A new file will be created to save the log, and so on;

  [homes] User directory sharing settings

  [printers] Printer Sharing Settings

  [myshare]   Customize the sharing settings ( the name in [] can be customized and can be Chinese)

    comment for some explanatory information about the shared directory

    path The actual path of the shared directory in the server

    Whether public allows everyone to access, equivalent to " guest ok "

    Whether read only is read-only, yes is only,   no is not read-only (that is, writable)

    Whether writable is writable, yes is writable   no is not writable ( choose one with read only and write it)

    browseable: Whether the shared directory is visible in "Network Neighborhood"

4. Samba 's configuration file checking tool

testparm checks that the configuration file is syntactically correct

 

Samba service construction:

Build the environment:

1. Unblocked network

2. Turn off the firewall, or write rules.

3.selinux is closed, or the rules are written.

Build steps:

1. Create a user and share directory:

a. Create a system user:

b. Add the created user share to samba, and set the access password:

c. Create a shared directory

d. Device catalog owner and give access

2. Install the software

2. Edit the configuration file

3. Start the service

 

4. Access Verification

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325234929&siteId=291194637