Bug 15064 - map to guest = bad user broken
Summary: map to guest = bad user broken
Status: RESOLVED WORKSFORME
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: 4.16.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-12 05:41 UTC by Björn Jacke
Modified: 2022-07-18 14:46 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 Björn Jacke 2022-05-12 05:41:15 UTC
An AD joined Samba member server, where "map to guest = bad user" is set and an invalid AD account tries to log in, then map to guest does not work, see also:

https://lists.samba.org/archive/samba/2019-February/221248.html
Comment 1 Rowland Penny 2022-07-18 14:46:01 UTC
(In reply to Björn Jacke from comment #0)

Closing this because:

A) It was 'bad uid' in the mailing list discussion.

B) I works for me, whether I use 'bad user' or 'bad uid'

In smb.conf on the server:
    ....
    map to guest = Bad Uid
    ....

[acltest1]
    path = /srv/acl1
    read only = no
    guest ok = yes

I had to set 'map to guest = Bad Uid' instead of 'map to guest = Bad User' on the client, because smbclient kept using the latter (and it worked).

rowland@devstation:~$ smbclient //server/acltest1 -U bjorn
Password for [SAMDOM\bjorn]:
Try "help" to get a list of possible commands.
smb: \> 

There is no user called 'bjorn' anywhere in my network.