Bug 1597087

Summary: SMB: create_local_token failed: NT_STATUS_NO_MEMORY
Product: Red Hat Enterprise Linux 7 Reporter: xiaoli feng <xifeng>
Component: sambaAssignee: Andreas Schneider <asn>
Status: CLOSED NOTABUG QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: urgent    
Version: 7.6CC: amitkuma, asn, gdeschner, jarrpa, jstephen, xifeng, xzhou
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-06 01:45:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description xiaoli feng 2018-07-02 03:21:08 UTC
Description of problem:
When I start smb service, it's failed(server and client are linux). 

7月 01 23:05:24 ibm-x3650m4-01-vm-11.lab.eng.bos.redhat.com systemd[1]: Starting Samba SMB Daemon...
7月 01 23:05:24 ibm-x3650m4-01-vm-11.lab.eng.bos.redhat.com smbd[2616]: [2018/07/01 23:05:24.292551,  0] ../source3/auth/auth_util.c:1372(make_new_session_info_guest)
7月 01 23:05:24 ibm-x3650m4-01-vm-11.lab.eng.bos.redhat.com smbd[2616]:   create_local_token failed: NT_STATUS_NO_MEMORY
7月 01 23:05:24 ibm-x3650m4-01-vm-11.lab.eng.bos.redhat.com systemd[1]: smb.service: main process exited, code=exited, status=255/n/a
7月 01 23:05:24 ibm-x3650m4-01-vm-11.lab.eng.bos.redhat.com systemd[1]: Failed to start Samba SMB Daemon.
7月 01 23:05:24 ibm-x3650m4-01-vm-11.lab.eng.bos.redhat.com systemd[1]: Unit smb.service entered failed state.
7月 01 23:05:24 ibm-x3650m4-01-vm-11.lab.eng.bos.redhat.com systemd[1]: smb.service failed.

smb.conf:
[root@ibm-x3650m4-01-vm-11 ~]# cat /etc/samba/smb.conf
[global]
    workgroup = RHTS
    realm = RHQE.COM
    security = ads
    server signing = auto
    kerberos method = system keytab

[cifs]
    path = /mnt/testarea/server
    writeable = yes


But if remove "security = ads", the smb service can be started.

Version-Release number of selected component (if applicable):
samba-4.8.2-1.el7.x86_64
samba-client-4.8.2-1.el7.x86_64
3.10.0-915.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. setup the smb.conf like Description
2. start smb service
3.

Actual results:
start smb service failed

Expected results:
start smb service successfully

Additional info:

Comment 4 Andreas Schneider 2018-07-02 06:58:05 UTC
Is this a Samba File Server running with sssd?

Comment 5 xiaoli feng 2018-07-02 07:54:48 UTC
(In reply to Andreas Schneider from comment #4)
> Is this a Samba File Server running with sssd?

It's a samba file server. But sssd service doesn't start.

Comment 6 Andreas Schneider 2018-07-02 10:29:31 UTC
If you use 'security = ads' normally winbind should be running and the smb.conf should be set up accordingly.

See:

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-file_and_print_servers

Comment 7 Andreas Schneider 2018-07-02 15:01:56 UTC
If this is only a file server, then you need to setup a fileserver. If you want to have an AD member set it up correctly. See the documentation above.

Comment 8 Andreas Schneider 2018-07-02 15:03:04 UTC
If you need help you should be more precise about what you want to achieve.

Comment 9 xiaoli feng 2018-07-03 11:46:32 UTC
(In reply to Andreas Schneider from comment #7)
> If this is only a file server, then you need to setup a fileserver. If you
> want to have an AD member set it up correctly. See the documentation above.

Do you mean MS file server? I didn't use MS file server here. And I also didn't want to have an AD member. In RHEL-7.5, this config in the Description works fine. And it needs "security = ads" even if doesn't use MS file server.

Comment 10 Andreas Schneider 2018-07-04 15:29:56 UTC
Which description are you talking about?


https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-file_and_print_servers

16.1.4. Setting up Samba as a Standalone Server


Doesn't tell you that you should set 'security = ads' at all.

Comment 14 Andreas Schneider 2018-07-05 15:55:47 UTC
From the Samba release notes of 4.8.0:


  Domain member setups require winbindd
  -------------------------------------

  Setups with "security = domain" or "security = ads" require a
  running 'winbindd' now. The fallback that smbd directly contacts
  domain controllers is gone.


The configuration from the initial description is incorrect anyway, it won't work.

Comment 15 xiaoli feng 2018-07-06 01:45:01 UTC
Thanks Andreas and Amit. In this case, the winbind or sssd service aren't started. And the same smb.conf can work on samba-4.7.1-6.el7. From the comment 14, I know this is a configuration issue after update to samba-4.8. So I will close this bug as NOTABUG.