Bug 1112618 - SAMBA not starting
SAMBA not starting
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Samba
64bit openSUSE Factory
: P5 - None : Normal (vote)
: ---
Assigned To: Samuel Cabrero
The 'Opening Windows to a Wider World' guys
Depends on:
  Show dependency treegraph
Reported: 2018-10-20 12:01 UTC by Frans de Boer
Modified: 2018-10-23 09:12 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---

used smb.conf (2.01 KB, text/plain)
2018-10-22 09:45 UTC, Frans de Boer

Note You need to log in before you can comment on or make changes to this bug.
Description Frans de Boer 2018-10-20 12:01:08 UTC
Just updated TW with the latest packages (zypper dup ---no-rec) only to
find that Samba is not working anymore, see below:

systemctl start smb.service
Job for smb.service failed because the control process exited with error
See "systemctl status smb.service" and "journalctl -xe" for details.
pws1:~ # systemctl status smb.service
● smb.service - Samba SMB Daemon
    Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor
preset: disabled)
    Active: failed (Result: exit-code) since Fri 2018-10-19 22:09:58
CEST; 6s ago
   Process: 8913 ExecStart=/usr/sbin/smbd --foreground
--no-process-group $SMBDOPTIONS (code=exited, status=255)
   Process: 8912
(code=exited, status=0/SUCCESS)
  Main PID: 8913 (code=exited, status=255)

Oct 19 22:09:57 pws1 systemd[1]: Starting Samba SMB Daemon...
Oct 19 22:09:58 pws1 smbd[8913]: [2018/10/19 22:09:58.212377,  0]
Oct 19 22:09:58 pws1 smbd[8913]:   create_local_token failed:
Oct 19 22:09:58 pws1 smbd[8913]: [2018/10/19 22:09:58.242258,  0]
Oct 19 22:09:58 pws1 smbd[8913]:   ERROR: failed to setup guest info.
Oct 19 22:09:58 pws1 systemd[1]: smb.service: Main process exited,
code=exited, status=255/n/a
Oct 19 22:09:58 pws1 systemd[1]: smb.service: Failed with result
Oct 19 22:09:58 pws1 systemd[1]: Failed to start Samba SMB Daemon.

Same smb.conf used under Leap 15 was working correctly.
Comment 1 Samuel Cabrero 2018-10-22 08:22:39 UTC
Hi Frans,

this occurs when winbind is running in a stand-alone server setup because starting with samba 4.9 the guest handling is expanded to differentiate between anonymous and guest sessions. The solution is to set a writable ID mapping backend in smb.conf, like:

idmap config * : backend = tdb
idmap config * : range = 10000 - 20000

or to create the required mapping manually by running:

net groupmap add sid=S-1-5-32-546 unixgroup=nogroup type=builtin
Comment 2 Frans de Boer 2018-10-22 09:45:58 UTC
Created attachment 786657 [details]
used smb.conf
Comment 3 Frans de Boer 2018-10-22 09:47:42 UTC
Alas, this did not worked.
I added the idmap config lines, to no avail.
I even installed samba_winbind, with the same result.
Comment 4 Frans de Boer 2018-10-23 09:12:24 UTC
Although I do not fully understand yet the meaning of the next command, It did the trick.

  net groupmap add sid=S-1-5-32-546 unixgroup=nogroup type=builtin

I noticed that nogroup is (probably) added to the group_mapping.tbd file, but fail to understand why using this sid value and the unix group nogroup is used.