Samba quick file sharing

Source: Internet
Author: User
Article title: samba quick file sharing. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Author: wind521
  
With the popularization and popularization of Linux, file sharing in Linux has become the primary concern of users. Actually
Almost all Linux distributions provide a good tool named Samba, which allows you to easily implement file sharing.
.
Samba is an application based on the SMB protocol. The current version is 2.3.x. Samba has powerful functions.
But the ease of use is also very poor. The reason is that its configuration file is too big and hard to understand.
It is discouraged. In fact, only the simple purpose of file sharing is to configure Samba very easily.
Just a few operations. Here is an example to illustrate these operations.
Suppose you are familiar with basic Linux operations, such as the use of the VI editor and basic operation file commands.
Now we have three PCs, one with window2000 installed and named test2000 with shared files.
Folder share; the other two are installed with Linux. one is named testsamba and has a directory/pub; the other is
One is testlinux, and there is also a directory/pub. Our goal is to put testsamba
For test2000 and test_linux.
Perform the following operations on test_samba:
Find smb. conf in/etc/and open it in VI editor,
# Vi/etc/smb. conf or vi/etc/samba/smb. conf
Add the netbios record under the [gobal] field, which is generally added to the next line of the workgroup record
; Netbios name = testsamba
Modify the secrity record in the gobal field;
Secrity = share
Under the public field, modify the path record;
Path =/pub
Under the public field, add the geuest OK record;
Guest OK = yes
Delete the ";" sign at the beginning of each line of the "public" field;
Save and exit.
The added netbios name is a machine that can be seen in test2000 network neighbors.
Name; added/pub is the shared directory that can be seen in the network neighbor; added guest OK is to allow all
All users can access and share with the guest account; delete ";" indicates that the entire [public] field is required to become executable
Line.
Now/pub is the directory that can be shared by test2000 and testlinux machines.
Try:
Under testsamba, you can perform the following operations to use shared folders under test2000:
# Smbclient-L // test2000
This command is used to view the sharing information in test2000. Note that when the system requires a password
Enter test2000, and the shares under test2000 are listed on the screen.
# Smbclient \ test2000 \ share-U share (or smbmount // test2000/share
/Pub)
This command can go to the share directory of test2000, a MS-DOS prompt appears on the screen: the user entered
The share directory is entered. Enter "? "Find the commands you can use.
In test2000, use the shared directory/pub of testsamba to perform the following operations:
Search for the testsamba computer. when the testsamba target appears, double-click the pub icon to enter the shared file.
Folder pub.
In testlinux, use the shared directory pub of testsamba to perform the following operations:
Note that pub exists)
# Smbmount // testsamba/pub
This command can mount pub under testsamba to the pub of the local machine. The same is true when the password is required by the system.
Directly press enter and enter # cd/pub, # ls in sequence. the pub directory of testsamba is listed on the screen.
.
Win2000 and Linux implement file sharing, easy!
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.