CB2: xinetd does not start samba

Hi everyone,

My goal is to have Samba server running on my CB2 all the time. This means that whenever I reboot my CB2, I want Samba to start and continue running. The issue is that currently Samba does not start when CB2 boots. So I started investigating. As far as I can read online, in CB2 Samba is launched within xinetd. When I reboot my CB2, I can see that xinetd is running, yet samba processes are not.

Then I dug deeper. I looked at whether samba is present at /etc/xinetd.d/ and whether xinetd.conf is correct. Below we can see that the samba file is there and configuration should be correct (as far as I can tell - maybe there’s something wrong here?).

atv@appletv:~$ ls /etc/xinetd.d/
chargen  daytime  discard  echo  ftp  samba  ssh  time


atv@appletv:~$ sudo nano /etc/xinetd.d/samba
service netbios-ssn
{
        disable = no
        id = netbios-ssn
        # port = netbios-ssn
        socket_type = stream
        protocol = tcp
        user = root
        wait = no
        instances = 2
        server = /usr/sbin/smbd
}

service netbios-ns
{
        disable = no
        id = netbios-ns
        # port = netbios-ns
        socket_type = dgram
        protocol = udp
        user = root
        wait = yes
        instances = 1
        server = /usr/sbin/nmbd
}

tv@appletv:~$ sudo nano /etc/xinetd.conf
# Simple configuration file for xinetd
#
# Some defaults, and include /etc/xinetd.d/

defaults
{

# Please note that you need a log_type line to be able to use log_on_success
# and log_on_failure. The default is the following :
# log_type = SYSLOG daemon info

}

includedir /etc/xinetd.d

Then I tried to manually stop and start xinetd in hope that it would start Samba, but unfortunately it does not start samba. The xinetd process runs though.

atv@appletv:~$ sudo initctl stop xinetd
atv@appletv:~$ sudo initctl start xinetd

atv@appletv:~$ ps aux
root      1470  0.0  0.3   2560   984 ?        Ss   13:51   0:00 /usr/sbin/xinetd -dontfork -pidfile /var/run/xinetd.pid -stayalive -inetd_compat -inetd_ipv6

Next, I tried to just check whether samba will run if I start it manually. So I run the following two commands, and to my surprise both samba processes started and samba run successfully - I can successfully access the samba share from OS X Finder:

atv@appletv:~$ sudo /usr/sbin/smbd
atv@appletv:~$ sudo /usr/sbin/nmbd

atv@appletv:~$ ps aux
root      4643  0.0  1.3  21396  3384 ?        Ss   13:26   0:00 /usr/sbin/smbd
root      4645  0.0  0.5  21500  1340 ?        S    13:26   0:00 /usr/sbin/smbd
root      4670  0.0  0.7  13320  1772 ?        Ss   13:27   0:00 /usr/sbin/nmbd

This all suggests that the issue lies within xinetd , because it simply does not start the two Samba processes. Can someone please tell me what could be the cause for this? Where should I check what services xinetd actually starts? Perhaps xinetd does not start any processes at all (not only samba). I am ready to provide any extra information necessary. Thanks!