Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
The Situation: Configuring Samba (on FC6) in a 3 station environment. Running XP Pro on the other two boxes. I'm not interested in running Samba in a PDC capacity. I just need simple file and print sharing.
The Setup: XP boxes already configured for printer and file sharing (netbios enabled); disabled windows firewalls (just in case) on both; all stations can ping each other. Here's how Samba is now configured (because I've played with it ad naseum). Added a share directory /home/samba (Writable and Visible checked). Under access I've enabled only the specific user “j.doe.” On the Basic tab under Preferences >> Server Settings, the Workgroup is set to “samba” (yeah catchy I know; both XP boxes are set to the same Workgroup). On the Security tab Authentication Mode = Unix User / Encrypt Passwords = Yes / Guest Account = nobody. Under Preferences >> Samba Users, Unix Username = j.doe / Windows Username = john / Samba Password = the XP password. I enabled Samba as a trusted service on the Firewall.
The Problem: I have received two different errors on the XP stations
1. \\Localhost \samba is not accessible. You might not have permission to use this network resource. Contact the administrator of the server to find out if you have access permissions.
2. \\Localhost \samba is not accessible. You might not have permission to use this network resource. You were not connected because a duplicate name exists on the network. Go to System in control Panel to change the computer name and try again.
Both computer names are different on the XP boxes.
On more than two different occasions I have accessed the Samba directory on each XP box only to have it blue screen as it opened the folder.
Limited accessibility only occurred immediately after changing the permissions via the root GUI. After a little more reading I then forced rights by # chown 777 /home/samba.
I've spent a lot of time reading and trying to figure this out . . . but . . . to no avail. Anyone with any thoughts?
One idea: How did you access the samba share from XP? The "localhost" is puzzling me, seems like the XP boxes don't know where to find the share!? I usually open the Windows Explorer, click on Network, Whole Network, Microsoft Network (AFAIR it's called something like this, I have no Windows access at the moment) and then on the workgoup's name. There your Linux box should be shown. This way I don't have to remember the IP address or modify the HOSTS file on Windows.
titopoquito: Correct. I usually access the Samba share via Windows Explorer >> My Network Places >> Entire Network >> Microsoft Windows Network. At this point I can see the Workgroup created for both the XP boxes and FC6. There I can see the 3 machines. "Localhost" is *nix box.
Kanon: Yes, I made sure the passwords were correct and synchronized.
shorty943: No I don't use smb4k. It's my understanding that this runs on KDE. I'm using GNOME. Maybe I'll load KDE and smb4k. At this point I'm not really sure what else to do. Thanks for the suggestion.
So "Localhost" is really the name of the box, not a mistake? I'm not sure if that is possible. How does Windows resolve this name? I would fear that it cannot distint between "Localhost" and "localhost" which should be the Windows box itself? To be sure about this I would try to ping "Localhost" and see which IP is resolved, if it differs from 127.0.0.1
This is how I connect to my linux box from windows
This has work for me. The first thing is to adjust
the firewalls if any, on linux and windows to allow communications
between them.
Next, edit the /etc/samba/smb.conf file and change the workgroup = MYGROUP to workgroup = YOUR_GROUP_NAME
An example workgroup = STAFF
Save and exit.
Next, add a valid linux user to the smbuser list
As root, type this
smbpasswd -a username
Now you have two accounts - a linux account and a samba
account. You will use the samba account when connecting
from windows to linux via samba.
Next start or restart the samba server.
Now go to your windows box network places and then workgroups. Double-click on the samba server. Enter the username and password you created with the samba account.
I have the same problem mate, if I stop the firewall i can get in from the windows machines, give it a try , type "service iptables stop" and try to access the samba server from xp.
if it works, restart the service , go to the firewall and enable samba.
for the duplicated name error, add this line to the smb.conf file in the global section
netbios name = ANYTHING_BUT_LOCALHOST
I follow some of the above post. I turned off Guarddog and added no users/passwords. Went to the windows server and the Linux bos was listed in the Windows workgroup. Could browse/copy from and to the Windows box. Started smk4b and it saw all of the Windows boxes on the network. Mounted the drives and was albel again browes/copy from the Windows boxes to the Linux.
Some linux distributions use localhost as a default hostname. samba uses hostname by default for the netbios name however localhost in networking is the local loopback network adapter i.e. IP address of 127.0.0.1 on every TCP/IP configured computer. So your actually trying to access shares on the client instead of the server. The simplest solution is to add an option in the global section of your smb.conf file like
netbios name = MyComputerName (Change MyComputerName accordingly)
Be sure to restart samba. You should see MyComputerName in network places. Might have to select view network computers and also make sure the workgroup name is the same for all computers. Another way of lookin at shares on the linux via the command box
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.