Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: samba netbios name

  1. #1

    Default samba netbios name

    In my smb.conf file I've got the statement

    Code:
    netbios name = USMCL0SMITH1
    In SUSE 11.1 the samba shares appeared under the above name. In 11.2 I'm using the same smb.conf file, but the shares appear under LINUX-7JRK, which is the computer's hostname. Why is that, and how do I fix it? Thanks!

  2. #2
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: samba netbios name

    That's strange, can you post here the [global] stanza of smb.conf. You can see it with this command:
    Code:
    cat /etc/samba/smb.conf
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  3. #3

    Default Re: samba netbios name

    OK. Well, samba has been pretty flaky. I can no longer reproduce the original question because I can't get samba show up on the network any more. Even on the host computer. Not sure how that happened.

    Firewall is off.

    Here is the smb.conf file. Works perfectly under 11.1, and 11.0 before that. I'm pretty sure it dates back to 10-something.

    Code:
    [global]
    
    ;WINS server
    	netbios name = USMCL0SMITH1
    	security = share
    	encrypt passwords = yes
    	domain logons = no
    	domain master = no
    	local master = yes
    	wins support = yes
    	wins proxy = yes
    	os level = 1
    
    ; Browsing
    	server string = Samba
    	workgroup = WORKGROUP
    	guest account = pcguest
    	public = yes
    	browseable = yes
    	lm announce = yes
    	browse list = yes
    	auto services = yes
    	guest ok = yes
    	preload = yes
    
    [virtualbox]
    	comment = Data Share
    	hosts allow = 192.168.254. localhost 
    	path = /media/fat32/data/
    	read only = no
    	guest ok = yes
    	guest only = yes
    	public = yes
    
    [mailbox]
    	comment = Public Share
    	hosts allow = all
    	path = /media/fat32/public/
    	read only = no
    	guest ok = yes
    	guest only = yes
    	public = yes
    The first share is supposed to be accessible only to my vmware XP machine. I know it says virtualbox - I used to use virtualbox - too lazy to change it. The second is a public share - read/write.

    Any suggestions appreciated.

  4. #4
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: samba netbios name

    You've made the PC into a wins server. But the underlying name resolution mechanism (by which named machines are sought on the lan) is set as the default, which is to not use a wins server, so there's confusion. And if you have a wins server you must code that information into all the other machines, if not there will be even more confusion. [Wins servers are often found in medium enterprise businesses, or small businesses that have been conned into unnecessary expenditure]

    A few questions:
    1. Did you really mean to setup name resolution on the network using a wins server? Or do you want to use the default techniques that you would find in a home or small office network?
    2. And what operating systems are running on your LAN?
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  5. #5

    Default Re: samba netbios name

    You say that like it's a Bad Thing. I can't remember why I originally chose to do it this way - I think it was to allow name resolution across the two subnets (the LAN and the vmware virtual net).

    As I said, this smb.conf has worked well for me in the past. I need it to do two things:

    1. Provide a share point between the host and a virtual XP machine running on the host, and

    2. Provide a share point for other computers on the LAN to exchange files with me.

    As to the environment, that varies. I travel, and I plop my laptop down in whatever office environment I end up being in and hope for the best. Under 11.1, the smb.conf file worked just fine in my office (big-four consulting firm) and at home a computer or two and wireless. In the various offices that I traveled to around the world, I can say that it worked at least part of the time. At this moment, under 11.2 I am currently having trouble getting my laptop to be visible to itself, let alone anyone else. I can see my wife's Vista computer just fine.

  6. #6
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: samba netbios name

    Do you want to bridge subnets still?
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  7. #7

    Default Re: samba netbios name

    Yes, I need to bridge the subnets.

    I fully admit that the smb.conf file lacks elegance. Since it's given me good service, before I go about completely changing it, I would first like to know what has changed in samba in 11.2 that might cause my shares to be un-browsable?

    I can't actually find any real difference in the two versions, which suggests that there may be something else on my system that is blocking samba. Suggestions?

  8. #8

    Default Re: samba netbios name

    OK. I seem to have things working, at least on my home network. I am getting the desired behavior from the following changes to the above smb.conf file:

    Code:
    [global]
    ;WINS server
    	netbios name = USMCL0SMITH1
    	security = share
    	encrypt passwords = yes
    #	domain logons = no
    #	domain master = no
    #	local master = yes
    #	wins support = yes
    #	wins proxy = yes
    	name resolve order = wins lmhosts hosts bcast
    	interfaces eth0 wlan0 lo
            bind interfaces only = yes 
    #	os level = 1
    
    ; Browsing
    	server string = Samba
    	workgroup = WORKGROUP
    	guest account = pcguest
    	public = yes
    	browseable = yes
    	lm announce = yes
    	browse list = yes
    	auto services = yes
    	guest ok = yes
    	preload = yes
    But what's more, I could not get the computer to resolve netbios names without changing /etc/nsswitch.conf. In particular, I needed to make this change:
    Code:
    #hosts:	files mdns4_minimal [NOTFOUND=return] dns wins
    hosts:  files mdns4_minimal [NOTFOUND=return] wins dns
    I will report further if I have trouble/solutions on other networks.

  9. #9
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: samba netbios name

    I'm glad it's working for you.

    I was trying to think of away to advise you but it's difficult against your requirements to cross subnets. Even now, you have "wins" turned off but you instruct it in name resolve order to use wins for name resolution when it should be bcast that comes first, that's likely why you have to up the priority on wins in nsswitch.conf.

    But forget all that, because it's working, and there's a powerful saying in Linux: "if it works, don't fix it".
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  10. #10

    Default Re: samba netbios name

    Yeah, I admit that samba is something that I have always struggled with. Back in the beginning (around SUSE 10.1) I put together a smb.conf file that *should* have worked, but didn't. What followed was an endless stream of "try this" suggestions until I got something that worked. I had to change it every release up until 11.0, and occasionally upgrading samba within a version, because, well, I don't know why - samba just changed. There's a lot of magic involved in getting samba to work.

    Anyway, it is working today, including across subnets, meaning that my vmware XP box can see my wife's vista box, and visa versa. I have no idea why. XD It may not work in the office tomorrow.

    The order of host priorities seems to be standard advise given over in ubuntu land, btw.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •