Issue with smb after change of ip

Hello, I was happily using my Raspberry Pi 3 to share a USB disk, using SMB installed from the OSMC app store.

Then, my phone company changed my router, and the Pi got a different ip address, from to

Everything else is unchanged.

This is the the smb.conf file:


# If you require a fully custom smb.conf create smb-local.conf instead of editing smb.conf so your
# configuration will not be overwritten by samba upgrades. You can use smb.conf as a template by
# copying it to smb-local.conf then removing the config file line below in the new file. If you only
# need to add some additional shares see smb-shares.conf below for a simpler way to do this.

    config file = /etc/samba/smb-local.conf

    workgroup = WORKGROUP
    follow symlinks = yes
    wide links = no
    unix extensions = no
    lock directory = /var/cache/samba
    load printers = no
    printing = bsd
    printcap name = /dev/null
    disable spoolss = yes
    log level = 1
    map to guest = bad user
#   usershare template share = automount template

# Automount template disabled to work around a samba bug causing crashes accessing external drives.

    read raw = Yes
    write raw = Yes
    strict locking = no
    min receivefile size = 16384
    use sendfile = true
    aio read size = 2048
    aio write size = 2048
    socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072

    browsable = yes
    read only = no
    valid users = osmc
    path = /home/osmc
    comment = OSMC Home Directory

[automount template]
    browseable = yes
    -valid = no
    valid users = osmc
    path = %P
    hide files = /$RECYCLE.BIN/System Volume Information/desktop.ini/thumbs.db/

# Add custom shares in smb-shares.conf instead of editing smb.conf so they will not be
# overwritten by samba updates. You can only add new shares to smb-shares.conf, not change
# the default shares or global options. If you need full control see smb-local.conf above.
include = /etc/samba/smb-shares.conf`

It is what is coming with the app store smb, I don’t think I touched anything.

The smbd daemon start and stop without reporting any error.

In the /var/log/samba/log.smbd log, i see errors like this:

[2017/07/08 21:41:36.450017,  0] ../source3/param/loadparm.c:3171(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/3tb failed. Permission denied

‘3tb’ is the name of the share, and it is the usb disk that is mounted under /media/3TB. That file has this permission:

-rw-r--r-- 1 root root 141 ago 5 23:38 3tb

Could it be the issue? The smbd daemon runs as root, so I don’t think that it is, but my linux knowledge is limited.

From the Pi itself, smbclient correctly shows the share:

$ smbclient -L
Enter osmc's password:
Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.2.14-Debian]

        Sharename       Type      Comment
        ---------       ----      -------
        osmc            Disk      OSMC Home Directory
        IPC$            IPC       IPC Service (Samba 4.2.14-Debian)
        3TB             Disk      Auto-mount Volume
Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.2.14-Debian]

        Server               Comment
        ---------            -------
        FASTGATE             Samba Server
        OSMC3                Samba 4.2.14-Debian

        Workgroup            Master
        ---------            -------
        WORKGROUP            OSMC3

But from my Windows 10 PC I cannot see it.

Any hints to solve this?


What happens if you enter \\\osmc into the addressbar?


And without the share name:

Ok, just tried from my Win10 machine to ensure everything still works.
If I enter \\<IP-Address-of-OSMC> into the addressbar I get the two shares displayed I have.
Are you sure that there is no firewall or e.g. your new router is blocking access to SMB?
Maybe install nmap on your windows machine to check if you can see all open ports of the OSMC box.
What is the IP of your Windows machine?
Also you can try from cmd `net view
If all fails, increase the log level in smb.conf and restart samba

I launched nmap with this command:
nmap -T4 -A -v
and this is the result:

Starting Nmap 7.60 ( ) at 2017-08-09 09:01 W. Europe Daylight Time

NSE: Loaded 146 scripts for scanning.

NSE: Script Pre-scanning.

Initiating NSE at 09:01

Completed NSE at 09:01, 0.00s elapsed

Initiating NSE at 09:01

Completed NSE at 09:01, 0.00s elapsed

Initiating ARP Ping Scan at 09:01

Scanning [1 port]

Completed ARP Ping Scan at 09:01, 0.60s elapsed (1 total hosts)

Initiating Parallel DNS resolution of 1 host. at 09:01

