If you insist that it is the expected output, then we have a bug in
all linux distributions. All of them!
For example this is latest fedora:
[kasak at kasakoff ~]$ smbclient -N -L localhost
Sharename Type Comment
--------- ---- -------
print$ Disk Printer Drivers
share Disk
IPC$ IPC IPC Service (Samba 4.18.3)
SMB1 disabled -- no workgroup available
[kasak at kasakoff ~]$ smbclient -V
Version 4.18.3
And this is arch linux:
servicedesk% smbclient -N -L localhost
Sharename Type Comment
--------- ---- -------
IPC$ IPC IPC Service (Samba 4.18.2)
SMB1 disabled -- no workgroup available
servicedesk% smbclient -V
Version 4.18.2
??, 3 ???. 2023??. ? 15:27, Rowland Penny via samba <samba at
lists.samba.org>:>
>
>
> On 03/07/2023 13:01, ???? ?????? via samba wrote:
> > hello everyone!
> >
> > I'm using samba on OpenBSD and there is unusual behavior in it!
> >
> > The problem is [homes] share, it erroneously map nobody as a home
share
> > for guest user.
> >
> > I noticed this with upgrading from 4.15 to 4.17.
> >
> > Please have a look at this simple config:
> >
> > ---
> >
> > [global]
> > map to guest = Bad User
> >
> > [homes]
> > browseable = no
> > writable = yes
> >
> > ---
> >
> > With this config I have this listing:
> >
> > -----
> >
> > [kasak at kasakoff ~]$ smbclient -L localhost
> > Password for [WORKGROUP\kasak]:
> >
> > Sharename Type Comment
> > --------- ---- -------
> > IPC$ IPC IPC Service (Samba 4.17.6)
> > nobody Disk Home directory of nobody
> > SMB1 disabled -- no workgroup available
>
> Does the user 'kasak' exist as a Samba user ?
> If it doesn't, then that is the expected output. The unknown or
'bad'
> user gets mapped to the guest user (usually 'nobody') and
'[homes]'
> shows a home directory for the guest user. If you run 'getent passwd
> nobody', you will get output similar to this:
>
> nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
>
> From that you should be able to see that the users home directory path
> is '/nonexistent', which means nowhere and even if it did have a
valid
> path, the user wouldn't be able to logon locally because it isn't
> allowed to.
>
> If you were to try with a valid Samba user, the 'nobody' in the
> smbclient command output should change to the valid users name.
>
> Rowland
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions: https://lists.samba.org/mailman/options/samba