Installation and configuration of samba in Linux

Source: Internet
Author: User
Install the smaba installer samba-3.0.20b-1.i386.rpm (ISO) 1 mentioned in the samba article first, map the image file of the samba installation file in VMware to the optical drive, steps 1-1-2-3. -12 then, use the command mount/dev/cdrom/mnt/cdrom to set the light...

 

Install samba

The smaba installer mentioned in this articleSamba-3.0.20b-1.i386.rpm (ISO)

1First, map the image file of the samba installation file to the optical drive in VMware, step 1-2-3.

 

-1

2Then, run the mount/dev/cdrom/mnt/cdrom command to load the optical drive to the folder/mnt/cdrom, 1-2.

-2

 

In this case, we recommend that you check whether other samba versions are installed on your computer and run the rqm-qa | grep samba command.

, 1-3 (the figure below indicates that the system does not have samba and you can continue the operation. if there are other versions, you need to uninstall them .)

-3

 

 

3Next, use cd/mnt/cdrom to enter/mnt/cdrom, and run the ls command to view

-4

 

 

In this case, the contents of the current folder are listed. you can run the command to install the folder. we recommend that you transfer the file to the system for installation. The procedure is as follows:

First, use the command cp to move samba to the system/root directory (the directory is set at will), and finally View

1-5

-5

Note: in practice, we should use the command to disconnect the/mnt/cdrom directory from the optical drive,

Here the command is umount/mnt/cdrom

4Next, use the command rpm-ivh samba-3.0.20b-1.i386.rpm to install the samba service. 1-6.

 

-6

5Finally, run the/etc/rc. d/init. d/smb start command to enable the samba service. if the service is enabled successfully, samba is successfully installed.

Configure samba to connect to other hosts

Before configuring, check whether the system network has configured an IP address. Run the ifconfig command to view the information. 2-1 indicates that the configuration is complete. (If not configured, use netconfig to enter the settings .)

-1

 

1Use sambclint-L "computer name"-U "user name" to find the shared directory of the target host, as shown in Figure 2-2 (in the figure, the host name is CD9DE1EF3E4C433. the user name is administrator)

-2

 

2In this way, the connection is successful.

 

 

Configure samba and connect to the samba Server

1Enter the/etc/samba/directory, and backup the smb. conf file to be modified, 3-1

-1

2Run the command vi smb. conf to create a new smb. conf configuration file, and enter the following content,

Figure 3-2

-2

3After editing, run the wq command to save and exit. You can use the testparm command to test whether the configuration file is correct. in case of any problem, you need to reconfigure it. 3-3

-3

4Run the ntsysv command to go to the service list. disable the iptables (firewall) service.

If "*" is added before the smb service, the samba service is enabled upon startup. 3-4

-4

5Use reboot to restart the Linux system.

6Finally, go to the Windows operating system and start-run the input// Sambasvr(Or enter the system IP address.// 192.168.2.27(The IP address varies with the settings !).), 3-5.

-5

7As shown in Figure 3-6,

-6

Samba is successfully configured. you can access the content in the corresponding directory and perform operations on each other. Introduction Complete

From the column of xxuanwan!

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.