# Samba 35 installation problem



## margor (Aug 15, 2011)

Hello,
I used port net/samba35, because net/samba34 is vulnerable. I didn't remove default options, however, I enabled SWAT support. Compilation succeeded.

I put 
	
	



```
samba_enable="YES"
```
 in /etc/rc.conf. I just little changed default config.

The nmbd seems to be broken. 

```
# /usr/local/etc/rc.d/samba status
nmbd is not running.
smbd is running as pid 89880.
```

I don't know what might be the reason of this problem. Thanks for any suggestions.


----------



## Anonymous (Aug 15, 2011)

Try to add the loopback address to the setting "hosts allow" in your smb.conf.

```
hosts allow = 192.168.1. 10.0.0. 127.
```



			
				margor said:
			
		

> ... I enabled SWAT support. ...



For SWAT being functional, I needed to uncomment the swat line in /etc/inetd.conf and in addition to add 
	
	



```
inetd_enable="YES"
```
 in /etc/rc.conf.

Best regards

Rolf


----------



## margor (Aug 15, 2011)

I opened log of nmbd:

```
[root@margor /var/log/samba]# cat log.nmbd 
[2011/08/15 23:24:39,  0] nmbd/nmbd.c:857(main)
  nmbd version 3.5.9 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2010
[2011/08/15 23:24:39.573869,  0] lib/util_sock.c:880(open_socket_in)
  bind failed on port 137 socket_addr = 172.16.255.255.
  Error = Can't assign requested address
[2011/08/15 23:24:39.575158,  0] nmbd/nmbd_subnetdb.c:118(make_subnet)
  nmbd_subnetdb:make_subnet()
    Failed to open nmb bcast socket on interface 172.16.255.255 for port 137.  Error was Can't assign requested address
[2011/08/15 23:24:39.575920,  0] nmbd/nmbd.c:963(main)
  ERROR: Failed when creating subnet lists. Exiting.
[/FILE]

[FILE]
[root@margor /var/log/samba]# ifconfig -u
ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
        ether 00:1d:0f:b4:f0:f0
        media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
        status: running
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=2009<RXCSUM,VLAN_MTU,WOL_MAGIC>
        ether 00:90:27:5b:84:a9
        inet 193.106.129.67 netmask 0xffffff00 broadcast 193.106.129.255
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
        ether 00:0e:0c:c6:14:a0
        inet 10.0.0.1 netmask 0xffffff00 broadcast 10.0.0.255
        inet 172.16.1.2 netmask 0xffff0000 broadcast 255.255.255.0
        inet 172.16.1.3 netmask 0xffff0000 broadcast 255.255.255.0
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 
        inet6 ::1 prefixlen 128 
        inet 127.0.0.1 netmask 0xff000000 
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:1d:0f:b4:f0:f0
        inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
        media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
        status: running
        ssid freebsdap channel 8 (2447 MHz 11g) bssid 00:1d:0f:b4:f0:f0
        regdomain 32924 country CN indoor ecm authmode WPA2/802.11i
        privacy MIXED deftxkey 3 TKIP 2:128-bit TKIP 3:128-bit txpower 20
        scanvalid 60 protmode CTS wme burst dtimperiod 1 -dfs
pflog0: flags=141<UP,RUNNING,PROMISC> metric 0 mtu 33152
```

I updated my smb.conf to. Also, deleted aliases. Well it seems that aliases was breaking my nmbd. Now, my Samba server is available. At the moment I don't need multiple IP on em0, so I will keep things untouched.

Thank you,


----------

