LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-09-2016, 04:09 PM   #1
WFV
Member
 
Registered: Apr 2012
Location: somehow, somewhere
Distribution: Arch
Posts: 197

Rep: Reputation: Disabled
Samba server switching from VirtualBox Windows guest to Linux Host


I am trying to make the Linux host pc the main Samba server - I have it set to "preferred" in the samba config file - when I config it for Master it caused problems with sharing Linux & Windows pc's and Android TV's on home network. So now what I get (although I haven't noticed any share problems around the system, so this may be a non issue) it seems there is some tug-of-war going on between a Windows 7 Pro 64bit VirtualBox guest install and the Linux host for Samba master. It usually starts after resuming system from suspend, and occasionally other times seem random. Here is an example from
Code:
% journalctl -b
Jul 09 12:31:34 arch-bill avahi-daemon[669]: Registering new address record for 2002:c0a8:101:0:ca60:ff:fe60:b7ed on enp4s0.*.
Jul 09 12:31:34 arch-bill avahi-daemon[669]: Withdrawing address record for fe80::ca60:ff:fe60:b7ed on enp4s0.
Jul 09 12:32:05 arch-bill nmbd[726]: [2016/07/09 12:32:05.997424,  0] ../source3/nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
Jul 09 12:32:05 arch-bill nmbd[726]:   *****
Jul 09 12:32:05 arch-bill nmbd[726]:   
Jul 09 12:32:05 arch-bill nmbd[726]:   Samba name server ARCH-BILL is now a local master browser for workgroup HOMEGROUP on subnet 192.168.1.110
Jul 09 12:32:05 arch-bill nmbd[726]:   
Jul 09 12:32:05 arch-bill nmbd[726]:   *****
Jul 09 12:32:07 arch-bill nmbd[726]: [2016/07/09 12:32:07.390692,  0] ../source3/nmbd/nmbd_incomingdgrams.c:304(process_local_master_announce)
Jul 09 12:32:07 arch-bill nmbd[726]:   process_local_master_announce: Server VBARCHW7PRO64 at IP 192.168.1.110 is announcing itself as a local master browser for workgroup H
Jul 09 12:32:07 arch-bill nmbd[726]: [2016/07/09 12:32:07.390925,  0] ../source3/nmbd/nmbd_become_lmb.c:150(unbecome_local_master_success)
Jul 09 12:32:07 arch-bill nmbd[726]:   *****
Jul 09 12:32:07 arch-bill nmbd[726]:   
Jul 09 12:32:07 arch-bill nmbd[726]:   Samba name server ARCH-BILL has stopped being a local master browser for workgroup HOMEGROUP on subnet 192.168.1.110
Jul 09 12:32:07 arch-bill nmbd[726]:   
Jul 09 12:32:07 arch-bill nmbd[726]:   *****
Jul 09 12:32:24 arch-bill nmbd[726]: [2016/07/09 12:32:24.409324,  0] ../source3/nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
Jul 09 12:32:24 arch-bill nmbd[726]:   *****
Jul 09 12:32:24 arch-bill nmbd[726]:   
Jul 09 12:32:24 arch-bill nmbd[726]:   Samba name server ARCH-BILL is now a local master browser for workgroup HOMEGROUP on subnet 192.168.1.110
Jul 09 12:32:24 arch-bill nmbd[726]:   
Jul 09 12:32:24 arch-bill nmbd[726]:   *****
Jul 09 12:44:04 arch-bill nmbd[726]: [2016/07/09 12:44:04.822524,  0] ../source3/nmbd/nmbd_incomingdgrams.c:304(process_local_master_announce)
Jul 09 12:44:04 arch-bill nmbd[726]:   process_local_master_announce: Server VBARCHW7PRO64 at IP 192.168.1.110 is announcing itself as a local master browser for workgroup H
Jul 09 12:44:04 arch-bill nmbd[726]: [2016/07/09 12:44:04.822692,  0] ../source3/nmbd/nmbd_become_lmb.c:150(unbecome_local_master_success)
Jul 09 12:44:04 arch-bill nmbd[726]:   *****
Jul 09 12:44:04 arch-bill nmbd[726]:   
Jul 09 12:44:04 arch-bill nmbd[726]:   Samba name server ARCH-BILL has stopped being a local master browser for workgroup HOMEGROUP on subnet 192.168.1.110
Jul 09 12:44:04 arch-bill nmbd[726]:   
Jul 09 12:44:04 arch-bill nmbd[726]:   *****
Jul 09 12:44:21 arch-bill nmbd[726]: [2016/07/09 12:44:21.839442,  0] ../source3/nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
Jul 09 12:44:21 arch-bill nmbd[726]:   *****
Jul 09 12:44:21 arch-bill nmbd[726]:   
Jul 09 12:44:21 arch-bill nmbd[726]:   Samba name server ARCH-BILL is now a local master browser for workgroup HOMEGROUP on subnet 192.168.1.110
Jul 09 12:44:21 arch-bill nmbd[726]:   
Jul 09 12:44:21 arch-bill nmbd[726]:   *****
Jul 09 12:56:06 arch-bill nmbd[726]: [2016/07/09 12:56:06.193811,  0] ../source3/nmbd/nmbd_incomingdgrams.c:304(process_local_master_announce)
Jul 09 12:56:06 arch-bill nmbd[726]:   process_local_master_announce: Server VBARCHW7PRO64 at IP 192.168.1.110 is announcing itself as a local master browser for workgroup H
Jul 09 12:56:06 arch-bill nmbd[726]: [2016/07/09 12:56:06.193945,  0] ../source3/nmbd/nmbd_become_lmb.c:150(unbecome_local_master_success)
Jul 09 12:56:06 arch-bill nmbd[726]:   *****
Jul 09 12:56:06 arch-bill nmbd[726]:   
Jul 09 12:56:06 arch-bill nmbd[726]:   Samba name server ARCH-BILL has stopped being a local master browser for workgroup HOMEGROUP on subnet 192.168.1.110
Jul 09 12:56:06 arch-bill nmbd[726]:   
Jul 09 12:56:06 arch-bill nmbd[726]:   *****
Jul 09 12:56:23 arch-bill nmbd[726]: [2016/07/09 12:56:23.214455,  0] ../source3/nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
Jul 09 12:56:23 arch-bill nmbd[726]:   *****
Jul 09 12:56:23 arch-bill nmbd[726]:   
Jul 09 12:56:23 arch-bill nmbd[726]:   Samba name server ARCH-BILL is now a local master browser for workgroup HOMEGROUP on subnet 192.168.1.110
Jul 09 12:56:23 arch-bill nmbd[726]:   
Jul 09 12:56:23 arch-bill nmbd[726]:   *****
Jul 09 13:08:04 arch-bill nmbd[726]: [2016/07/09 13:08:04.570517,  0] ../source3/nmbd/nmbd_incomingdgrams.c:304(process_local_master_announce)
Jul 09 13:08:04 arch-bill nmbd[726]:   process_local_master_announce: Server VBARCHW7PRO64 at IP 192.168.1.110 is announcing itself as a local master browser for workgroup H
Jul 09 13:08:04 arch-bill nmbd[726]: [2016/07/09 13:08:04.570704,  0] ../source3/nmbd/nmbd_become_lmb.c:150(unbecome_local_master_success)
Jul 09 13:08:04 arch-bill nmbd[726]:   *****
Jul 09 13:08:04 arch-bill nmbd[726]:   
Jul 09 13:08:04 arch-bill nmbd[726]:   Samba name server ARCH-BILL has stopped being a local master browser for workgroup HOMEGROUP on subnet 192.168.1.110
Jul 09 13:08:04 arch-bill nmbd[726]:   
Jul 09 13:08:04 arch-bill nmbd[726]:   *****
Jul 09 13:08:21 arch-bill nmbd[726]: [2016/07/09 13:08:21.588157,  0] ../source3/nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
Jul 09 13:08:21 arch-bill nmbd[726]:   *****
Jul 09 13:08:21 arch-bill nmbd[726]:   
Jul 09 13:08:21 arch-bill nmbd[726]:   Samba name server ARCH-BILL is now a local master browser for workgroup HOMEGROUP on subnet 192.168.1.110
Jul 09 13:08:21 arch-bill nmbd[726]:   
Jul 09 13:08:21 arch-bill nmbd[726]:   *****
Jul 09 13:19:42 arch-bill sudo[23318]:     bill : TTY=pts/4 ; PWD=/home/bill ; USER=root ; COMMAND=/usr/bin/zsh
Jul 09 13:19:42 arch-bill sudo[23318]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jul 09 13:20:01 arch-bill nmbd[726]: [2016/07/09 13:20:01.399790,  0] ../source3/nmbd/nmbd_incomingdgrams.c:304(process_local_master_announce)
Jul 09 13:20:01 arch-bill nmbd[726]:   process_local_master_announce: Server VBARCHW7PRO64 at IP 192.168.1.110 is announcing itself as a local master browser for workgroup H
Jul 09 13:20:01 arch-bill nmbd[726]: [2016/07/09 13:20:01.399927,  0] ../source3/nmbd/nmbd_become_lmb.c:150(unbecome_local_master_success)
Jul 09 13:20:01 arch-bill nmbd[726]:   *****
Jul 09 13:20:01 arch-bill nmbd[726]:   
Jul 09 13:20:01 arch-bill nmbd[726]:   Samba name server ARCH-BILL has stopped being a local master browser for workgroup HOMEGROUP on subnet 192.168.1.110
Jul 09 13:20:01 arch-bill nmbd[726]:   
Jul 09 13:20:01 arch-bill nmbd[726]:   *****
Jul 09 13:20:18 arch-bill nmbd[726]: [2016/07/09 13:20:18.415917,  0] ../source3/nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
Jul 09 13:20:18 arch-bill nmbd[726]:   *****
Jul 09 13:20:18 arch-bill nmbd[726]:   
Jul 09 13:20:18 arch-bill nmbd[726]:   Samba name server ARCH-BILL is now a local master browser for workgroup HOMEGROUP on subnet 192.168.1.110
Jul 09 13:20:18 arch-bill nmbd[726]:   
Jul 09 13:20:18 arch-bill nmbd[726]:   *****
Jul 09 13:20:25 arch-bill sudo[23318]: pam_unix(sudo:session): session closed for user root
Jul 09 13:21:48 arch-bill sudo[23554]:     bill : TTY=pts/4 ; PWD=/home/bill ; USER=root ; COMMAND=list /usr/bin/pacman --color auto -S community/pdfsam
Jul 09 13:21:48 arch-bill sudo[23555]:     bill : TTY=pts/4 ; PWD=/home/bill ; USER=root ; COMMAND=/usr/bin/pacman --color auto -S community/pdfsam
Jul 09 13:21:48 arch-bill sudo[23555]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jul 09 13:22:04 arch-bill sudo[23555]: pam_unix(sudo:session): session closed for user root
Jul 09 13:32:00 arch-bill nmbd[726]: [2016/07/09 13:32:00.247441,  0] ../source3/nmbd/nmbd_incomingdgrams.c:304(process_local_master_announce)
Jul 09 13:32:00 arch-bill nmbd[726]:   process_local_master_announce: Server VBARCHW7PRO64 at IP 192.168.1.110 is announcing itself as a local master browser for workgroup H
Jul 09 13:32:00 arch-bill nmbd[726]: [2016/07/09 13:32:00.247611,  0] ../source3/nmbd/nmbd_become_lmb.c:150(unbecome_local_master_success)
Jul 09 13:32:00 arch-bill nmbd[726]:   *****
Jul 09 13:32:00 arch-bill nmbd[726]:   
Jul 09 13:32:00 arch-bill nmbd[726]:   Samba name server ARCH-BILL has stopped being a local master browser for workgroup HOMEGROUP on subnet 192.168.1.110
Jul 09 13:32:00 arch-bill nmbd[726]:   
Jul 09 13:32:00 arch-bill nmbd[726]:   *****
Jul 09 13:32:17 arch-bill nmbd[726]: [2016/07/09 13:32:17.264351,  0] ../source3/nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
Jul 09 13:32:17 arch-bill nmbd[726]:   *****
Jul 09 13:32:17 arch-bill nmbd[726]:   
Jul 09 13:32:17 arch-bill nmbd[726]:   Samba name server ARCH-BILL is now a local master browser for workgroup HOMEGROUP on subnet 192.168.1.110
Jul 09 13:32:17 arch-bill nmbd[726]:   
Jul 09 13:32:17 arch-bill nmbd[726]:   *****
All of the nmbd stuff shows in red in journalctl.
I think the problem might be in the Windows guest network set up but haven't been able to make that machine only be a member of the "homegroup" and not a master. Or it might be that the two have the same "fixed" IP address? The VBox guest is set to NAT, perhaps I should set it to bridged instead, where I could assign its own IP address?
I should note that the VBox Windows guest shows up in the network on other Windows computers but is never accessible - I want to make it accessible. This is not a VBox guest "Shares" issue, the shares between guest and host work no problem - its the tug-of-war thing and wanting to make the guest accessible on the network outside the host.
Possibly this might be solution but I don't fully understand the information.
Thank you anyone that might be able to help.

Last edited by WFV; 07-09-2016 at 04:38 PM.
 
Old 07-09-2016, 04:35 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,676

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
Browsing elections are normal and part of how netbios works. As you have noticed it does not affect how samba works and when your windows resumes it will broadcast itself on the network so an election takes place. You can change the OS level to something higher so the linux host always wins the election. See the links below.

https://technet.microsoft.com/en-us/.../cc959896.aspx
https://www.samba.org/samba/docs/man...kBrowsing.html

Last edited by michaelk; 07-09-2016 at 04:38 PM.
 
1 members found this post helpful.
Old 07-10-2016, 11:31 AM   #3
WFV
Member
 
Registered: Apr 2012
Location: somehow, somewhere
Distribution: Arch
Posts: 197

Original Poster
Rep: Reputation: Disabled
@ michaelk, thank you for the links. The NMB very helpful in understanding how nmb works. I didn't find how to change the OS level in it - perhaps in the Samba wiki. I've read the Samba documentation over the yrs and continue to do so, some i grasp and some not. Having changed the VBox guest to bridged instead of NAT and then setting its Windows IP to static and re-running the Windows shares wizard makes the guest accessible to other non-vbox machines on home network - perhaps all i really needed to do was run the Windows shares? (thought I did that when first set up the vbox guest 3yrs ago after switching from Mint to Arch...and the problem isn't 3yrs old, it started after upgrading Samba earlier this year but just now getting around to fixing after the master swapping started showing up in the journal). Static Win IP doesn't stop the occasional swapping nmb master, it just shows the new IP address for the VBox guest. Perhaps setting the guest OS level higher solution is in the Windows registry? I have done this and will see how it turns out to stop the VirtualBox Windows guests from becoming Master (setting the registry strings to FALSE or NO).

Last edited by WFV; 07-10-2016 at 03:29 PM.
 
Old 07-10-2016, 10:40 PM   #4
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 769

Rep: Reputation: 242Reputation: 242Reputation: 242
I have two Samba servers here, and their OS level is different so they don't battle. Maybe that's the problem. Look in smb.conf, "[global]" section (here it's /etc/samba/smb.conf - may be distro specific):

The first one (master):
Code:
domain logons = Yes
os level = 40
preferred master = Yes
domain master = Yes
local master = Yes
browse list = Yes
enhanced browsing = Yes
second server:
Code:
os level = 38
domain master = No
local master = No
browse list = Yes
enhanced browsing = Yes
 
1 members found this post helpful.
Old 07-11-2016, 08:46 AM   #5
WFV
Member
 
Registered: Apr 2012
Location: somehow, somewhere
Distribution: Arch
Posts: 197

Original Poster
Rep: Reputation: Disabled
Thank you jayway. I'm only running one samba server here but that is good information for handling multiple samba servers and it helped me notice my "Preferred Master" setting is missing from my global settings in smb.conf. I'll have to go back over past samba troubleshooting notes to find out why I removed it,,,that is probably about the same time this quark started. Otherwise my situation may be solved having edited the Windows registry's of the two VirtualBox guests (XP & W7). I set their "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Browser\Parameters\ "IsDomainMaster" string to FALSE and the "MaintainServerList" string to "No" and so far the conflicts have ceased. I haven't noticed this behavior from other physical Windows computers on the network so far, only the VBox guests. Haven't checked the two Linux guests yet. NOTE: If anyone else is doing this, there is also a "browser" parameter in that same registry on W7 machines, the edits are done in the "Browser" (capital B not lower-case b) key.

Last edited by WFV; 07-11-2016 at 08:54 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Virtualbox USB issues with Linux Host and Windows 7 Guest... Tech7 Linux - Software 1 08-14-2014 08:29 PM
Virtualbox Windows 7 host and Linux guest userme Linux - Security 3 10-07-2012 09:22 PM
Host Fedora14, Windows 7 is running as Virtualbox guest- Mic is not working on Guest mwaheed Linux - Virtualization and Cloud 1 10-20-2011 12:51 PM
Using pre-installed copy of Windows Vista as a Virtualbox guest from Linux host jrtayloriv Linux - Software 6 08-17-2009 09:42 AM
VirtualBox Raw Access, Windows Host, Linux Guest Guitarist88 Linux - Newbie 2 11-14-2008 04:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration