Acess Windows computers in network by name [Solved]

Issues Related to Networking (Wired and Wireless)

Moderator: Moderators

Acess Windows computers in network by name [Solved]

Postby orange_angel » Sat Jul 03, 2010 19:30

Hello, I have not been using Linux that long and some things fells very easy and clear, while other things do not.

I have been trying to get the file sharing working on our home network. Viewing the files on the Linux machine from the Windows computers is no problem. Viewing the files on the Windows computers from the Linux machine works if the ip-address is used. Viewing the computers connected to the network by using the name of the workgroup works. However, accessing a Windows computer from the Linux machine by using the name of the computer dose not.

I understand that this is a common problem in the Linux world, but I have yet not found any clear answers to how to solve the problem and if it's solvable at all. This would of course not be a problem if all of the computers had fixed ip-addresses, but they don't. So is there anyway to make this happen without static ip-addresses.

If someone can explain how this all works, I will be very grateful.
Last edited by orange_angel on Mon Jul 12, 2010 14:53, edited 1 time in total.
orange_angel
Young Hen
 
Posts: 22
Joined: Tue Jun 29, 2010 16:37

Re: Acess Windows computers in network by name

Postby Fitzcarraldo » Sun Jul 04, 2010 20:02

Do you mean when you are trying to browse a Samba share in Dolphin or Konqueror? If yes, see the following thread which may help you: Re: smb problem after KDE 4.3.2 update: Sabayon 5.0 KDE [Solved]
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7335
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Acess Windows computers in network by name

Postby orange_angel » Mon Jul 05, 2010 6:52

Fitzcarraldo wrote:Do you mean when you are trying to browse a Samba share in Dolphin or Konqueror? If yes, see the following thread which may help you: Re: smb problem after KDE 4.3.2 update: Sabayon 5.0 KDE [Solved]


Yes, that's what I mean. Entering 'smb://windows_computers_ip_adress', works fine. 'Smb://name_of_workgroup' shows all of the computers connected to the network, however 'smb://name_of_windows_computer' only give me this message: Timeout on server. Can this be fixed, if so how?

Fitzcarraldo wrote:If browsing Samba shares works with IP addresses but not with host names then it's probably because WinBind is not running or not configured correctly. I'm on a Windows PC at the moment so cannot investigate, but perhaps someone else can look at it.


Is it WinBind that's the problem, as you suggested in the thread you linked to? If so, how should it be configured?

All I can find on the Internet about setting up a home network with Windows and Linux computers talk about how to make the Linux files visible to the Windows computers, nowhere have I found any good information about making it happen the other way around.

Wouldn't it be easier for everyone to have the router handle the translation between host names and ip addresses...
orange_angel
Young Hen
 
Posts: 22
Joined: Tue Jun 29, 2010 16:37

Re: Acess Windows computers in network by name

Postby Fitzcarraldo » Thu Jul 08, 2010 16:34

No, it's not WinBind.

Did you try the tests given in my post viewtopic.php?f=86&t=18793&start=20#p108133?

Did you also try the test given in my post viewtopic.php?f=86&t=18793&start=20#p108134?

Did you also try the test given in my post viewtopic.php?f=86&t=18793&start=30#p113421?
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7335
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Acess Windows computers in network by name

Postby orange_angel » Mon Jul 12, 2010 13:05

Fitzcarraldo wrote:No, it's not WinBind.


So, what is it then that makes it possible to use the computers names instead of their ip-addresses? Right now I haven't done much more than made sure samba is running, and that is obvious not enough...

Fitzcarraldo wrote:Did you try the tests given in my post viewtopic.php?f=86&t=18793&start=20#p108133?


I can ping if I use the ip-addresses, not the names, nmblookup is the same, except that it for some reason works with one of the names of the other computers.

Fitzcarraldo wrote:Did you also try the test given in my post viewtopic.php?f=86&t=18793&start=20#p108134?


Fitzcarraldo wrote:Did you also try the test given in my post viewtopic.php?f=86&t=18793&start=30#p113421?


We've never had to use usernames and passwords when we had a Windows only network and I have no problem browsing the shared files on the Windows computers when I enter their ip-addresses, and I'd like to keep it that way.
orange_angel
Young Hen
 
Posts: 22
Joined: Tue Jun 29, 2010 16:37

Re: Acess Windows computers in network by name [solved]

Postby orange_angel » Mon Jul 12, 2010 14:56

I got it all to work as I want, all I had to do was to uncomment two lines in smb.conf, name resolve order = wins lmhosts bcast and wins support = yes. I've tried so many things, and then it was so easy.

And to answer my own question, Wins does the translation between computer names and their ip-addresses.
orange_angel
Young Hen
 
Posts: 22
Joined: Tue Jun 29, 2010 16:37

Re: Acess Windows computers in network by name [Solved]

Postby mhzuchini » Sat May 12, 2012 3:48

Hi, fellows.

Sorry to reopen this thread... I'm not even sure if someone will ever read it, but...

