saltstack-formulas / samba-formula

http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
16 stars 72 forks source link

smb service on CentOS7: NT_STATUS_NO_MEMORY #60

Closed noelmcloughlin closed 5 years ago

noelmcloughlin commented 5 years ago

The smb service is broken on CentOS7 with samba-0-4.8.3-4.

[adm@myhost ~]$ head /etc/os-release 
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"

Testparm reports no Errors and idmap config is setup correctly. Logs report failure.

Apr 08 08:07:41 myhost smbd[18563]:   create_local_token failed: NT_STATUS_NO_MEMORY
Apr 08 08:07:41 myhost smbd[18563]:   ERROR: failed to setup guest info.
Apr 08 08:07:41 myhost systemd[1]: smb.service: main process exited, code=exited, status=255/n/a
Apr 08 08:07:41 myhost systemd[1]: Failed to start Samba SMB Daemon.
-- Subject: Unit smb.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit smb.service has failed.
-- 
-- The result is failed.
Apr 08 08:07:41 myhost systemd[1]: Unit smb.service entered failed state.
Apr 08 08:07:41 myhost systemd[1]: smb.service failed.

Ahh, CentOS is forcing hidden dependency on its ssd package - that's naughty!!!

SOLUTION (install sssd-libwbclient) : ```

[adm@myhost ~]$ sudo yum install sssd-libwbclient -y
.. etc ...                                                              
Installed:
  sssd-libwbclient.x86_64 0:1.16.2-13.el7_6.5                                                                                 
Complete!

[adm@myhost ~]$ systemctl restart smb
[adm@myhost ~]$ systemctl status smb
● smb.service - Samba SMB Daemon
   Loaded: loaded (/usr/lib/systemd/system/smb.service; disabled; vendor preset: disabled)
   Active: active (running) since Mon 2019-04-08 08:17:50 MDT; 11s ago
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)
 Main PID: 18941 (smbd)
   Status: "smbd: ready to serve connections..."
    Tasks: 4
   CGroup: /system.slice/smb.service
           ├─18941 /usr/sbin/smbd --foreground --no-process-group
           ├─18944 /usr/sbin/smbd --foreground --no-process-group
           ├─18945 /usr/sbin/smbd --foreground --no-process-group
           └─18958 /usr/sbin/smbd --foreground --no-process-group

Apr 08 08:17:50 myhost smbd[18941]:   Unknown parameter encountered: "winbind trusted domains only"
Apr 08 08:17:50 myhost smbd[18941]: [2019/04/08 08:17:50.462348,  0] ../lib/param/loadparm.c:1811(lpcfg_do_global_parameter)
Apr 08 08:17:50 myhost smbd[18941]:   Ignoring unknown parameter "winbind trusted domains only"
Apr 08 08:17:50 myhost smbd[18941]: [2019/04/08 08:17:50.463062,  0] ../lib/param/loadparm.c:1016(lpcfg_service_ok)
Apr 08 08:17:50 myhost smbd[18941]:   WARNING: No path in service files - making it unavailable!
Apr 08 08:17:50 myhost smbd[18941]: [2019/04/08 08:17:50.647947,  0] ../lib/util/become_daemon.c:138(daemon_ready)
Apr 08 08:17:50 myhost smbd[18941]:   daemon_ready: STATUS=daemon 'smbd' finished starting up and ready to serve connections
Apr 08 08:17:50 myhost systemd[1]: Started Samba SMB Daemon.
Apr 08 08:17:51 myhost smbd[18941]: [2019/04/08 08:17:51.056669,  0] ../source3/printing/nt_printing.c:249(nt_printing_init)
Apr 08 08:17:51 myhost smbd[18941]:   nt_printing_init: error checking published printers: WERR_ACCESS_DENIED

Samba service is now working