Sharing documents between Ubuntu and WinXP in LAN

Source: Internet
Author: User
Article Title: Ubuntu and WinXP sharing documents in the LAN. 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.

Install Samba and Smbfs from the new software package manager. Samba is an application software used to share files and printers in Unix systems. Smbfs is a filesystem which understands the SMB/CIFS protocol. this is the protocol Windows for Workgroups, Windows NT or LAN Manager use to talk to each other. it was contains red by samba, the program by Andrew Tridgell that turns any unix site into a file server for DOS or Windows lients.

Or execute the command line:
# Sudo apt-get install samba
# Sudo apt-get install smbfs

After the installation is complete, choose system> System Management> shared folder from the menu to open the interface shown in:

Add the folder to be shared.

1. XP Anonymous Access to Ubuntu shared files
When samba is used without any settings, the winXP machine can connect to the Ubuntu machine but prompts you to enter the username and password. At this time, no matter what you enter, you cannot access it. To achieve anonymous access, you need to make the following settings:

1) modify the configuration file smb. conf:
Sudo vim/etc/samba/smb. conf
Remove the annotator ";" before the line of security = user, and change the user to share.
2) Restart samba:
# Sudo/etc/init. d/samba restart

2. Use the username and password in WinXP to access the Ubuntu shared file.
Next, let's share the readable and writable folders of the group. Assume that the folder you want to share is/home/ray/share. First, create this folder.
Code:
# Mkdir/home/ray/share
# Chmod 777/home/ray/share

Back up and edit smb. conf to allow network users to access
Code:
Sudo cp/etc/samba/smb. conf/etc/samba/smb. conf_backup
Sudo gedit/etc/samba/smb. conf

Search for this line of text
Code:
; Security = user

Replace the following rows
Code:
Security = user
Username map =/etc/samba/smbusers

Add the following lines of code to the end of the file: newsfan. The shared folder name is Share.
Code:
[Share]
Comment = Shared Folder with username and password
Path =/home/ray/share
Public = yes
Writable = yes
Valid users = newsfan
Create mask = 0700
Directory mask = 0700
Force user = nobody
Force group = nogroup
Available = yes
Browseable = yes

Change the value here by the way. Find [global] and change workgroup = MSHOME
Code:
Workgroup = WORKGROUP
Displays charset = UTF-8
Unix charset = UTF-8
Dos charset = cp936

The following three lines are used to prevent Chinese directory garbled characters. Depending on your local, the UTF-8 may need to be changed to cp936. Do it yourself. Now you need to add the newsfan network access account. If this account does not exist in the system
Code:
Sudo useradd newsfan

Note that the newsfan user is added, but the logon password of the local machine is not granted to the user. Therefore, this user can only be remotely accessed and cannot log on from the local machine. In addition, the samba logon password can be different from the local logon password. Now you want to add a network user account:
Code:
# Sudo smbpasswd-a newsfan
# Sudo gedit/etc/samba/smbusers

Add the following line to the new file and save it.
Code:
Newsfan = "network username"

Use this command to change the newsfan network access password in the future.
Code:
# Sudo smbpasswd-a newsfan

Run the command to delete the account of a network user and change-a to-x.
Code:
# Sudo testparm
# Sudo/etc/init. d/samba restart

[1] [2] Next page

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.