Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Samba server on network neighborhood?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
abuilder
n00b
n00b


Joined: 01 Aug 2004
Posts: 11

PostPosted: Mon Jul 25, 2005 3:47 pm    Post subject: [Solved] Samba server on network neighborhood? Reply with quote

Hi

From WinXP I can fully access to a Gentoo samba share using "\\10.0.0.254", however I can't access it using "\\athlon64": "Windows cannot find "\\athlon64""

What could be failing in my configuration? Here is my smb.conf

smb.conf

[global]

#identification
workgroup = WORKGROUP
netbios name = ATHLON64
server string = File Server

#security
security = share
encrypt passwords = yes
hosts allow = 127.0.0.1 10.0.0.0/24
hosts deny = 0.0.0.0/0

#netbios
local master = yes
os level = 255
preferred master = yes

[public]
comment = Public
path = /storage/public
browseable = yes
writeable = yes
create mode = 0766
guest ok = yes
force user = abuilder
force group = users


And here is the log:

log.nmbd

[2005/07/25 16:26:28, 0] nmbd/nmbd.c:main(668)
Netbios nameserver version 3.0.10 started.
Copyright Andrew Tridgell and the Samba Team 1994-2004
[2005/07/25 16:26:51, 0] nmbd/nmbd_become_lmb.c:become_local_master_stage2(396)
*****

Samba name server ATHLON64 is now a local master browser for workgroup WORKGROUP on subnet 10.0.0.254

*****


Why doesn't it resolves the hostname? Shouldn't the subnet value be different (10.0.0.254)?

Thanks


Last edited by abuilder on Tue Jul 26, 2005 4:37 pm; edited 1 time in total
Back to top
View user's profile Send private message
Sparrow_CA
n00b
n00b


Joined: 27 Sep 2004
Posts: 31
Location: Alberta, CA

PostPosted: Mon Jul 25, 2005 6:49 pm    Post subject: check your network settings Reply with quote

That subnet does look suspect. What's your network settings look like? (output from running /sbin/ifconfig)

Also, can you ping athlon64 from win?
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Mon Jul 25, 2005 7:11 pm    Post subject: Reply with quote

Can't see that my Samba likes that CIDR style network notation. Consider using 10.0.0. instead, or 10.0.0.0/255.255.255.0

T
Back to top
View user's profile Send private message
darkphader
Veteran
Veteran


Joined: 09 May 2002
Posts: 1225
Location: Motown

PostPosted: Mon Jul 25, 2005 10:17 pm    Post subject: Re: Samba server on network neighborhood? Reply with quote

abuilder wrote:
Why doesn't it resolves the hostname? Shouldn't the subnet value be different (10.0.0.254)?

It needs a name service of some sort to resolve.
You can use a DNS or WINS server (NetBIOS style name server). If you don't run a DNS or WINS server for your internal network than make hosts (static equivalent of DNS) or lmhosts (static equivalent of WINS) entries. For XP stick with DNS or hosts. With Win9x,ME,or NT you may want lmhosts file entries as well.

I wrote a little blurb about this a long, long time ago. Back when Compuserve was big and MS just started shipping Windows with TCP/IP support: http://realcomputerguy.com/networksetup.htm#hosts.

Samba logs the host IP address as the subnet value. This is normal.

Chris
_________________
WYSIWYG - What You See Is What You Grep
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Tue Jul 26, 2005 6:50 am    Post subject: Reply with quote

You don't need hosts or any of that stuff. NMBD handles it. Install Samba, set up config. Ping host - it fails. Start Samba. Ping host - it resolves.
Back to top
View user's profile Send private message
abuilder
n00b
n00b


Joined: 01 Aug 2004
Posts: 11

PostPosted: Tue Jul 26, 2005 10:27 am    Post subject: Reply with quote

Well, changed 10.0.0.254/24 to 10.0.0. , didn't work
Ping to athlon64 from winxp fails

ifconfig:

eth0 Link encap:Ethernet HWaddr 00:11:D8:D8:A9:68
inet addr:10.0.0.254 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::211:d8ff:fed8:a968/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:92 errors:0 dropped:0 overruns:0 frame:0
TX packets:106 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8970 (8.7 Kb) TX bytes:13815 (13.4 Kb)
Interrupt:177 Base address:0x2000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)



