Tips for Samba/Windows conflict Author: anonymous name
Source: Internet
Author: User
Many problems can cause Samba to fail to establish a two-way network connection correctly between the Linux system. You can learn how to solve two common problems to avoid spending too much time dealing with specific problems: Password conflicts and host gotcha.
This article assumes that you have correctly installed Samba and configured the smb. conf file. You can see the Linux System in the Windows Network Neighbor dialog box,
However, you can only view your Linux Network neighbors (such as linneighborhood or smbclient) in Linux.
. What is the problem? There are two possible causes.
Solve Samba problems caused by Windows passwords
When using Windows sharing to handle Samba network conflicts, the Windows Password should appear in your list for the first time. Check these two potential Windows Password problems:
Windows networks must use the same user name in both systems. If you log on with "Mike", unless windows also creates a directory named "Mike" and the directory must be online, you will not be able to connect to Windows.
If Windows PC is running a newer version of Windows (install WIN98 and Service Pack 2, or an updated version, including windows
2000), you need to stop password encryption in windows. In the Samba file directory (in the red
In the HAT system, the Samba file directory is located in/usr/share/Doc.
Key. In Windows, click Start, select Run, type regedit, and click OK. When the Registry Editor is opened, find the correct location and
To change the default value.
If the above method does not resolve your samba conflict, the possible cause is that you have encountered a famous host gotcha problem.
.
You may have listed the names of all computers in the network in the/etc/hosts file. If all connections fail, the file will provide the required IP address. In addition
Certificate. Samba will check this file. In fact, Samba checks the gethostbyname () function. But in some versions, especially red
Hat, this function only returns the current host name, not the content of the/etc/hosts file.
To view other computers in the network, you need to edit the samba configuration file and change the default host lmhost broadcast win in the order of name arrangement to lmhost broadcast win, so that you can change gethostbyname () the Return Value of the function.
After necessary modifications are made to the samba configuration file, follow these steps: Open the superuser dialog in a terminal window. Type Su, click [enter], and enter your Superuser password.
Open a text editor and open the/etc/smb. conf file. Note: In some systems, this file is located in/etc/samba/smb. conf. Search for the following text
Start with: # All NetBIOS names must be resolved to IP addresses. Delete "; Name
Resolve order
=... "The semicolon in this line. Delete the word "host" in the same row ". Make sure this line includes "LmHosts ". Save/etc/smb. conf (or, if the file is located in
/Etc/samba directory, save the file as/etc/samba/smb. conf ). Open the file named LmHosts in the same directory. If this file does not exist, create
New text files. In The LmHosts file, carefully type the IP address, domain name, And alias of each computer in the network. Here is an example: 127.0.0.1
Localhost. localdomain localhost 192.168.1.44
Lothlorien.middle-earth.org Lothlorien 192.168.1.45
Bag-end.middle-earth.org bag-end 192.168.1.46 moria.middle-earth.org
Moria 192.168.1.47 mordor.middle-earth.org Mordor
Save LmHosts to a directory containing smb. conf. Exit the text editor. In the terminal window, maintain the superuser mode. Type/etc/rc. d/init. d/SMB
Restart, and then press [enter].
Note: The script named SMB may be in different directories in some systems. Now try again to access the network.
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