Use Windows XP to access Shared Files in Linux

Source: Internet
Author: User
Article Title: use Windows XP to access Shared Files in Linux. 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.

To enable users in windows to access Shared Files in Linux over Ethernet, You need to enable the Samba server. The detailed configuration steps of the Samba server are as follows:
 
 1. Open the samba configuration file
 
Vim/etc/samba/smb. conf
 
 2. the following fields exist:
 
[Global] (global parameter setting, which has a great impact on samba functions, is mainly used to set the overall system rules.
 
Workgroup = This is your domain in windows.
 
Server string = This is the explanation of samba in windows.
 
Netbios name = it is best to use your machine name. If you delete the sentence, the default name is your LINUX machine name. However, it is best to enter it by yourself.
 
Dos charset = cp936
 
Unix charset = cp936 can be correctly displayed with these two sentences.
 
Hosts allow allows you to log on to the linux-samba host list, which is provided by IP addresses. Multiple IP addresses are separated by spaces. hosts that are not in the list cannot obtain services provided by samba, this is also an aspect of network security.
 
Printcap name specifies the printcap file address, usually/etc/printcap, which contains the configuration information of the linux printer.
 
The default value of load printers is yes.
 
If the printer used by printing is non-standard, the printer system type should be specified.
 
Log file =/usr/local/samba/var/log. % m
 
Max log size = 0
 
The above two lines are definitions of Samba logs. The recorded file is stored in/var/log/samba/% m. log, the installation directory is different, the log can be different, the next one is to define the size of the log record file, unit is KB, if it is 0, it is not limited to size.
 
The guest acount guest Account indicates which Linux user is used as the target client connection and defines the Samba Default User Account. This account must be in/etc/passwd.
 
Security specifies the security mode. Most users use user-level security mode, and samba uses a local linux Password File for verification.
 
Security = security_level
 
Defines the security level of Samba. The level from low to high is four: share, user, server, and domain. Their verification methods are as follows:
 
Share: no security level. Any user can access resources on the server without a user name or password.
 
User: The default configuration of samba. Users must provide the user name and password for authentication before accessing shared resources.
 
Server: similar to the user security level, but the user name and password are submitted to another server for verification, for example, submitted to an NT server. If the submission fails, it is returned to the user security level.
 
Domain: This security level requires that a Windows primary domain controller exist on the network. samba submits the user name and password to it for verification.
 
The following three security levels require users to have system accounts on their linux machines. Otherwise, it cannot be accessed.
 
The main modification and addition fields are as follows:
 
2.1 list ip addresses of allowed hosts
 
Hosts allow = 192.168.0.1 192.168.0.88
 
2.2 Security Mode
 
Security = share
 
2.4 specify the shared file name and shared file
 
[Glx_linux]
 
Comment = This is Glx Linux # Remarks
 
Path =/mnt/e_win
 
Guest OK = yes
 
Writable = yes
 
2.4 create a Samba user
 
Create user gliet_linux
 
Addusr gliet_linux
 
Passwd gliet_linux
 
Then add the user to samba.
 
/Etc/samba/smbpasswd-a gliet_linux
 
2.5 clear ip links
 
Service iptables stop
 
Clear all links: [OK]
 
Delete a user-defined chain: [OK]
 
Reset the built-in chain to the default "ACCEPT" policy: [OK]
 
2.6 restart the NIC
 
Service network restart
 
Closing interface eth0: [OK]
 
Disable the loop interface: [OK]
 
Set network parameters: [OK]
 
Pop-up loop interface: [OK]
 
Pop-up page eth0: [OK]
 
3. Restart Samba
 
/Etc/rc. d/init. d/smb restart (restart samba)
 
4. Now, log on to win_xp.
 
// 192.168.0.5
 
Enter the username: gliet_linux and password. Then you can see the glx_linux Directory, which can be modified by windows users.
 
Haha, you can operate on linux in windows. The following is a configuration file of mine:

security = user[glx_linux_write_win_share]comment = This is Write testpath = /home/gliet/winguest ok = yeswritable = yes[glx_linux_read_win_tar_share]comment = This is Read testpath = /home/gliet/targuest ok = yesread only = yes


 

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.