Vista - Mint Network Issue

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
altair4
Level 20
Level 20
Posts: 11426
Joined: Tue Feb 03, 2009 10:27 am

Re: Vista - Mint Network Issue

Post by altair4 »

My workgroup name ( which btw is one of 4 on my network ) is not in capitals and I don't have the netbios name specified in smb.conf but if it works for you then who am I to argue.


EDIT: Forget the following recommendation. I remembered I still have a machine here with Mint10 on it and it appears there is essentially this fix already in place labeled "samba" which forces nmbd to start after the network is up.

As for nmbd needing to be restarted after a reboot you might try this:

Create a script:

Code: Select all

gksu gedit /etc/network/if-up.d/nmbd
With this content:

Code: Select all

#!/bin/sh
service nmbd start
Save the file and make it executable:

Code: Select all

sudo chmod +x /etc/network/if-up.d/nmbd
Any script placed in if-up.d will run only after the network is up.
Last edited by altair4 on Thu Jan 05, 2012 12:48 pm, edited 1 time in total.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
llogg

Re: Vista - Mint Network Issue

Post by llogg »

Thanks, I'll give that a try when I get home.

Here's where I got the idea about capitalization in the smb.conf:
http://community.linuxmint.com/tutorial/view/672

It's possible they meant only the first letter needed to be capitalized, as mine were in all lower case. Are yours capitalized at all?

I've had it working before only to have it stop unexpectedly, so this may simply be coincidence that I changed the name to capitals and it worked. We'll see.
altair4
Level 20
Level 20
Posts: 11426
Joined: Tue Feb 03, 2009 10:27 am

Re: Vista - Mint Network Issue

Post by altair4 »

I don't have any letters capitalized in workgroup anywhere on my network. In fact the default smb.conf that comes from the Samba Factory does not have workgroup in caps. Your post was the first time I ever head if it - but I don't get out much :wink:
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
westcoastsunset

Re: Vista - Mint Network Issue

Post by westcoastsunset »

Just thought I'd chime in. We have a laptop running vista enterprise that refused to see any linux machines running samba (ver 3-5-8). After changing the browser election section so that linux is never a master browser, I could see both linux machines in vista's network neighborhood. Here is a snippet from my smb.conf. I also set a netbios name on the linux boxes, but since windows laptop is vista, I don't think netbios is in use (not sure about that, the vista machine is not mine)

Code: Select all

[global]
    os level = 2
    preferred master = No
    local master = No
    domain master = No
Still having trouble authenticating from the vista laptop to either linux box, but that is for another thread.
Poisoned Dragon

Re: Vista - Mint Network Issue

Post by Poisoned Dragon »

Through some experimenting, I learned that netbios is still very relevant to networking windows vista/7 puters. When you disable netbios over tcp/ip, on a windows pc, you can't see other windows puters on the network. As for your unique example, I never had to fiddle with those entries on my smb.conf. Having said that, I've never fiddled with a version of Vista/7 higher than home premium. I bypass authentication to a linux share by using this argument in smb.conf:

Code: Select all

security = share
Probably defeatist if you're demanding more secure solutions, but it's a fast, and easy, short term measure. My problem has always been authenticating into a Vista/7 share from a linux pc. Especially if the windows pc has no login password. That gets messy.
altair4
Level 20
Level 20
Posts: 11426
Joined: Tue Feb 03, 2009 10:27 am

Re: Vista - Mint Network Issue

Post by altair4 »

Poisoned Dragon wrote:I bypass authentication to a linux share by using this argument in smb.conf:

Code: Select all

security = share
You know, share level security has been deprecated. It's been deprecated for about 5 years now however so I don't know when it will be but sooner or later it will be officially removed as an option. The developer in charge of this thing is getting more demonstrative is his objections to having it used:
Jeremy Allison
Mon, 29 Mar 2010 12:54:26 -0700

Well you can replace security = share with the correct "map to guest"
options, so it really isn't useful in the way you think. Having said
that we haven't (yet) removed it, and I just refactored the code
that implements it, so it'll probably be around causing us trouble
for a while yet :-).
Jeremy Allison
Thu, 06 Oct 2011 12:03:27 -0700
"security = share" is
deprecated, please don't use it.

There's nothing that it does that can't be done
with normal user-level security.
In any event if everything else is working as designed the default settings in smb.conf ( for the non debian based Mint ) should handle this:
"security = user" + "map to guest = Bad User" = "security = share"

