Samba service: MS Windows and linux Server Resource Sharing

Source: Internet
Author: User

Samba service: MS Windows and linux server resource sharing to share resources between Windows hosts and Linux servers, the Linux operating system provides the Samba service, the Samba service builds a bridge between two different operating systems, enabling communication between Linux and Windows systems and providing great convenience for a wide range of Linux enthusiasts. This article briefly introduces how to set up a Samba server and simple configuration on a Linux operating system. 1. By default, the Linux system has installed part of the Samba service package in the default installation. To have a complete understanding of the entire process, uninstall this part first. Query two existing packages and run the command: $ rpm-qa | grep samba samba-client-3.0.33-3.7.el5samba-common-3.0.33-3.7.el5 2. Uninstall Samba and uninstall both packages with rpm-e. For the samba-common-3.0.33-3.7.el5, because there is a dependency between it and other rpm packages, the parameter-f and -- nodeps must be added,-f is mandatory, -- nodeps is not checked dependency, complete command: $ rpm-e samba-common-3.0.33-3.7.el5-f -- nodeps $ rpm-e samba-client-3.0.33-3.7.el5-f -- nodeps 3. Install Samba with the following command: $ rpm-ivh samba-3.0.33-3.29.el5_6.2.i386.rpm-f -- nodeps $ rpm-ivh samba-client-3.0.33-3.29.el5_6.2.i386.rpm-f -- nodeps $ rpm-ivh samba-common-3.0.33-3.29.el5_6.2.i386.rpm-f -- after nodeps installation is complete Run the command $ rpm-qa | grep samba to query and find that all the servers on which the samba server is built have been installed. 4. Configure smb. the Samba configuration file of the conf file is generally stored in the/etc/samba directory. The main configuration file name is smb. conf, which records a large amount of rules and shared information. Therefore, it is a very important core configuration file for the samba service. Most of the main configurations for completing samba Server SETUP are carried out in this file. The working principle of the Samba server is that the client initiates a request to the Samba server to access the shared directory. the Samba server receives the request and queries the smb. conf file to check whether the shared directory exists and the visitor's access permissions. If the visitor has the corresponding permissions, the client is allowed to access it, finally, the system information and user access behavior information collected during access are stored in the log file. Step 1: modify the configuration file. First, back up the samba configuration file $ cd/etc/samba $ mv smb. conf smb. confbak and create a new smb. conf file $ touch smb. conf $ vim smb. conf and then we write this section into smb. [global] workgroup = MYGROUPnetbios name = LinuxSir05server string = Linux Samba Server TestServersecurity = share; display charset = cp936; unix charset = cp936; dos charset = cp936 [ftp] path =/opt/ftpwriteable = yesbrowseable = yes guest OK = yes annotation: [global] This section is a global configuration Is required. There are the following lines: workgroup: The working group displayed in Windows; here I set MYGROUP (in upper case); netbios name: is the computer name displayed in Windows; server string: Is the Samba server description, which can be defined by yourself; this is not important; security: This is the authentication and login method, here we use share; there are many verification methods, which are one of them; the other is commonly used for user verification; If share is used, you don't need to set the user and password. display charset unix charset dos charset: these three are Character Set settings, which may cause garbled characters, comment it out. [ftp] the shared directory is displayed in Windows. path = can be used to set the directory to be shared and whether writeable can be written. Here I set it to writable; whether browseable can be viewed or not; Browsing means that we can see the shared folder under the Working Group. If you do not want to display it, set it to browseable = noguest OK. The anonymous user logs on as a guest user. Step 2: create a directory and authorize the user; $ mkdir-p/opt/ftp $ id nobodyuid = 99 (nobody) gid = 99 (nobody) groups = 99 (nobody) $ chown-R nobody: nobody/opt/ftp Note: For nobody authorization, we first use the id command to view the information of the nobody user and find that the user group is also nobody. We should take this as the standard. In some systems, the nobody user group is not the nobody. Step 3: Start the smbd and nmbd servers; $ smbd-D $ nmbd-D 5. stop the service $ service smbd stop $ service nmbd stop

Related Article

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.