I'm not running (to my knowledge) any dns or wins server, I'd prefer not to run any unless absolutely necessary.
For now all pc's on the network have dynamic ip's except athlon64, so to use hosts i'd have to change this. If NMBD handles it, it should be fine right?

Does the dyndns domain I have configured (I'm also planning to have a webserver running) conflicts with any of this?
Samba network identification and domain config should be diferent things? Or am I confusing myself?

Thanks for your reply
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Tue Jul 26, 2005 11:48 am    Post subject: Reply with quote

Hmmm. I'd take localhost out of allow as it's implicitly allowed. Drop the deny completely as it's pointless. Then see what
Code:
testparm
thinks of your config.
Back to top
View user's profile Send private message
abuilder
n00b
n00b


Joined: 01 Aug 2004
Posts: 11

PostPosted: Tue Jul 26, 2005 12:35 pm    Post subject: Reply with quote

Done

testparm:

Load smb config files from /etc/samba/smb.conf
Processing section "[public]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

# Global parameters
[global]
server string = File Server
security = SHARE
os level = 255
preferred master = Yes

[public]
comment = Public
path = /storage/public
force user = abuilder
force group = users
read only = No
create mask = 0766
guest ok = Yes
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Tue Jul 26, 2005 1:25 pm    Post subject: Reply with quote

I'm inclined to say I don't think it's your Samba that is the problem. You could comment out the allow line now as a final check I guess.

Can you ping using the hostname? Mine works only during the time Samba is running.

Do you have anti-virus or firewall on XP machine blocking port 139?

T
Back to top
View user's profile Send private message
darkphader
Veteran
Veteran


Joined: 09 May 2002
Posts: 1225
Location: Motown

PostPosted: Tue Jul 26, 2005 3:03 pm    Post subject: Reply with quote

magic919 wrote:
You don't need hosts or any of that stuff. NMBD handles it.

Not wholly correct.
Whether you need it or not it is desirable to lessen resolution by broadcasting, reducing network traffic and improving performance.
And it may be absolutely needed under some circumstances. Many XP installations ship with NetBIOS over TCP/IP disabled (advanced TCP/IP settings for the network device), in this case no amount of broadcasting will reach nmbd on ports 137/138.

Chris
_________________
WYSIWYG - What You See Is What You Grep
Back to top
View user's profile Send private message
darkphader
Veteran
Veteran


Joined: 09 May 2002
Posts: 1225
Location: Motown

PostPosted: Tue Jul 26, 2005 3:16 pm    Post subject: Reply with quote

abuilder wrote:
I'm not running (to my knowledge) any dns or wins server, I'd prefer not to run any unless absolutely necessary.
For now all pc's on the network have dynamic ip's except athlon64, so to use hosts i'd have to change this.


What's the size of the network? If it's 5 systems or less assigning static IP's and editing hosts files should not be a problem. Especially if you want great network performance. If it's more you should really think about using DNS with a proper DHCP server (with ISC's DHCP server you can reserve IP address based on the NIC's MAC address, so that even though the addresses are dynamically assigned they are always the same, most of the home routers I've seen can not do this).

Chris
_________________
WYSIWYG - What You See Is What You Grep
Back to top
View user's profile Send private message
darkphader
Veteran
Veteran


Joined: 09 May 2002
Posts: 1225
Location: Motown

PostPosted: Tue Jul 26, 2005 3:48 pm    Post subject: Reply with quote

I would highly suggest dumping these lines from your smb.conf:
Code:
os level = 255
preferred master = Yes
so that the default values are used.
_________________
WYSIWYG - What You See Is What You Grep
Back to top
View user's profile Send private message
abuilder
n00b
n00b


Joined: 01 Aug 2004
Posts: 11

PostPosted: Tue Jul 26, 2005 4:35 pm    Post subject: Reply with quote

That was it, all i had to do was to fill in the /etc/hosts.
Also dropped those two lines from smb.conf

The only thing troubling me is that now I can't access a share on a Win PC, but I guess once I get it rebooted it will all be fine.

Thanks everyone
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum