# Samba stopped working after upgrading to profile 17.0 [SLVD]

## mindcooler

I recently upgraded to gcc 6.4.0 and profile 17.0, rebuild and all.

Noteced my shares stopped working, they did not accept my password. Somewhere someone tipped to update the password with smbpasswd:

```
Old SMB password:

New SMB password:

Retype new SMB password:

Unable to connect to SMB server on machine 127.0.0.1. Error was : NT_STATUS_CONNECTION_REFUSED.
```

Seems that it can't bind to the lo interface or something? smbd log says:

```
[2017/12/30 16:37:50,  0] ../source3/smbd/server.c:1241(main)

  smbd version 4.2.14 started.

  Copyright Andrew Tridgell and the Samba Team 1992-2014

[2017/12/30 16:37:50.298176,  0] ../lib/util/become_daemon.c:124(daemon_ready)

  STATUS=daemon 'smbd' finished starting up and ready to serve connections

[2017/12/30 16:37:50.299451,  0] ../source3/lib/util_sock.c:455(open_socket_in)

  open_socket_in(): socket() call failed: Adressfamiljen stöds inte av protokollet

[2017/12/30 16:37:50.299598,  0] ../source3/smbd/server.c:690(smbd_open_one_socket)

  smbd_open_once_socket: open_socket_in: Adressfamiljen stöds inte av protokollet

[2017/12/30 16:37:50.300126,  0] ../source3/lib/util_sock.c:455(open_socket_in)

  open_socket_in(): socket() call failed: Adressfamiljen stöds inte av protokollet

[2017/12/30 16:37:50.300167,  0] ../source3/smbd/server.c:690(smbd_open_one_socket)

  smbd_open_once_socket: open_socket_in: Adressfamiljen stöds inte av protokollet
```

("Address family not supported by the protocol")

Tried both 4.2.14 and 4.5.10-r1 versions with the same result.

I just noticed nmbd doesn't seem too happy either:

```
  STATUS=daemon 'nmbd' finished starting up and ready to serve connections

[2017/12/30 16:37:50.318110,  0] ../lib/util/fault.c:78(fault_report)

  ===============================================================

[2017/12/30 16:37:50.318132,  0] ../lib/util/fault.c:79(fault_report)

  INTERNAL ERROR: Signal 11 in pid 25892 (4.2.14)

  Please read the Trouble-Shooting section of the Samba HOWTO

[2017/12/30 16:37:50.318151,  0] ../lib/util/fault.c:81(fault_report)

  ===============================================================

[2017/12/30 16:37:50.318164,  0] ../source3/lib/util.c:788(smb_panic_s3)

  PANIC (pid 25892): internal error

[2017/12/30 16:37:50.318578,  0] ../source3/lib/util.c:899(log_stack_trace)

  BACKTRACE: 11 stack frames:

   #0 /usr/lib64/libsmbconf.so.0(log_stack_trace+0x1c) [0x7fe96c4f2c9c]

   #1 /usr/lib64/libsmbconf.so.0(smb_panic_s3+0x20) [0x7fe96c4f2d80]

   #2 /usr/lib64/libsamba-util.so.0(smb_panic+0x2f) [0x7fe96cef17ef]

   #3 /usr/lib64/libsamba-util.so.0(+0x1aa16) [0x7fe96cef1a16]

   #4 /lib64/libpthread.so.0(+0x143d0) [0x7fe96d3233d0]

   #5 /usr/lib64/libtalloc.so.2(talloc_get_size+0x5) [0x7fe96a7df205]

   #6 /usr/lib64/libsmbconf.so.0(event_add_to_poll_args+0x70) [0x7fe96c5086d0]

   #7 /usr/sbin/nmbd(listen_for_packets+0xfb) [0x56200e33b41b]

   #8 /usr/sbin/nmbd(main+0xceb) [0x56200e32a62b]

   #9 /lib64/libc.so.6(__libc_start_main+0xf1) [0x7fe969bff571]

   #10 /usr/sbin/nmbd(_start+0x2a) [0x56200e32aa4a]

[2017/12/30 16:37:50.318679,  0] ../source3/lib/dumpcore.c:318(dump_core)

  dumping core in /var/log/samba/cores/nmbd

```

