[Samba] need help to find bug

Rowland Penny rpenny at samba.org
Mon Jul 3 12:26:44 UTC 2023



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



More information about the samba mailing list