[solved] Yet another samba problem

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
User avatar
pfd27
Level 2
Level 2
Posts: 68
Joined: Sun Feb 15, 2015 11:13 am

[solved] Yet another samba problem

Postby pfd27 » Tue Feb 14, 2017 9:28 pm

Hi Guys

A weird problem with samba just showed up for me. I have 3 computers. One running Ubuntu Server and 2 running Mint 18.1
Tonight my laptop decided to stop showing the other computers in my workgroup. Browse network in caja shows the workgroup
but only the laptop. No other compters show up. If I run in a terminal caja smb://192.168.1.6X I can view all the shares on both computers.
I have created bookmarks for both computers as a workaround.
What could cause it to stop seeing the workgroup computers?

Testparm shows no problems
and as you can see smbtree shows only the laptop.

Code: Select all

rob@lenny ~ $ smbtree
Enter rob's password:
WORKGROUP
   \\LENNY                Rob's Laptop
      \\LENNY\IPC$              IPC Service (Rob's Laptop)
      \\LENNY\Downloads         Lenny's Download Folder Share
Last edited by pfd27 on Fri Feb 17, 2017 9:47 pm, edited 1 time in total.

altair4
Level 18
Level 18
Posts: 8344
Joined: Tue Feb 03, 2009 10:27 am

Re: Yet another samba problem

Postby altair4 » Wed Feb 15, 2017 7:29 am

Since all three computers run Linux you actually have a choice.

** You can replace the Windows-centric way of discovering hosts with a native Linux way of doing it: Samba Browsing in an all Linux or Linux/OSX network
That HowTo will show you how you can create one file which tells all other Linux or MacOS machines that you exist. You would add that same file to all your Linux machines.

** Or you can continue with the current NetBios method you are using now. That will require some work to determine the cause:

-- First go through the checklist: Samba Browsing Problems Checklist
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

User avatar
pfd27
Level 2
Level 2
Posts: 68
Joined: Sun Feb 15, 2015 11:13 am

Re: Yet another samba problem

Postby pfd27 » Wed Feb 15, 2017 9:37 pm

I do have a couple windows machines that sometimes need to connect occasionally.

I have setup mint 18.1 in virtualbox with the same smb.conf and separate file containing my shares from the machine with the issue
to do some testing. Everything works fine, so I'm assuming smb.conf is ok. Also went through the link you sent and didn't see any problems
that I noticed.

I tried from both windows machines and it works fine and can see all shares on the server. Problem is with a mint 18.1 laptop that was working
fine and no tweaking had been done before it quit

altair4
Level 18
Level 18
Posts: 8344
Joined: Tue Feb 03, 2009 10:27 am

Re: Yet another samba problem

Postby altair4 » Thu Feb 16, 2017 7:35 am

Then post the output of these commands from the Mint 18.1 laptop:

Code: Select all

testparm -s

Code: Select all

net usershare info --long


Note: If you are doing anything weird like using the "include" option I will need to see the contents of that file as well.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

User avatar
pfd27
Level 2
Level 2
Posts: 68
Joined: Sun Feb 15, 2015 11:13 am

Re: Yet another samba problem

Postby pfd27 » Thu Feb 16, 2017 5:51 pm

smb.conf

Code: Select all

[global]
server string = Rob's Laptop
workgroup = WORKGROUP
netbios name = lenny
security = user
encrypt passwords = yes
guest account = nobody
name resolve order = bcast host wins
include = /etc/samba/smbshared.conf

testparm -s

Code: Select all

rob@lenny /etc/samba $ testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[Downloads]"
Loaded services file OK.
Server role: ROLE_STANDALONE

# Global parameters
[global]
   server string = Rob's Laptop
   security = USER
   name resolve order = bcast host wins
   idmap config * : backend = tdb
   include = /etc/samba/smbshared.conf


[Downloads]
   comment = Lenny's Download Folder Share
   path = /home/rob/Downloads
   valid users = rob
   read only = No


net usershare info --long doesn't give any output

smbshared.conf

Code: Select all

[Downloads]
        comment = Lenny's Download Folder Share
        path = /home/rob/Downloads
        browsable = yes
        guest ok = yes
        read only = no
        available = yes
        public = no
        writable = yes
        valid users = rob

altair4
Level 18
Level 18
Posts: 8344
Joined: Tue Feb 03, 2009 10:27 am

Re: Yet another samba problem

Postby altair4 » Thu Feb 16, 2017 6:47 pm

This would indicate that the problem is name resolution since samba itself seems to be working:
If I run in a terminal caja smb://192.168.1.6X I can view all the shares on both computers.

Regrettably there is nothing that I can see concerning the client side of things in your smb.conf that would account for it.

If you've already accounted for the usual suspects ( firewalls, subnetting, etc..) I'm not sure where we go from here.

You could run smbtree in diagnostic mode to see if it tells you something:

Code: Select all

smbtree -d3

I'm a little out of practice with this since I've converted from netbios to mDNS on all my networks but maybe it's something obvious.

Of course if all these machines had static ip addresses then the problem would go away ....
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

User avatar
pfd27
Level 2
Level 2
Posts: 68
Joined: Sun Feb 15, 2015 11:13 am

Re: Yet another samba problem

Postby pfd27 » Thu Feb 16, 2017 7:45 pm

All the linux machines are running static ip's
I see there's a permssion denied error in there?


Code: Select all

rob@lenny ~ $ smbtree -d3
lp_load_ex: refreshing parameters
Initialising global parameters
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[global]"
added interface wlp1s0 ip=192.168.1.59 bcast=192.168.1.59 netmask=255.255.255.255
Enter rob's password:
tdb(/var/cache/samba/gencache.tdb): tdb_open_ex: could not open file /var/cache/samba/gencache.tdb: Permission denied
name_resolve_bcast: Attempting broadcast lookup for name WORKGROUP<0x1d>
Got a positive name query response from 192.168.1.59 ( 192.168.1.59 )
Connecting to 192.168.1.59 at port 445
Doing spnego session setup (blob length=74)
got OID=1.3.6.1.4.1.311.2.2.10
got principal=not_defined_in_RFC4178@please_ignore
GENSEC backend 'gssapi_spnego' registered
GENSEC backend 'gssapi_krb5' registered
GENSEC backend 'gssapi_krb5_sasl' registered
GENSEC backend 'spnego' registered
GENSEC backend 'schannel' registered
GENSEC backend 'naclrpc_as_system' registered
GENSEC backend 'sasl-EXTERNAL' registered
GENSEC backend 'ntlmssp' registered
GENSEC backend 'ntlmssp_resume_ccache' registered
GENSEC backend 'http_basic' registered
GENSEC backend 'http_ntlm' registered
GENSEC backend 'krb5' registered
GENSEC backend 'fake_gssapi_krb5' registered
Got challenge flags:
Got NTLMSSP neg_flags=0x628a8215
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x62088215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x62088215
SPNEGO login failed: Logon failure
Doing spnego session setup (blob length=74)
got OID=1.3.6.1.4.1.311.2.2.10
got principal=not_defined_in_RFC4178@please_ignore
Got challenge flags:
Got NTLMSSP neg_flags=0x628a8215
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x62008a15
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x62008a15
WORKGROUP
name_resolve_bcast: Attempting broadcast lookup for name WORKGROUP<0x1d>
Got a positive name query response from 192.168.1.59 ( 192.168.1.59 )
Connecting to 192.168.1.59 at port 445
Doing spnego session setup (blob length=74)
got OID=1.3.6.1.4.1.311.2.2.10
got principal=not_defined_in_RFC4178@please_ignore
Got challenge flags:
Got NTLMSSP neg_flags=0x628a8215
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x62088215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x62088215
SPNEGO login failed: Logon failure
Doing spnego session setup (blob length=74)
got OID=1.3.6.1.4.1.311.2.2.10
got principal=not_defined_in_RFC4178@please_ignore
Got challenge flags:
Got NTLMSSP neg_flags=0x628a8215
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x62008a15
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x62008a15
   \\LENNY                Rob's Laptop
name_resolve_bcast: Attempting broadcast lookup for name LENNY<0x20>
Got a positive name query response from 192.168.1.59 ( 192.168.1.59 )
Connecting to 192.168.1.59 at port 445
Doing spnego session setup (blob length=74)
got OID=1.3.6.1.4.1.311.2.2.10
got principal=not_defined_in_RFC4178@please_ignore
Got challenge flags:
Got NTLMSSP neg_flags=0x628a8215
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x62088215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x62088215
SPNEGO login failed: Logon failure
Doing spnego session setup (blob length=74)
got OID=1.3.6.1.4.1.311.2.2.10
got principal=not_defined_in_RFC4178@please_ignore
Got challenge flags:
Got NTLMSSP neg_flags=0x628a8215
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x62008a15
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x62008a15
      \\LENNY\IPC$              IPC Service (Rob's Laptop)
      \\LENNY\Downloads         Lenny's Download Folder Share

altair4
Level 18
Level 18
Posts: 8344
Joined: Tue Feb 03, 2009 10:27 am

Re: Yet another samba problem

Postby altair4 » Fri Feb 17, 2017 7:54 am

It would appear that the only machine this Mint box sees in the network is itself. No other machines are even broadcasting their existence. So there is nothing to resolve.
All the linux machines are running static ip's

Then why do you care that you cannot "browse" to them? You can connect to them with that ip address and then bookmark it in caja.

Just out of curiosity on my part does mDNS work to resolve host names. From lenny can you access another Linux machine using it's host name with a ".local" attached at the end?

From a terminal run:

Code: Select all

caja smb://other-host-name.local
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

User avatar
pfd27
Level 2
Level 2
Posts: 68
Joined: Sun Feb 15, 2015 11:13 am

Re: Yet another samba problem

Postby pfd27 » Fri Feb 17, 2017 8:44 am

It works for one of the other machines, but not both.
I'll just use the bookmarks I created in caja for now

Thanks for your help

User avatar
pfd27
Level 2
Level 2
Posts: 68
Joined: Sun Feb 15, 2015 11:13 am

Re: Yet another samba problem

Postby pfd27 » Fri Feb 17, 2017 9:45 pm

I got it working. I somehow changed the netmask and didn't notice it untill reading back through the posts.
Ooops :)

altair4
Level 18
Level 18
Posts: 8344
Joined: Tue Feb 03, 2009 10:27 am

Re: [solved] Yet another samba problem

Postby altair4 » Sat Feb 18, 2017 8:46 am

added interface wlp1s0 ip=192.168.1.59 bcast=192.168.1.59 netmask=255.255.255.255

It's times like this that serve as a reminder that I am not as smart or observant as I think I am :oops:

My apologies.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.


Return to “Other networking topics”

Who is online

Users browsing this forum: No registered users and 2 guests