You are not logged in.

#1 2013-07-16 20:58:00

mitch_feaster
Member
From: San Diego, CA
Registered: 2011-02-27
Posts: 55
Website

Can't start samba (complaining about how I'm using the 'samba' binary)

I'm unable to start samba:

➜  ~  sudo systemctl start samba.service 
➜  ~  sudo systemctl status samba.service
samba.service - Samba AD Daemon
   Loaded: loaded (/usr/lib/systemd/system/samba.service; enabled)
   Active: failed (Result: exit-code) since Tue 2013-07-16 13:44:46 PDT; 2s ago
  Process: 22130 ExecStart=/usr/bin/samba $SAMBAOPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 22131 (code=exited, status=1/FAILURE)
   CGroup: name=systemd:/system/samba.service

Jul 16 13:44:46 mitchelh-linux systemd[1]: Starting Samba AD Daemon...
Jul 16 13:44:46 mitchelh-linux systemd[1]: Started Samba AD Daemon.
Jul 16 13:44:46 mitchelh-linux systemd[1]: samba.service: main process exited, code=exited, status=1/FAILURE
Jul 16 13:44:46 mitchelh-linux systemd[1]: Unit samba.service entered failed state.

Here is the error message I'm getting in the samba log (which is actually named `/var/log/samba/%m.log', which is quite fishy):

[2013/07/16 13:44:46,  0] ../source4/smbd/server.c:369(binary_smbd_main)
  samba version 4.0.7 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2012
[2013/07/16 13:44:46,  0] ../source4/smbd/server.c:461(binary_smbd_main)
  At this time the 'samba' binary should only be used for either:
  'server role = active directory domain controller' or to access the ntvfs file server with 'server services = +smb' or the rpc proxy with 'dcerpc endpoint servers = remote'
  You should start smbd/nmbd/winbindd instead for domain member and standalone file server tasks

I'm using the default configuration, i simply cp'd smb.conf.default to smb.conf. Prior to attempting to start samba I have already started nmbd, smbd, and winbindd for good measure:

➜  ~  sudo systemctl status nmbd.service 
nmbd.service - Samba NetBIOS name server
   Loaded: loaded (/usr/lib/systemd/system/nmbd.service; enabled)
   Active: active (running) since Tue 2013-07-16 13:33:35 PDT; 15min ago
 Main PID: 21856 (nmbd)
   CGroup: name=systemd:/system/nmbd.service
           └─21856 /usr/bin/nmbd -D

Jul 16 13:33:35 mitchelh-linux systemd[1]: Started Samba NetBIOS name server.
➜  ~  sudo systemctl status smbd.service
smbd.service - Samba SMB/CIFS server
   Loaded: loaded (/usr/lib/systemd/system/smbd.service; enabled)
   Active: active (running) since Tue 2013-07-16 13:33:38 PDT; 15min ago
 Main PID: 21864 (smbd)
   CGroup: name=systemd:/system/smbd.service
           ├─21864 /usr/bin/smbd -D
           └─21868 /usr/bin/smbd -D

Jul 16 13:33:38 mitchelh-linux systemd[1]: Started Samba SMB/CIFS server.
➜  ~  sudo systemctl status winbindd.service 
winbindd.service - Samba Winbind daemon
   Loaded: loaded (/usr/lib/systemd/system/winbindd.service; enabled)
   Active: active (running) since Tue 2013-07-16 13:36:23 PDT; 12min ago
 Main PID: 21990 (winbindd)
   CGroup: name=systemd:/system/winbindd.service
           ├─21990 /usr/bin/winbindd -D
           └─21993 /usr/bin/winbindd -D

Jul 16 13:36:23 mitchelh-linux winbindd[21990]: [2013/07/16 13:36:23.484545,  0] ../source3/winbindd/winbindd_cache.c:3179(initialize_winbindd_cache)
Jul 16 13:36:23 mitchelh-linux winbindd[21990]: initialize_winbindd_cache: clearing cache and re-creating with version number 2
Jul 16 13:36:23 mitchelh-linux systemd[1]: Started Samba Winbind daemon.

and testparm seems to check out:

➜  ~  testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[homes]"
Processing section "[printers]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
        workgroup = MYGROUP
        server string = Samba Server
        log file = /var/log/samba/%m.log
        max log size = 50
        printcap name = /etc/printcap
        dns proxy = No
        idmap config * : backend = tdb

[homes]
        comment = Home Directories
        read only = No
        browseable = No

[printers]
        comment = All Printers
        path = /var/spool/samba
        printable = Yes
        print ok = Yes
        browseable = No

Any ideas as to what's going on? The only references to that error message that I could find on the Internet were instances of mismatched samba/config versions. Is the smb.conf that ships with samba really broken??

I've also tried commenting out the `homes' and `printers' shares.

Offline

#2 2013-07-16 21:10:42

FlyingHappy
Member
From: Cincinnati, OH
Registered: 2011-04-18
Posts: 192

Re: Can't start samba (complaining about how I'm using the 'samba' binary)

One of your error codes pretty much tells it to you   smile

You need to run these commands...

# systemctl start smbd.service
#systemctl start nmbd.service

Offline

#3 2013-07-16 21:12:26

mitch_feaster
Member
From: San Diego, CA
Registered: 2011-02-27
Posts: 55
Website

Re: Can't start samba (complaining about how I'm using the 'samba' binary)

Have another look at my post wink.

Specifically this area:

Prior to attempting to start samba I have already started nmbd, smbd, and winbindd for good measure:

Offline

#4 2013-07-16 21:15:04

FlyingHappy
Member
From: Cincinnati, OH
Registered: 2011-04-18
Posts: 192

Re: Can't start samba (complaining about how I'm using the 'samba' binary)

Wow, totally looked past that.  Are you sure you don't have the b and d reversed, I had that problem when I was first setting it up.  Do you get the same error messages with smbd and nmbd?

Offline

#5 2013-07-16 21:17:12

mitch_feaster
Member
From: San Diego, CA
Registered: 2011-02-27
Posts: 55
Website

Re: Can't start samba (complaining about how I'm using the 'samba' binary)

The b's and d's look okay.

Do you get the same error messages with smbd and nmbd?

Do you mean if I swap the order in which I start them? Yes, same result.

Offline

#6 2013-10-10 07:51:19

ipyakuza1911
Member
Registered: 2013-09-03
Posts: 6

Re: Can't start samba (complaining about how I'm using the 'samba' binary)

Did you ever get any further on this?  I am hitting a wall here as well.  My digging shows that samba 4 dropped security = share mode and I get they are snapping into the Microsoft Domain model for permissions/security.  I am able to start nmbd and winbindd (systemctl status shows them both active) but samba always complains with:

[root@localhost ~]# systemctl status samba
samba.service - Samba AD Daemon
   Loaded: loaded (/usr/lib/systemd/system/samba.service; enabled)
   Active: failed (Result: exit-code) since Thu 2013-10-10 10:45:35 JST; 2min 36s ago
  Process: 2482 ExecStart=/usr/bin/samba $SAMBAOPTIONS (code=exited, status=0/SUCCESS)
Main PID: 2483 (code=exited, status=1/FAILURE)

Oct 10 10:45:35 localhost samba[2482]: samba version 4.0.10 started.
Oct 10 10:45:35 localhost samba[2482]: Copyright Andrew Tridgell and the Samba Team 1992-2012
Oct 10 10:45:35 localhost systemd[1]: PID file /var/run/samba.pid not readable (yet?) after start.
Oct 10 10:45:35 localhost systemd[1]: Started Samba AD Daemon.
Oct 10 10:45:35 localhost samba[2483]: [2013/10/10 10:45:35.509158,  0] ../source4/smbd/server.c:475(binary_smbd_main)
Oct 10 10:45:35 localhost samba[2483]: At this time the 'samba' binary should only be used for either:
Oct 10 10:45:35 localhost samba[2483]: 'server role = active directory domain controller' or to access the ntvfs file server with 'server services = +smb' or the rpc proxy with 'dce...ers = remote'
Oct 10 10:45:35 localhost samba[2483]: You should start smbd/nmbd/winbindd instead for domain member and standalone file server tasks
Oct 10 10:45:35 localhost systemd[1]: samba.service: main process exited, code=exited, status=1/FAILURE
Oct 10 10:45:35 localhost systemd[1]: Unit samba.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost ~]#

My smb.conf is pretty basic and I am following this reference: http://obihoernchen.net/wordpress/877/s … rch-linux/

SMB.CONF:

[root@localhost ~]# cat /etc/samba/smb.conf
[global]
   workgroup = WORKGROUP
   server string = TEST
   netbios name = TEST
   # hosts allow = 192.168.1.
   printcap name = /dev/null
   load printers = no
   disable spoolss = yes
   printing = bsd
   log file = /var/log/samba/log.%m
   max log size = 50
   security = user
   dns proxy = no

   # For public share without login
   map to guest = Bad User

   # Android bugix for reading files (samba4 bug see: https://bugzilla.samba.org/show_bug.cgi?id=9706)
   unix extensions = false

   # Fix for file batch copy issues (see: http://archlinuxarm.org/forum/viewtopic … 18&t=4864)
   oplocks = no
   level2 oplocks = no

   # Some Tuning (See Optimize Performance)
   socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536
   write cache size = 2097152
   getwd cache = yes
   min receivefile size = 16384

   # Global security
   public = yes

#============================ Share Definitions ==============================

# Public, read only
#[Videos]
#        comment = Videos for all
#        read only = yes
#        # use this only for read only shares!
#        fake oplocks = yes
#        path = /media/zincobi/Videos
#
# Public, writeable
#[Abrechnungen]
#        comment = Abrechnungen
#        read only = no
#        writeable = yes
#        path = /media/zincobi/Abrechnungen
#
# whole HDD, only for fabian
#[zincobi]
#        comment = Fabians share
#        public = no
#        valid users = fabian
#        read only = no
#        writeable = yes
#        path = /media/zincobi
[Stuff]
    comment = test stuff
    read only = no
    writeable = yes
    path = /home/test

[root@localhost ~]#

testparm results:

[root@localhost ~]# testparm /etc/samba/smb.conf
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[Website]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
    netbios name = TEST
    server string = TEST
    map to guest = Bad User
    log file = /var/log/samba/log.%m
    max log size = 50
    min receivefile size = 16384
    unix extensions = No
    socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536
    load printers = No
    printcap name = /dev/null
    disable spoolss = Yes
    dns proxy = No
    idmap config * : backend = tdb
    guest ok = Yes
    write cache size = 2097152
    printing = bsd
    print command = lpr -r -P'%p' %s
    lpq command = lpq -P'%p'
    lprm command = lprm -P'%p' %j
    oplocks = No
    level2 oplocks = No

[Stuff]
    comment = test stuff
    path = /home/test
    read only = No

Offline

#7 2013-10-27 14:33:51

vilarneto
Member
Registered: 2013-10-27
Posts: 1

Re: Can't start samba (complaining about how I'm using the 'samba' binary)

I've just had the same problem. You should activate smbd, NOT samba:

sudo systemctl start smbd

Regards,

--
Vilar

Offline

#8 2018-05-22 17:31:13

severoraz
Member
Registered: 2015-09-21
Posts: 8

Re: Can't start samba (complaining about how I'm using the 'samba' binary)

For future reference, the smbd/nmbd/winbindd services seem to have been renamed to smb/nmb/winbind in at least samba 4.8.1-1

Offline

#9 2018-05-22 17:55:02

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Can't start samba (complaining about how I'm using the 'samba' binary)

@severoraz,

Please take the time to familiarise yourself with the forum Code of Conduct, especially the sections regarding necro-bumping and empty posts.

I'm going to close this old thread now.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

Board footer

Powered by FluxBB