testparm:

```
[global]

Load smb config files from /etc/samba/smb.conf

rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)

Processing section "[2]"

Processing section "[3]"

Loaded services file OK.

Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters

[global]

        workgroup = BANK

        server string = BANKA

        log file = /var/log/samba/log.%m

        server max protocol = SMB2

        load printers = No

        idmap config * : backend = tdb

        oplocks = No

        level2 oplocks = No

[2]

        comment = sdd

        path = /mnt/2

        read only = No

        veto files = /lost+found/

[3]

        comment = sde

        path = /mnt/3

        read only = No

        veto files = /lost+found/
```

Last edited by mindcooler on Fri Jan 05, 2018 11:53 am; edited 1 time in total

----------

## Cyker

What have you tried?

Last time I had a problem like this it was due to tdb, talloc and tevent not being compatible with the samba I have (I stuck to v3) and I had to downgrade them - That probably won't apply to you if you're using samba 4, but it might be worth re-emerging samba, tdb, talloc and tevent just to make sure they're all on the same page.

----------

## mindcooler

Reemerged 4.5.10-r1, tdb, talloc and tevent.

Previously also tried bind interfaces only = yes, while omitting lo from the interfaces = list, it stopped complaining about address families, but I still got the  NT_STATUS_CONNECTION_REFUSED.

----------

## mindcooler

smbd -d 3 -i:

```
smbd version 4.5.10 started.

Copyright Andrew Tridgell and the Samba Team 1992-2016

uid=0 gid=0 euid=0 egid=0

lp_load_ex: refreshing parameters

Initialising global parameters

rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)

Processing section "[global]"

Registered MSG_REQ_POOL_USAGE

Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED

lp_load_ex: refreshing parameters

Initialising global parameters

rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)

Processing section "[global]"

Processing section "[2]"

Processing section "[3]"

adding IPC service

added interface enp4s0 ip=10.0.0.1 bcast=10.0.0.255 netmask=255.255.255.0

added interface enp6s0 ip=89.160.71.132 bcast=89.160.71.255 netmask=255.255.255.128

added interface enp4s0 ip=169.254.55.6 bcast=169.254.255.255 netmask=255.255.0.0

loaded services

INFO: Profiling support unavailable in this build.

Failed to fetch domain sid for BANK

Failed to fetch domain sid for BANK

Initialise the svcctl registry keys if needed.

Initialise the eventlog registry keys if needed.

reloading printcap cache

reload status: ok

open_socket_in(): socket() call failed: Adressfamiljen stöds inte av protokollet

smbd_open_one_socket: open_socket_in: Adressfamiljen stöds inte av protokollet

open_socket_in(): socket() call failed: Adressfamiljen stöds inte av protokollet

smbd_open_one_socket: open_socket_in: Adressfamiljen stöds inte av protokollet

reloading printcap cache

reload status: ok

waiting for connections

```

nmbd -d 3 -i:

```
nmbd version 4.5.10 started.

Copyright Andrew Tridgell and the Samba Team 1992-2016

lp_load_ex: refreshing parameters

Initialising global parameters

rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)

Processing section "[global]"

Registered MSG_REQ_POOL_USAGE

Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED

lp_load_ex: refreshing parameters

Initialising global parameters

rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)

Processing section "[global]"

services not loaded

standard input is not a socket, assuming -D option

Opening sockets 137

open_sockets: Broadcast sockets opened.

added interface enp4s0 ip=10.0.0.1 bcast=10.0.0.255 netmask=255.255.255.0

added interface enp6s0 ip=89.160.71.132 bcast=89.160.71.255 netmask=255.255.255.128

added interface enp4s0 ip=169.254.55.6 bcast=169.254.255.255 netmask=255.255.0.0

making subnet name:169.254.55.6 Broadcast address:169.254.255.255 Subnet mask:255.255.0.0

making subnet name:89.160.71.132 Broadcast address:89.160.71.255 Subnet mask:255.255.255.128

making subnet name:10.0.0.1 Broadcast address:10.0.0.255 Subnet mask:255.255.255.0

making subnet name:UNICAST_SUBNET Broadcast address:0.0.0.0 Subnet mask:0.0.0.0

making subnet name:REMOTE_BROADCAST_SUBNET Broadcast address:0.0.0.0 Subnet mask:0.0.0.0

load_lmhosts_file: Can't open lmhosts file /etc/samba/lmhosts. Error was Filen eller katalogen finns inte

Loaded hosts file /etc/samba/lmhosts

add_name_to_subnet: Added netbios name *<00> with first IP 10.0.0.1 ttl=0 nb_flags= 0 to subnet 10.0.0.1

add_name_to_subnet: Added netbios name *<20> with first IP 10.0.0.1 ttl=0 nb_flags= 0 to subnet 10.0.0.1

add_name_to_subnet: Added netbios name __SAMBA__<20> with first IP 10.0.0.1 ttl=0 nb_flags= 0 to subnet 10.0.0.1

add_name_to_subnet: Added netbios name __SAMBA__<00> with first IP 10.0.0.1 ttl=0 nb_flags= 0 to subnet 10.0.0.1

create_server_on_workgroup: Created server entry SEGATRON of type 40819a03 (BANKA) on workgroup BANK.

initiate_myworkgroup_startup: Added server name entry SEGATRON on subnet 10.0.0.1

add_name_to_subnet: Added netbios name *<00> with first IP 89.160.71.132 ttl=0 nb_flags= 0 to subnet 89.160.71.132

add_name_to_subnet: Added netbios name *<20> with first IP 89.160.71.132 ttl=0 nb_flags= 0 to subnet 89.160.71.132

add_name_to_subnet: Added netbios name __SAMBA__<20> with first IP 89.160.71.132 ttl=0 nb_flags= 0 to subnet 89.160.71.132

add_name_to_subnet: Added netbios name __SAMBA__<00> with first IP 89.160.71.132 ttl=0 nb_flags= 0 to subnet 89.160.71.132

create_server_on_workgroup: Created server entry SEGATRON of type 40819a03 (BANKA) on workgroup BANK.

initiate_myworkgroup_startup: Added server name entry SEGATRON on subnet 89.160.71.132

add_name_to_subnet: Added netbios name *<00> with first IP 169.254.55.6 ttl=0 nb_flags= 0 to subnet 169.254.55.6

add_name_to_subnet: Added netbios name *<20> with first IP 169.254.55.6 ttl=0 nb_flags= 0 to subnet 169.254.55.6

add_name_to_subnet: Added netbios name __SAMBA__<20> with first IP 169.254.55.6 ttl=0 nb_flags= 0 to subnet 169.254.55.6

add_name_to_subnet: Added netbios name __SAMBA__<00> with first IP 169.254.55.6 ttl=0 nb_flags= 0 to subnet 169.254.55.6

create_server_on_workgroup: Created server entry SEGATRON of type 40819a03 (BANKA) on workgroup BANK.

initiate_myworkgroup_startup: Added server name entry SEGATRON on subnet 169.254.55.6

add_name_to_subnet: Added netbios name *<00> with first IP 10.0.0.1 ttl=0 nb_flags= 0 to subnet UNICAST_SUBNET

add_name_to_subnet: Added netbios name *<20> with first IP 10.0.0.1 ttl=0 nb_flags= 0 to subnet UNICAST_SUBNET

add_name_to_subnet: Added netbios name __SAMBA__<20> with first IP 10.0.0.1 ttl=0 nb_flags= 0 to subnet UNICAST_SUBNET

add_name_to_subnet: Added netbios name __SAMBA__<00> with first IP 10.0.0.1 ttl=0 nb_flags= 0 to subnet UNICAST_SUBNET

add_name_to_subnet: Added netbios name SEGATRON<20> with first IP 10.0.0.1 ttl=0 nb_flags= 0 to subnet UNICAST_SUBNET

add_name_to_subnet: Added netbios name SEGATRON<03> with first IP 10.0.0.1 ttl=0 nb_flags= 0 to subnet UNICAST_SUBNET

add_name_to_subnet: Added netbios name SEGATRON<00> with first IP 10.0.0.1 ttl=0 nb_flags= 0 to subnet UNICAST_SUBNET

add_name_to_subnet: Added netbios name BANK<00> with first IP 10.0.0.1 ttl=0 nb_flags=80 to subnet UNICAST_SUBNET

add_name_to_subnet: Added netbios name BANK<1e> with first IP 10.0.0.1 ttl=0 nb_flags=80 to subnet UNICAST_SUBNET

add_name_to_subnet: Added netbios name *<00> with first IP 10.0.0.1 ttl=0 nb_flags= 0 to subnet REMOTE_BROADCAST_SUBNET

add_name_to_subnet: Added netbios name *<20> with first IP 10.0.0.1 ttl=0 nb_flags= 0 to subnet REMOTE_BROADCAST_SUBNET

add_name_to_subnet: Added netbios name __SAMBA__<20> with first IP 10.0.0.1 ttl=0 nb_flags= 0 to subnet REMOTE_BROADCAST_SUBNET

add_name_to_subnet: Added netbios name __SAMBA__<00> with first IP 10.0.0.1 ttl=0 nb_flags= 0 to subnet REMOTE_BROADCAST_SUBNET

send_host_announcement: type 819a03 for host SEGATRON on subnet 10.0.0.1 for workgroup BANK

send_host_announcement: type 819a03 for host SEGATRON on subnet 89.160.71.132 for workgroup BANK

send_host_announcement: type 819a03 for host SEGATRON on subnet 169.254.55.6 for workgroup BANK

add_name_to_subnet: Added netbios name SEGATRON<20> with first IP 10.0.0.1 ttl=0 nb_flags= 0 to subnet 10.0.0.1

add_name_to_subnet: Added netbios name SEGATRON<03> with first IP 10.0.0.1 ttl=0 nb_flags= 0 to subnet 10.0.0.1

add_name_to_subnet: Added netbios name SEGATRON<00> with first IP 10.0.0.1 ttl=0 nb_flags= 0 to subnet 10.0.0.1

add_name_to_subnet: Added netbios name BANK<00> with first IP 10.0.0.1 ttl=0 nb_flags=80 to subnet 10.0.0.1

add_name_to_subnet: Added netbios name BANK<1e> with first IP 10.0.0.1 ttl=0 nb_flags=80 to subnet 10.0.0.1

check_for_master_browser_fail: Forcing election on workgroup BANK subnet 10.0.0.1

add_name_to_subnet: Added netbios name SEGATRON<20> with first IP 89.160.71.132 ttl=0 nb_flags= 0 to subnet 89.160.71.132

add_name_to_subnet: Added netbios name SEGATRON<03> with first IP 89.160.71.132 ttl=0 nb_flags= 0 to subnet 89.160.71.132

add_name_to_subnet: Added netbios name SEGATRON<00> with first IP 89.160.71.132 ttl=0 nb_flags= 0 to subnet 89.160.71.132

add_name_to_subnet: Added netbios name BANK<00> with first IP 89.160.71.132 ttl=0 nb_flags=80 to subnet 89.160.71.132

add_name_to_subnet: Added netbios name BANK<1e> with first IP 89.160.71.132 ttl=0 nb_flags=80 to subnet 89.160.71.132

check_for_master_browser_fail: Forcing election on workgroup BANK subnet 89.160.71.132

add_name_to_subnet: Added netbios name SEGATRON<20> with first IP 169.254.55.6 ttl=0 nb_flags= 0 to subnet 169.254.55.6

add_name_to_subnet: Added netbios name SEGATRON<03> with first IP 169.254.55.6 ttl=0 nb_flags= 0 to subnet 169.254.55.6

add_name_to_subnet: Added netbios name SEGATRON<00> with first IP 169.254.55.6 ttl=0 nb_flags= 0 to subnet 169.254.55.6

add_name_to_subnet: Added netbios name BANK<00> with first IP 169.254.55.6 ttl=0 nb_flags=80 to subnet 169.254.55.6

add_name_to_subnet: Added netbios name BANK<1e> with first IP 169.254.55.6 ttl=0 nb_flags=80 to subnet 169.254.55.6

check_for_master_browser_fail: Forcing election on workgroup BANK subnet 169.254.55.6

check_elections: >>> Starting election for workgroup BANK on subnet 10.0.0.1 <<<

check_elections: >>> Starting election for workgroup BANK on subnet 89.160.71.132 <<<

check_elections: >>> Starting election for workgroup BANK on subnet 169.254.55.6 <<<

write_browse_list: Wrote browse list into file /var/cache/samba/browse.dat

send_election_dgram: Sending election packet for workgroup BANK on subnet 10.0.0.1

send_election_dgram: Sending election packet for workgroup BANK on subnet 89.160.71.132

send_election_dgram: Sending election packet for workgroup BANK on subnet 169.254.55.6

send_election_dgram: Sending election packet for workgroup BANK on subnet 10.0.0.1

send_election_dgram: Sending election packet for workgroup BANK on subnet 89.160.71.132

send_election_dgram: Sending election packet for workgroup BANK on subnet 169.254.55.6

send_election_dgram: Sending election packet for workgroup BANK on subnet 10.0.0.1

send_election_dgram: Sending election packet for workgroup BANK on subnet 89.160.71.132

send_election_dgram: Sending election packet for workgroup BANK on subnet 169.254.55.6

send_election_dgram: Sending election packet for workgroup BANK on subnet 10.0.0.1

send_election_dgram: Sending election packet for workgroup BANK on subnet 89.160.71.132

send_election_dgram: Sending election packet for workgroup BANK on subnet 169.254.55.6

send_election_dgram: Sending election packet for workgroup BANK on subnet 10.0.0.1

run_elections: >>> Won election for workgroup BANK on subnet 10.0.0.1 <<<

become_local_master_browser: Starting to become a master browser for workgroup BANK on subnet 10.0.0.1

become_local_master_browser: first stage - attempt to register ^1^2__MSBROWSE__^2^1

send_election_dgram: Sending election packet for workgroup BANK on subnet 89.160.71.132

run_elections: >>> Won election for workgroup BANK on subnet 89.160.71.132 <<<

become_local_master_browser: Starting to become a master browser for workgroup BANK on subnet 89.160.71.132

become_local_master_browser: first stage - attempt to register ^1^2__MSBROWSE__^2^1

send_election_dgram: Sending election packet for workgroup BANK on subnet 169.254.55.6

run_elections: >>> Won election for workgroup BANK on subnet 169.254.55.6 <<<

become_local_master_browser: Starting to become a master browser for workgroup BANK on subnet 169.254.55.6

become_local_master_browser: first stage - attempt to register ^1^2__MSBROWSE__^2^1

write_browse_list: Wrote browse list into file /var/cache/samba/browse.dat

add_name_to_subnet: Added netbios name __MSBROWSE__<01> with first IP 10.0.0.1 ttl=0 nb_flags=80 to subnet 10.0.0.1

become_local_master_stage1: go to stage 2: register the BANK<1d> name.

add_name_to_subnet: Added netbios name __MSBROWSE__<01> with first IP 10.0.0.1 ttl=0 nb_flags=80 to subnet UNICAST_SUBNET

add_name_to_subnet: Added netbios name __MSBROWSE__<01> with first IP 89.160.71.132 ttl=0 nb_flags=80 to subnet 89.160.71.132

become_local_master_stage1: go to stage 2: register the BANK<1d> name.

add_name_to_subnet: Added netbios name __MSBROWSE__<01> with first IP 169.254.55.6 ttl=0 nb_flags=80 to subnet 169.254.55.6

become_local_master_stage1: go to stage 2: register the BANK<1d> name.

add_name_to_subnet: Added netbios name BANK<1d> with first IP 10.0.0.1 ttl=0 nb_flags= 0 to subnet 10.0.0.1

become_local_master_stage2: registered as master browser for workgroup BANK on subnet 10.0.0.1

broadcast_announce_request: sending announce request for workgroup BANK to subnet 10.0.0.1

add_name_to_subnet: Added netbios name BANK<1d> with first IP 10.0.0.1 ttl=0 nb_flags= 0 to subnet UNICAST_SUBNET

*****

Samba name server SEGATRON is now a local master browser for workgroup BANK on subnet 10.0.0.1

*****

add_name_to_subnet: Added netbios name BANK<1d> with first IP 89.160.71.132 ttl=0 nb_flags= 0 to subnet 89.160.71.132

become_local_master_stage2: registered as master browser for workgroup BANK on subnet 89.160.71.132

broadcast_announce_request: sending announce request for workgroup BANK to subnet 89.160.71.132

*****

Samba name server SEGATRON is now a local master browser for workgroup BANK on subnet 89.160.71.132

*****

add_name_to_subnet: Added netbios name BANK<1d> with first IP 169.254.55.6 ttl=0 nb_flags= 0 to subnet 169.254.55.6

become_local_master_stage2: registered as master browser for workgroup BANK on subnet 169.254.55.6

broadcast_announce_request: sending announce request for workgroup BANK to subnet 169.254.55.6

*****

Samba name server SEGATRON is now a local master browser for workgroup BANK on subnet 169.254.55.6

*****

send_local_master_announcement: type 849a03 for name SEGATRON on subnet 10.0.0.1 for workgroup BANK

send_workgroup_announcement: on subnet 10.0.0.1 for workgroup BANK

send_local_master_announcement: type 849a03 for name SEGATRON on subnet 89.160.71.132 for workgroup BANK

send_workgroup_announcement: on subnet 89.160.71.132 for workgroup BANK

send_local_master_announcement: type 849a03 for name SEGATRON on subnet 169.254.55.6 for workgroup BANK

send_workgroup_announcement: on subnet 169.254.55.6 for workgroup BANK
```