In Debian based mint there is no override for "map to guest" in smb.conf so the system defaults to "map to guest = Never" which just about eliminates any guest access for anonymous Windows clients. Windows made a design decision for reasons unknown that insists on transmitting the client users actual local login user name and password when it browses for shares. If that user has a corresponding samba username and password on the Linux server then he is authenticated even before attempting to access any specific share but if he does not then he is mapped to the guest account in normal Mint ( because he is a "Bad User" ) but rejected outright in Debian based Mint ( because of "Never" ) unless you add back the "Bad User" reference.

Now that I've ranted on though I too have no experience with Vista Enterprise but I'm beginning to think that there something different about it. If you look at his other post ( http://forums.linuxmint.com/viewtopic.php?f=157&t=93542 ) there's no problem is accessing his shares with WinXP - it's only Vista Enterprise. Maybe setting "security = share" will work ......
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
llogg

Re: Vista - Mint Network Issue

Post by llogg »

altair4 wrote:
To display your current hostname type this in the terminal.

Code: Select all

hostname
It will display your current host name, If it doesn't match the netbios string you set in smb.conf, that's the root of your problem.
By default the netbios string isn't in smb.conf. But it is in the default samba settings:

Code: Select all

testparm -sv /dev/null | grep "netbios name"
It may be the wrong length which would force you to do one of two things:

* Change the hostname the way you described. This will automatically change the default "netbios name" parameter in samba ( after a reboot ) so there is no need to add it to smb.conf.

* Or leave the hostname as it is and simply add "netbios name = ..." to smb.conf with the correct length, restart samba, and run the following command to verify that it has changed:

Code: Select all

testparm -sv | grep "netbios name"
Or even a:

Code: Select all

testparm -s | grep "netbios name"
Or better yet run the following samba client command to see if it picks up the new name:

Code: Select all

smbtree
Both a samba client and a Windows machine should see the samba server with this new name.

This comment is simply not true:
It's not enough to change the netbios string in smb.conf. You have to change your hostname.
In a typical home network there is no lan side dns and the only way to communicate is with the "netbios name" which Windows will recognize and can still use.
Okay, I'm back after updating to Mint 14 Cinnamon. I again have the issue where a Vista box can see the Mint box but calls it "unknown device". Mint sees the Vista box and browses shared folders/files without a problem. Shared printer connected to the Vista box prints from Mint just fine. But the Vista box can't access anything on the Mint box (which happens to include my music/video library). I edited the smb.conf by adding a netbios name line in the global section that specifies a name <15 characters and restarted smbd. I also added a line in global section of force user = my username. I have also run

Code: Select all

sudo smbpasswd -a ShareOwnerUserName
When I run

Code: Select all

testparm -s | grep "netbios name"
I get

Code: Select all

Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE
	netbios name = MATT-LINUX
And

Code: Select all

testparm -sv | grep "netbios name"
returns

Code: Select all

Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE
	netbios name = MATT-LINUX
But running

Code: Select all

smbtree
gives me

Code: Select all

WORKGROUP
	\\MSTAR-PC       		
		\\MSTAR-PC\Users          	
		\\MSTAR-PC\Public         	
		\\MSTAR-PC\print$         	Printer Drivers
		\\MSTAR-PC\Mstar          	
		\\MSTAR-PC\IPC$           	Remote IPC
		\\MSTAR-PC\D$             	Default share
		\\MSTAR-PC\C$             	Default share
		\\MSTAR-PC\Brother HL-5370DW series	Brother HL-5370DW series
		\\MSTAR-PC\ADMIN$         	Remote Admin
	\\MATT-LENOVO-XXXX		matt-LENOVO-XXXX server (Samba, LinuxMint)
		\\MATT-LENOVO-XXXX\My Music       	
		\\MATT-LENOVO-XXXX\Brother-HL-5370DW	Brother HL-5370DW
		\\MATT-LENOVO-XXXX\IPC$           	IPC Service (matt-LENOVO-XXXX server (Samba, LinuxMint))
		\\MATT-LENOVO-XXXX\print$         	Printer Drivers
I don't see anywhere that has the new netbios name in the smbtree output. Should I just edit the hostname?
altair4
Level 20
Level 20
Posts: 11426
Joined: Tue Feb 03, 2009 10:27 am

Re: Vista - Mint Network Issue

Post by altair4 »

Looks to me that you forgot to restart samba or did not restart it in the right order:

Code: Select all

sudo service smbd restart

Code: Select all

sudo service nmbd restart
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
llogg

Re: Vista - Mint Network Issue

Post by llogg »

Fantastic, thanks. I had restarted smbd but not nmbd. Works a charm now.
Locked

Return to “Networking”