Installation and configuration of Ubuntu 16.04 file server--samba

Source: Internet
Author: User

Reference: http://one.ifof1.cn/
Samba is a free software for SMB (Server Messages block, Information Service blocks) protocol implemented on Linux systems. It implements the sharing of files and printers within the LAN and is a client/server type protocol. The client accesses the shared file system on the server through the SMB protocol.

Installation steps:

           1, first synchronize the index of the source, to ensure that the latest software packages are obtained.           Execute sudo apt-get update; 2. Install Samba and Samba-common sudo apt-get install samba Samba-common 3, create a shared directory, this directory is/home/samba directory.                      First go to the/home directory and create a samba directory to create the Samba directory: sudo mkdir/home/samba 4, change user permissions to the directory, set to everyone readable writable executable Assign permissions to a shared directory: sudo chmod 777/home/samba 5, change the Samba file configuration on Ubuntu, which is a smb.conf file in the/etc/samba directory, which records            A large number of rules and shared information is a very central configuration file for Samba. 6, add the following, first in [Global] add security 7, followed by the smb.conf file at the end of adding the following configuration information and Save: 8, set the window System login shared folder username and password, where the user name must be Ubu The user in the NTU.             In this example, using user Zhanglei, you need to enter the password two times in the process.             9. Restart the SMB service. 10. View the IP address of the virtual machine where the Samba service is installed, under Windows, to access the shared folder through that IP address. 11. Enter the IP address of the virtual machine in the Start menu or the file address bar, as shown, to see the MyShare directory shared by the virtual machine: The Samba server works by requesting the client to access the shared directory to the Samba server. The Samba server accepts the request and queries the smb.conf (/etc/samba/smb.conf) file to see if the shared directory exists and the permissions of the visitor. If the visitor has the appropriate permissions, the client is allowed access, and the information about the system during the access process and the collected user behavior are placed in the log file (/var/log/samba). The following is a general description of each file directory in the Samba directory: LMHOSTS directory: The main purpose of this file is to correspond to NetBIOS Name with the host name of the IP, in fact a bit like the/etc/hosts function! Only the hostname of this LMHOSTS corresponds to NetBIOS name Oh! Don't get confused with/etc/hosts! Since Samba is now more powerful, it is usually possible to get the NetBIOS name of the relevant computer on the LAN as soon as the samba is started, so this file is usually not set. smb.conf file: As already described above, is the core configuration file of Samba. This includes the global configuration [global] and the shared directory [MyShare] that you can add yourself to display under Windows. SMBPASSWD: This file preset does not exist. It is a table of user password corresponding to Samba presets. The user's password preset is placed here when the Samba server is more stringent and requires the user to enter the account and password to log in. Because the file contains the user's password, the owner of the file needs to be root, and the permission is set to 600.

Installation and configuration of Ubuntu 16.04 file server--samba

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.