ArchLinux Configuring the Samba service to share files with Windows

Source: Internet
Author: User

As a result of the recent overtime, my HD downloader, has accumulated 200g+ HD movie, hey, it seems that the usual bandwidth is not wasted, make full use of. Before that, because I was lazy to configure samba, I was lazy, using SFTP to log in to the download machine via my Linux account, and then put the movie you want to see, one in the way of SFTP, to my computer, and then enjoy it. In fact, this is very inefficient, but also a waste of hard disk, but also a waste of time.

Linux's Samba provides a great way to share files between Linux and Linux, as well as between Linux and Windows. Weekend, and took a little time to configure Samba. In this way, you can directly on my computer, through the sharing directory, to access high-definition movies in HD downloader, but also can play directly, more convenient ...

Let's record the process of configuring Samba in ArchLinux and leave it as a backup.

First, install Samba,archlinux to get and install samba directly from the source:

pacman -S samba

Wait a few seconds, after the installation succeeds, you will find a directory called Samba in/etc, enter this directory, there is a default configuration file sample, called Smb.conf.default. This is the official template configuration file with detailed comments and explanations for each configuration item. However, this file is very long, it is recommended that you have time, you can look at the meaning of each parameter in detail. I am not tired here, or to a concise point of configuration it:

In the/etc/samba directory, create an empty smb.conf directly, and then paste the following into the past:

[global]workgroup = WORKGROUPsecurity = user[Movies]path = /home/transmission/Downloadsvalid users = sambapublic = nowritable = yesprintable = nocreate mask = 0644

This is simple enough, isn't it? For a brief explanation, the global configuration section, which is an overall configuration section, is configured with two items:

Workgroup, as the name implies, computer workgroup names, such as I am and my Win7 to share files, it is best to set up the workgroup and my Win7 to a workgroup, so convenient Win7 through the network discovery to find my download machine. Here, my Win7 workgroup name, it's called: Workgroup.

Security, which refers to the secure authentication form of the shared directory, the value of the safety, there are two types can be set:

The first is to set the user in the example above, meaning that when accessing the shared directory, the user name and password are required to authenticate, which can provide some security protection for the shared directory.

The second is to set up share so that anyone on the network can access your shared content in a shared directory.

Here, I chose the username and password authentication method, so set up the user

Below the movies node, you can have multiple (if you want to set up multiple shared directories)

[Movies] The name set here is the name that can be seen in Windows and can be changed arbitrarily

The following path is the Linux directory you want to share, and I've set it up as the download directory for my transmission.

The following valid users, is a user account, that is, through the user name and password to access the shared directory of the account, if you set security to share, this one can be removed.

Here are the settings for some permissions, and whether or not to allow visitors to write to the shared directory, each parameter can view the samba documentation, not described.

Finally, let's talk about the setup of the account after security is set to user.

First, you can add a new Linux account that is dedicated to accessing the shared directory. For example, I've added an account called Samba.

Then is to set the password to access the shared directory for the account, it is important to note that the password is not set by the Linux command passwd. The password here refers to the samba password, not the Linux password.

Therefore, you have to use the command pdbedit-a-u (username) to modify the samba password.

Once set up, you can start Samba service, and if you need to boot samba automatically, remember to add Samba to/etc/rc.conf.

The last step, direct access to the WIN7 network, if your settings are not a problem, you can succeed at once ... The HD Downloader with Samba service enabled can be discovered by Win7 instantly:

Double-click Enter, you need to enter Samba username and password verification, and finally, high-definition movies appear in front of:

Double-click the movie and you can play it online through your home network ... Finish the call and watch the movie!

Https://xiaozhou.net/share_movie_between_archlinux_and_win7_via_samba-2012-04-20.html

ArchLinux Configuring the Samba service to share files with Windows

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.