# Samba crash FreeBSD



## suhijo (Sep 25, 2014)

Hello

I've installed Samba 4.1.11 or Samba 3.6  on FreeBSD 10.0 and I have some issues. Samba starts normally but when I connect a Mac user and they  try to copy to the share folder it says 'permission denied'. But when I do the same with Windows 7 it allows me, but if I try to delete a  folder, it just stays there finding files and when I look with `top`, Samba takes over the CPU completely, and my server stops responding. I cannot kill Samba, no kill signal does it, and if I reboot the system it hangs there writing an entropy file, so I have to power off the server.

What can I do to resolve this?  :q


----------



## suhijo (Sep 26, 2014)

So no answer? *I*s it not understandable?


----------



## DutchDaemon (Sep 26, 2014)

It is usually advisable to add useful information and tell us what you have tried since your post. No reply means that the problem wasn't explained clearly enough, or that it is unique to you.


----------



## suhijo (Sep 27, 2014)

Any idea?, I am stuck at this point.  This is my config:

smb4.conf

```
# Global parameters
[global]
        workgroup = PRUEBAS
        realm = PRUEBAS.COM.CO
        netbios name = SOPORTE
        server role = active directory domain controller
        dns forwarder = 192.168.0.254
        server services = rpc, nbt, wrepl, ldap, cldap, kdc, drepl, winbind, ntp_signd, kcc, dnsupdate, dns, smb
        dcerpc endpoint servers = epmapper, wkssvc, rpcecho, samr, netlogon, lsarpc, spoolss, drsuapi, dssetup, unixinfo, browser, eventlog6,
 backupkey, dnsserver, winreg, srvsvc
        idmap_ldb:use rfc2307 = yes

[netlogon]
        path = /var/db/samba4/sysvol/pruebas.com.co/scripts
        read only = No

[sysvol]
        path = /var/db/samba4/sysvol
        read only = No
[admin]
        path = /mnt/admin
        valid users = admin # the user created before with smbpasswd
        writable  = yes
        browsable = yes
        read only = no
        guest ok = yes
        public = yes
        create mask = 0666
        directory mask = 0777
```

Folder has permission for everything

`ls -l /mnt/`

```
total 4
drwxr-xrwx  3 root  wheel  512 Sep 26 03:34 admin/
```


```
getfacl /mnt/admin
# file: /mnt/admin/
# owner: root
# group: wheel
user:admin:rwx
group:admin:rwx
other::rxx
```

This is my `top` output:

```
top
last pid: 13928;  load averages:  2.22,  2.30,  2.31                                                                 up 3+22:07:19  05:32:03
61 processes:  1 running, 59 sleeping, 1 stopped
CPU:  1.6% user,  0.0% nice, 26.8% system,  0.0% interrupt, 71.5% idle
Mem: 349M Active, 13G Inact, 2381M Wired, 154M Cache, 1643M Buf, 201M Free
Swap: 6144M Total, 104M Used, 6040M Free, 1% Inuse

  PID USERNAME    THR PRI NICE   SIZE    RES STATE   C   TIME    WCPU COMMAND
10465 root          2  20    0   556M 32896K uwait   5  26.0H 100.00% samba
 8960 root          2  20    0   556M 33032K STOP    0  25.9H 100.00% samba
 7079 admin         1  23    0   198M 99024K select  7  31:40   4.20% Xorg
10873 admin        41  20    0  1003M   620M select  7  10:51   2.10% firefox
 7547 admin        22  20    0  1514M  1107M uwait   1 395:12   1.46% VirtualBox
 7160 admin         2  20    0   364M 33032K select  7   3:33   0.29% konsole
 5355 root         38  20    0   532M   144M uwait   6  14:05   0.00% firefox
 7508 admin        10  20    0   135M  5508K uwait   5   1:16   0.00% VBoxSVC
 7506 admin         1  20    0 81164K  2952K select  6   0:29   0.00% VBoxXPCOMIPCD
13707 admin         2  20    0   373M 67628K select  2   0:27   0.00% krdc
 7085 admin         1  20    0   121M  9828K select  3   0:26   0.00% wmaker
  898 haldaemon     2  21    0 60424K  3404K select  4   0:22   0.00% hald
10991 root          1  20    0 16632K  1524K select  3   0:03   0.00% moused
 5262 root          1  20    0 26868K  5592K select  4   0:03   0.00% Xvnc
  841 root          1  20    0 23984K  2552K select  2   0:02   0.00% sendmail
 7191 admin         2  20    0   301M 12768K kqread  0   0:01   0.00% kdeinit4
  848 root          1  20    0 16524K   540K nanslp  7   0:00   0.00% cron
13922 admin         1  20    0   163M 21688K select  2   0:00   0.00% mousepad
  687 root          1  20    0 14436K  1316K select  5   0:00   0.00% syslogd
 7165 admin         1  20    0 17048K  2052K select  3   0:00   0.00% dbus-daemon
 7285 root          1  20    0 23496K  1968K pause   5   0:00   0.00% csh
 5278 root          1  20    0 72684K  2976K select  4   0:00   0.00% xterm
  574 root          1  20    0 13584K   648K select  7   0:00   0.00% devd
  903 root          2  23    0 46236K  2668K select  4   0:00   0.00% hald-runner
11010 root          1  24    0 31880K     0K kqread  6   0:00   0.00% <hald-addon-mouse->
  844 smmsp         1  20    0 23984K  1068K pause   7   0:00   0.00% sendmail
 5269 root          1  20    0 72684K  3304K select  1   0:00   0.00% xterm
 7188 admin         1  20    0   215M  9944K select  1   0:00   0.00% kdeinit4
 5270 root          1  20    0 43356K  1892K select  3   0:00   0.00% twm
13469 admin         1  20    0 52180K  4768K select  6   0:00   0.00% ssh
  744 messagebus    1  20    0 17048K  1904K select  4   0:00   0.00% dbus-daemon
 7186 admin         1  22    0   175M  9272K select  7   0:00   0.00% kdeinit4
 7405 admin         1  20    0 16992K  1628K wait    4   0:00   0.00% sh
 5280 root          1  35    0 23496K  1408K ttyin   6   0:00   0.00% csh
  900 root         18  20    0   121M  4216K waitvt  0   0:00   0.00% console-kit-daemon
  886 root          1  20    0 47660K     0K wait    1   0:00   0.00% <login>
 7167 admin         1  20    0 16992K     0K wait    0   0:00   0.00% <sh>
  902 root          3  20    0 56588K  3136K kqread  5   0:00   0.00% polkitd
  551 _dhcp         1  20    0 14560K  1384K select  1   0:00   0.00% dhclient
```

And the partition:

```
cat  /etc/fstab 
# Device        Mountpoint      FStype  Options Dump    Pass#
/dev/ada0s4a    /               ufs     rw,acls 1       1
/dev/ada0s4b    none            swap    sw      0       0
```

I cannot kill samba with any signal, plus when I reboot it got stuck too. I have to shutdown at force.


----------



## Xenomorph (Jan 14, 2016)

I cannot offer any help, but I landed here through Google searches, trying to find a solution.

Samba 4.1 on FreeBSD 9.3.

Samba hangs the system, possibly after a Mac user connects. We have to power down completely because the system is completely unresponsive.


----------