I'm not able to resolve NetBios names from computers in my Sabayon box. I'm follow the thread, tried to configure Samba (3.6.5), it starts the winbind daemon:
Code: Select all
 sudo /etc/init.d/samba restart
 * Caching service dependencies ...                                       [ ok ]
 * samba -> stop: smbd ...                                                [ ok ]
 * samba -> stop: nmbd ...                                                [ ok ]
 * samba -> stop: winbind ...                                             [ ok ]
 * samba -> start: smbd ...                                               [ ok ]
 * samba -> start: nmbd ...                                               [ ok ]
 * samba -> start: winbind ...                                            [ ok ]

I am able to query winbind deamon:
Code: Select all
wbinfo -I 192.168.1.100
192.168.1.100   LILOCA-PC

I can mount via Nautilus the share smb://192.168.1.100 and it shows me the share.

But, if I try smb://LILOCA-PC or even a ping:
Code: Select all
ping liloca-pc
ping: unknown host liloca-pc
it just doesn't work...

There is no
orange_angel wrote:name resolve order
in my smb.conf.
The
orange_angel wrote: wins support = yes.
does exist and it is already set.
There was another entry I'd set:
# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The default is NO.
dns proxy = yes
but no lucky! The FORCE didn't come to me :lol:

The same issue arose in my Fedora 16 box, I'd "yumed" the winbind package, set the entries in nsswitch.conf (which is basically hosts: files wins) and it work flawlessly.

Any tips???

Tks,
Marcio
______
Sony Vaio VGN-NW150AJ - 4GB RAM - Sabayon Linux amd64 8 GNOME
Linux 3.1.0-sabayon #1 SMP Sat Dec 31 00:06:24 UTC 2011 x86_64 Intel(R) Core(TM)2 Duo CPU T6500 @ 2.10GHz GenuineIntel GNU/Linux
User avatar
mhzuchini
Simple Hen
 
Posts: 46
Joined: Mon Aug 20, 2007 18:46
Location: Campinas, Brazil

Re: Acess Windows computers in network by name [Solved]

Postby Fitzcarraldo » Sat May 12, 2012 12:03

I don't know if it will be any help, but here are the contents of my smb.conf file for you to compare with yours:

Code: Select all
[global]
netbios name = meshedgedx
message command = /usr/bin/linpopup "%f" "%m" %s; rm %s
printcap name = cups
printing = cups
printer admin = @adm
log file = /var/log/samba3/log.%m
max log size = 50
map to guest = bad user
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/private/smbpasswd
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
name resolve order = wins lmhosts bcast
wins support = yes
dns proxy = no

[homes]
comment = Home Directories
read only = no

[netlogon]
comment = Network Logon Service
path = /var/lib/samba/netlogon
guest ok = yes

[printers]
comment = All Printers
path = /var/spool/samba
guest ok = yes
printable = yes
create mask = 0700
print command = lpr-cups -P %p -o raw %s -r   # using client side printer drivers.

[print$]
path = /var/lib/samba/printers
write list = @adm root
guest ok = yes

[PUBLIC]
path = /home/fitzcarraldo/Public/
guest ok = yes
read only = no

If you have a firewall enabled, have you made sure that you have opened the relevant ports? See the post: How to config ufw/ufw-frontends for Samba browsing/printing.

I don't know if it will be of any use to you, but I used the following 'How To': http://opensuse.swerdna.org/susesimpleshares.html. He tells you how to configure both GNOME and KDE, with lots of pictures to make it easier to understand. Swerdna is an openSUSE user, but the steps are basically the same as for SL, or at least they were when I set up my shares ages ago.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7335
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Acess Windows computers in network by name [Solved]

Postby mhzuchini » Tue May 22, 2012 4:05

Oh, Jesus on the High... I've just FORGOT about the firewall... :shock:
If you have a firewall enabled, have you made sure that you have opened the relevant ports? See the post: How to config ufw/ufw-frontends for Samba browsing/printing.

Shame on me :oops: , Fitzcarraldo... It WAS the Firewall... Opened up UFW -> Edit -> Preferences -> Modules -> check the "NetBIOS name service (for SAMBA)"

Works flawlessly since that:
Code: Select all
ping liloca-pc
PING liloca-pc (192.168.1.100) 56(84) bytes of data.
64 bytes from 192.168.1.100: icmp_req=1 ttl=128 time=2.00 ms
64 bytes from 192.168.1.100: icmp_req=2 ttl=128 time=1.71 ms
64 bytes from 192.168.1.100: icmp_req=3 ttl=128 time=1.59 ms


Thank you (again) for one more lesson to remember!
Marcio
______
Sony Vaio VGN-NW150AJ - 4GB RAM - Sabayon Linux amd64 8 GNOME
Linux 3.1.0-sabayon #1 SMP Sat Dec 31 00:06:24 UTC 2011 x86_64 Intel(R) Core(TM)2 Duo CPU T6500 @ 2.10GHz GenuineIntel GNU/Linux
User avatar
mhzuchini
Simple Hen
 
Posts: 46
Joined: Mon Aug 20, 2007 18:46
Location: Campinas, Brazil


Return to Networking and Wireless

Who is online

Users browsing this forum: No registered users and 1 guest