----------

## mindcooler

nmap internal IP:

```
Starting Nmap 7.40 ( https://nmap.org ) at 2017-12-30 21:14 CET

Nmap scan report for segatron (10.0.0.1)

Host is up (0.34s latency).

Not shown: 995 closed ports

PORT    STATE SERVICE

25/tcp  open  smtp

80/tcp  open  http

143/tcp open  imap

443/tcp open  https

993/tcp open  imaps

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

nmap localhost:

```
Starting Nmap 7.40 ( https://nmap.org ) at 2017-12-30 21:15 CET

Nmap scan report for localhost (127.0.0.1)

Host is up (0.000093s latency).

Not shown: 992 closed ports

PORT    STATE    SERVICE

25/tcp  open     smtp

53/tcp  filtered domain

80/tcp  open     http

139/tcp filtered netbios-ssn

143/tcp open     imap

443/tcp open     https

445/tcp filtered microsoft-ds

993/tcp open     imaps

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

----------

## mvaterlaus

hi,

@mindcooler: could you supply your command used to connect to the share? If you are trying to connect to your shares with sec=ntlm, it will not work since NTLM Security is by default disabled at least for samba 4.5.x [1].

greetings

[1]https://www.samba.org/samba/history/samba-4.5.0.html

----------

## mindcooler

I was using the GUI (W10) to map a resource to a drive, but trying to map via the command line yields the same result:

```
C:\Users\Jens\Documents>net use z: \\segatron\3

Ange användarnamnet för segatron: jens

Ange lösenord för segatron:

Systemfel 86 har uppstått.

Felaktigt nätverkslösenord angivet.
```

(System error 86 occurred/Wrong password supplied)

And I can't change the password due to smbpasswd is unable to connect to service.

----------

## mindcooler

I just randomly tried smbpasswd as root, and it worked:

```
segatron /home/jens # smbpasswd jens

New SMB password:

Retype new SMB password:

segatron /home/jens #
```

And after enabling NTLM as tipped by mvaterlaus:

```
lanman auth = no

ntlm auth = yes

client lanman auth = no
```

I can connect again:

```
C:\Users\Jens\Documents>net use /user:jens z: \\segatron\3

Ange det lösenord som jens använder för att ansluta till segatron:

Kommandot har utförts.
```

BUT, smbpasswd from user is not possible. Am I missing some group membership or something?

```
jens@segatron ~ $ smbpasswd

Old SMB password:

New SMB password:

Retype new SMB password:

Unable to connect to SMB server on machine 127.0.0.1. Error was : NT_STATUS_CONNECTION_REFUSED.
```

```
jens@segatron ~ $ groups

wheel audio
```

----------

## mvaterlaus

The difference[1] between using smbpasswd as normal user or as root is, that when used by root, it accesses the smbpasswd file directly. As a normal user, smbpasswd connects to the local running smbd to change the password. Since you have written, that you have omitted the lo interface from the interfaces list, this could be the reason, that a user can not change the password.

[1]https://www.samba.org/samba/docs/man/manpages-3/smbpasswd.8.html

[edit]

This behavoir is also indicated by the error message you get:

 *mindcooler wrote:*   

> Unable to connect to SMB server on machine 127.0.0.1. Error was : NT_STATUS_CONNECTION_REFUSED.

 

[/edit]

----------

## mindcooler

No, I removed the

```
bind interfaces only = yes

interfaces = lo eth0
```

so I am still getting socket errors on startup:

```
[2018/01/04 16:48:01.743294,  0] ../lib/util/become_daemon.c:124(daemon_ready)

  STATUS=daemon 'smbd' finished starting up and ready to serve connections

[2018/01/04 16:48:01.746353,  0] ../source3/lib/util_sock.c:334(open_socket_in)

  open_socket_in(): socket() call failed: Adressfamiljen stöds inte av protokollet

[2018/01/04 16:48:01.746512,  0] ../source3/smbd/server.c:1080(smbd_open_one_socket)

  smbd_open_one_socket: open_socket_in: Adressfamiljen stöds inte av protokollet

[2018/01/04 16:48:01.747054,  0] ../source3/lib/util_sock.c:334(open_socket_in)

  open_socket_in(): socket() call failed: Adressfamiljen stöds inte av protokollet

[2018/01/04 16:48:01.747079,  0] ../source3/smbd/server.c:1080(smbd_open_one_socket)

  smbd_open_one_socket: open_socket_in: Adressfamiljen stöds inte av protokollet
```

So I'm thinking it tries to bind to lo, but fails by some reason.

----------

## mvaterlaus

If I had to guess, the socket error comes from missing IPv6[1] support.

[1]https://bbs.archlinux.org/viewtopic.php?id=177459

----------

## mindcooler

Yep, been to that post, that's where I picked up the 

```
bind interfaces only
```

Where am I missing ipv6 exactly? In the kernel? Turned on IPV6, but it didn't make any difference.

Am I missing ipv6 support somewhere, or have something erroneously ipv6 enabled that should not?

```
CONFIG_IPV6=y

# CONFIG_IPV6_ROUTER_PREF is not set

# CONFIG_IPV6_OPTIMISTIC_DAD is not set

# CONFIG_IPV6_MIP6 is not set

# CONFIG_IPV6_ILA is not set

# CONFIG_IPV6_VTI is not set

CONFIG_IPV6_SIT=y

# CONFIG_IPV6_SIT_6RD is not set

CONFIG_IPV6_NDISC_NODETYPE=y

# CONFIG_IPV6_TUNNEL is not set

# CONFIG_IPV6_FOU is not set

# CONFIG_IPV6_FOU_TUNNEL is not set

# CONFIG_IPV6_MULTIPLE_TABLES is not set

# CONFIG_IPV6_MROUTE is not set

# CONFIG_NF_DEFRAG_IPV6 is not set

# CONFIG_NF_CONNTRACK_IPV6 is not set

# CONFIG_NF_DUP_IPV6 is not set

# CONFIG_NF_REJECT_IPV6 is not set

# CONFIG_NF_LOG_IPV6 is not set
```

----------

## mvaterlaus

sorry, I can not help you with IPv6, since I do not use it on any of my servers. But I fixed the error messages with the config line you mentioned:

```
bind interfaces only
```

----------

## mindcooler

Oh well, marking this as solved as the problem may not be specific to samba.

----------

## LIsLinuxIsSogood

 *Quote:*   

> CONFIG_IPV6=y 

 

You do have ipv6 enabled now.  Check your interfaces to see if they are configured for addresses using ifconfig.

Then you can check if pinging different hosts using ipv6 works or not.

----------

## mindcooler

I don't know how to set a ipv6 address on lo if that is needed:

```
segatron /home/jens # ifconfig lo ::1

::1: Unknown host
```

```
segatron /home/jens # ping6 ::1

PING ::1(::1) 56 data bytes

64 bytes from ::1: icmp_seq=1 ttl=64 time=0.020 ms

64 bytes from ::1: icmp_seq=2 ttl=64 time=0.024 ms
```

```
segatron /home/jens # ping6 google.se

connect: Network is unreachable

segatron /home/jens # ping google.se

PING google.se (172.217.22.163) 56(84) bytes of data.

64 bytes from arn09s11-in-f163.1e100.net (172.217.22.163): icmp_seq=1 ttl=52 time=2.66 ms

64 bytes from arn09s11-in-f163.1e100.net (172.217.22.163): icmp_seq=2 ttl=52 time=2.63 ms
```

I don't run anything ipv6 so I'm not sure why samba tries to make an ipv6 socket, if that is the issue.

----------

## LIsLinuxIsSogood

I think you were right...these are two somewhat separate problems...the samba connection seems pretty much fixed, right?  

As for the socket errors when using samba, and the tie between that and ipv6 and the kernel.  Some things you can try and I would do them in this order because it will make life easier:

1.  Try to get ipv6 working on your network with some minimal time investment.  It sounds like a hassle, which it can be but it may be something simple, like just using the dhcp service to request an ipv6 address from your router, etc.

2.  If you are trying to get rid of the error messages but without using ipv6 then you have to look at the application layer of the software that may have built into it a check for ipv6 (sometimes regardless of the kernel's support for such feature but you would have to consult others with samba installed to tell you if this is a "harmless" error).  Another way i could think of testing that is just remove ipv6 altogether from your kernel.  I don't think it actually provides much benefits, other than the larger address space which generally is not an issue.

3. The last thing (which possibly could work) is if the errors are really beginning to cause other issues like with the share or connection problems, would be to remove ipv6 from samba.  This process could be much more complicated, and probably doesn't make sense to go into here.  But let's just say I already checked there's no such use flag under samba for ipv6.

----------

## mindcooler

IPv6 being activated in the kernel broke other things such as squid (BCP 177 violation), so I removed it.

----------

## iandoug

Sorry to jump in here, just want to check if my issue is related to this or something different,

I have some NAS boxes running FreeNAS.

After the whole migrate-to-17 fun and games, I am unable to copy files to nested directories of a certain depth, which had been working fine for years.

I copy using Dolphin.

eg on NAS drive I have

folder 1

->folder 2

-->folder 3

--->folder 4

I can copy file from this machine to folder 3, but not folder 4. Was not a problem before,

So is this a different issue to what's discussed here, or somehow related?

Thanks, Ian

----------

