Bug 14230 - getgrset returns null if user not present locally
Summary: getgrset returns null if user not present locally
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Winbind (show other bugs)
Version: 4.10.11
Hardware: PPC AIX
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-06 13:50 UTC by Ayappan
Modified: 2020-01-06 14:39 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ayappan 2020-01-06 13:50:45 UTC
In ADS mode, Samba in AIX errors saying "getgrset returned (NULL)" if that user is not present locally (ie., in /etc/passwd ).

Attaching the logs here., 

[2020/01/06 18:02:21.283387, 10, pid=6029482, effective(0, 0), real(0, 0), class=winbind] ../../source3/winbindd/winbindd.c:810(process_request_done)
  process_request_done: [<unknown>(5308492):GETPWUID]: NT_STATUS_OK
[2020/01/06 18:02:21.283469, 10, pid=6029482, effective(0, 0), real(0, 0), class=winbind] ../../source3/winbindd/winbindd.c:854(process_request_written)
  process_request_written: [<unknown>(5308492):GETPWUID]: delivered response to client
[2020/01/06 18:02:21.283682, 10, pid=5308492, effective(0, 0), real(0, 0)] ../../source3/lib/system_smbd.c:176(sys_getgrouplist)
  sys_getgrouplist: user [testsamba]
[2020/01/06 18:02:21.284709, 10, pid=5308492, effective(0, 0), real(0, 0)] ../../source3/lib/system_smbd.c:46(getgrouplist_getgrset)
  getgrset returned (NULL)
[2020/01/06 18:02:21.284747, 10, pid=5308492, effective(0, 0), real(0, 0)] ../../source3/lib/system_smbd.c:176(sys_getgrouplist)
  sys_getgrouplist: user [testsamba]
[2020/01/06 18:02:21.285556, 10, pid=5308492, effective(0, 0), real(0, 0)] ../../source3/lib/system_smbd.c:46(getgrouplist_getgrset)
  getgrset returned (NULL)
[2020/01/06 18:02:21.285593,  0, pid=5308492, effective(0, 0), real(0, 0)] ../../source3/lib/system_smbd.c:226(getgroups_unix_user)
  get_user_groups: failed to get the unix group list
[2020/01/06 18:02:21.285679,  1, pid=5308492, effective(0, 0), real(0, 0)] ../../source3/auth/token_util.c:593(add_local_groups)
  getgroups_unix_user for user testsamba failed
[2020/01/06 18:02:21.285715,  3, pid=5308492, effective(0, 0), real(0, 0)] ../../source3/auth/token_util.c:398(create_local_nt_token_from_info3)
  Failed to add local groups
[2020/01/06 18:02:21.285747, 10, pid=5308492, effective(0, 0), real(0, 0)] ../../source3/auth/auth_ntlmssp.c:83(auth3_generate_session_info)
  create_local_token failed: NT_STATUS_UNSUCCESSFUL
Comment 1 Ayappan 2020-01-06 13:54:52 UTC
I have to do mkuser <user> to make it work (which i think may not be required).

# mkuser testsamba
# /opt/freeware/bin/smbclient -L localhost -U testsamba
Enter IN\testsamba's password:

        Sharename       Type      Comment
        ---------       ----      -------
        samba_share     Disk
        IPC$            IPC       IPC Service (Samba 4.10.11)
Reconnecting with SMB1 for workgroup listing.

        Server               Comment
        ---------            -------
        AIXOSS2              Samba 4.10.11

        Workgroup            Master
        ---------            -------
        IN                   AIXOSS2

So i guess there could be some configuration issue or build issue in my case.
Any hint will be greatly helpful.