Completed Parallel DNS resolution of 1 host. at 09:01, 16.50s elapsed

Initiating SYN Stealth Scan at 09:01

Scanning [1000 ports]

Discovered open port 111/tcp on

Discovered open port 3306/tcp on

Discovered open port 22/tcp on

Discovered open port 139/tcp on

Discovered open port 445/tcp on

Discovered open port 8080/tcp on

Discovered open port 9091/tcp on

Discovered open port 9090/tcp on

Completed SYN Stealth Scan at 09:01, 0.57s elapsed (1000 total ports)

Initiating Service scan at 09:01

Scanning 8 services on

Completed Service scan at 09:02, 16.08s elapsed (8 services on 1 host)

Initiating OS detection (try #1) against

NSE: Script scanning

Initiating NSE at 09:02

Completed NSE at 09:02, 30.75s elapsed

Initiating NSE at 09:02

Completed NSE at 09:02, 0.02s elapsed

Nmap scan report for

Host is up (0.0023s latency).

Not shown: 992 closed ports


22/tcp   open  ssh         OpenSSH 6.7p1 Debian 5+deb8u3 (protocol 2.0)

| ssh-hostkey: 

|   1024 39:7e:4a:6d:64:f5:ae:f1:da:a5:c7:9a:7c:6e:39:81 (DSA)

|   2048 13:12:09:eb:3d:25:d2:1d:8c:9a:95:ce:a1:0b:4d:0c (RSA)

|   256 c8:53:e1:cb:03:55:38:f0:c6:d1:6a:38:07:41:e9:71 (ECDSA)

|_  256 8b:5a:6b:26:1c:50:95:6c:62:f1:84:dd:ca:84:7f:d8 (EdDSA)

111/tcp  open  rpcbind     2-4 (RPC #100000)

| rpcinfo: 

|   program version   port/proto  service

|   100000  2,3,4        111/tcp  rpcbind

|_  100000  2,3,4        111/udp  rpcbind

139/tcp  open  netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP)

445/tcp  open  netbios-ssn Samba smbd 4.2.14-Debian (workgroup: WORKGROUP)

3306/tcp open  mysql       MySQL 5.5.57-0+deb8u1

| mysql-info: 

|   Protocol: 10

|   Version: 5.5.57-0+deb8u1

|   Thread ID: 5091

|   Capabilities flags: 63487

|   Some Capabilities: Support41Auth, LongPassword, ODBCClient, Speaks41ProtocolOld, FoundRows, SupportsLoadDataLocal, SupportsTransactions, IgnoreSigpipes, DontAllowDatabaseTableColumn, SupportsCompression, IgnoreSpaceBeforeParenthesis, Speaks41ProtocolNew, InteractiveClient, LongColumnFlag, ConnectWithDatabase, SupportsAuthPlugins, SupportsMultipleStatments, SupportsMultipleResults

|   Status: Autocommit

|   Salt: u']~%7)c:7E3pZUx|'Hu

|_  Auth Plugin Name: 88

8080/tcp open  http        2 (Chorus Web UI for XBMC/Kodi)

| http-methods: 

|_  Supported Methods: GET HEAD POST OPTIONS

|_http-title: Chorus 2 - Kodi web interface

9090/tcp open  jsonrpc     XBMC JSON-RPC 2.0

9091/tcp open  http        Transmission BitTorrent management httpd





|_http-favicon: Unknown favicon MD5: 57B821E7C4254D79E9ACDE5E46D21A2E

| http-methods: 

|_  Supported Methods: GET HEAD POST

|_http-server-header: Transmission

| http-title: Transmission Web Interface

|_Requested resource was /transmission/web/

MAC Address: B8:27:EB:38:67:E3 (Raspberry Pi Foundation)

Device type: general purpose

Running: Linux 3.X|4.X

OS CPE: cpe:/o:linux:linux_kernel:3 cpe:/o:linux:linux_kernel:4

OS details: Linux 3.2 - 4.8

Uptime guess: 3.388 days (since Sat Aug 05 23:43:22 2017)

Network Distance: 1 hop

TCP Sequence Prediction: Difficulty=265 (Good luck!)

IP ID Sequence Generation: All zeros

Service Info: Host: OSMC3; OS: Linux; Device: media device; CPE: cpe:/o:linux:linux_kernel

Host script results:

| nbstat: NetBIOS name: OSMC3, NetBIOS user: <unknown>, NetBIOS MAC: <unknown> (unknown)

| Names:

|   OSMC3<00>            Flags: <unique><active>

|   OSMC3<03>            Flags: <unique><active>

|   OSMC3<20>            Flags: <unique><active>

|   \x01\x02__MSBROWSE__\x02<01>  Flags: <group><active>

|   WORKGROUP<00>        Flags: <group><active>

|   WORKGROUP<1d>        Flags: <unique><active>

|_  WORKGROUP<1e>        Flags: <group><active>

| smb-os-discovery: 

|   OS: Windows 6.1 (Samba 4.2.14-Debian)

|   Computer name: osmc3

|   NetBIOS computer name: OSMC3\x00

|   Domain name: \x00

|   FQDN: osmc3

|_  System time: 2017-08-09T09:02:05+02:00

| smb-security-mode: 

|   account_used: guest

|   authentication_level: user

|   challenge_response: supported

|_  message_signing: disabled (dangerous, but default)

|_smb2-security-mode: ERROR: Script execution failed (use -d to debug)

|_smb2-time: ERROR: Script execution failed (use -d to debug)



1   2.32 ms

NSE: Script Post-scanning.

Initiating NSE at 09:02

Completed NSE at 09:02, 0.00s elapsed

Initiating NSE at 09:02

Completed NSE at 09:02, 0.00s elapsed

Read data files from: C:\Program Files (x86)\Nmap

OS and Service detection performed. Please report any incorrect results at .

Nmap done: 1 IP address (1 host up) scanned in 70.31 seconds

           Raw packets sent: 1023 (45.806KB) | Rcvd: 1016 (41.370KB)

As far as I can tell, the smb ports look to be open.

My windows machine ip is, and from it I can ping the Raspberry and I can connect to it with ssh.

On the router, the firewall is off and there are no NAT rules.

Everything looks good, but it isn’t :disappointed:

I agree everything looks Ok. So my guess is it protocol issue.

  1. What is net view giving you?
  2. Next step increase the log level in smb.conf, restart and check the logs

From the windows pc:

C:\Users\kgud0t>net view
System error 53 has occurred.

The network path was not found.

This is suspicious…

I raised samba log level to 3, and now when I try to open the share from Windows explorer I see:

[2017/08/09 11:20:05.857640,  3] ../source3/auth/auth.c:178(auth_check_ntlm_password)
  check_ntlm_password:  Checking password for unmapped user [PLM]\[kgud0t]@[ITTRNGUALANO17B] with the new password interface
[2017/08/09 11:20:05.857748,  3] ../source3/auth/auth.c:181(auth_check_ntlm_password)
  check_ntlm_password:  mapped user is: [OSMC3]\[kgud0t]@[ITTRNGUALANO17B]
[2017/08/09 11:20:05.857949,  3] ../source3/auth/check_samsec.c:400(check_sam_security)
  check_sam_security: Couldn't find user 'kgud0t' in passdb.
[2017/08/09 11:20:05.858087,  2] ../source3/auth/auth.c:315(auth_check_ntlm_password)
  check_ntlm_password:  Authentication for user [kgud0t] -> [kgud0t] FAILED with error NT_STATUS_NO_SUCH_USER
[2017/08/09 11:20:05.858252,  3] ../source3/auth/auth_util.c:1599(do_map_to_guest_server_info)
  No such user kgud0t [PLM] - using guest account

it seems that it tries to connect using the domain user of my pc, and it fails because it do not exist on the Raspberry. But it should ask me to authenticate with the raspberry local user, shouldn’t?

Oh, you Win 10 machine is part of a local domain? Seems to be the same issue as the below thread which unfortunately I can not see a solution in that thread

using the RPI IP address doesn’t work?

  • First wipe the windows 10 vault for the RPI, any entry in Start > Control Panel > User Accounts > Credential Manager
  • map the RPI share with “RPI_IP\username” as the user
    (net connect or mapping in explorer)

Yes, my pc is the laptop my company gave to me, and the user is part of a domain.

I was able to map the raspberry share mapping it to the Z: drive, using the raspberry IP and specifying WORKGROUP\osmc as the username.
Now I can browse files and folders!

Thank you very much to everybody!