[Samba] Map to Guest not working

Andrey Repin anrdaemon at yandex.ru
Sun Apr 19 16:24:38 MDT 2015


Greetings, Brian C. Huffman!

> I've migrated a share from an older samba server (3.0.33) running on a
> Sun Solaris box to a newer samba server (3.6.23) running on a RedHat 
> Linux 6 box.

> For the most part I've tried to keep the configuration the same (simply 
> to make the migration easier since I'm not an expert on Samba config 
> options).

> I got the authentication working (security=domain) but now I'm finding 
> that users that don't have an account on the samba server can not get 
> access to the share.  This was not the case on the old server.

> It appears that the following option should allow that to happen but it 
> doesn't seem to be working on the new server:
>          guest account = nobody
>          map to guest = Bad Uid

> I see this in the logs when the user tries to login:

>    Trying _Get_Pwnam(), username as given is DS\bhuffman
> [2015/04/19 16:07:38.221277,  5] lib/username.c:134(Get_Pwnam_internals)
>    Trying _Get_Pwnam(), username as uppercase is DS\BHUFFMAN
> [2015/04/19 16:07:38.221334,  5] lib/username.c:143(Get_Pwnam_internals)
>    Checking combinations of 0 uppercase letters in ds\bhuffman
> [2015/04/19 16:07:38.221375,  5] lib/username.c:149(Get_Pwnam_internals)
>    Get_Pwnam_internals didn't find user [DS\bhuffman]!
> [2015/04/19 16:07:38.221415,  5] lib/username.c:171(Get_Pwnam_alloc)
>    Finding user bhuffman
> [2015/04/19 16:07:38.221454,  5] lib/username.c:116(Get_Pwnam_internals)
>    Trying _Get_Pwnam(), username as lowercase is bhuffman
> [2015/04/19 16:07:38.221545,  5] lib/username.c:134(Get_Pwnam_internals)
>    Trying _Get_Pwnam(), username as uppercase is BHUFFMAN
> [2015/04/19 16:07:38.221612,  5] lib/username.c:143(Get_Pwnam_internals)
>    Checking combinations of 0 uppercase letters in bhuffman
> [2015/04/19 16:07:38.221653,  5] lib/username.c:149(Get_Pwnam_internals)
>    Get_Pwnam_internals didn't find user [bhuffman]!
> [2015/04/19 16:07:38.221701,  5] lib/username.c:171(Get_Pwnam_alloc)
>    Finding user bhuffman
> [2015/04/19 16:07:38.221741,  5] lib/username.c:116(Get_Pwnam_internals)
>    Trying _Get_Pwnam(), username as lowercase is bhuffman
> [2015/04/19 16:07:38.221796,  5] lib/username.c:134(Get_Pwnam_internals)
>    Trying _Get_Pwnam(), username as uppercase is BHUFFMAN
> [2015/04/19 16:07:38.221853,  5] lib/username.c:143(Get_Pwnam_internals)
>    Checking combinations of 0 uppercase letters in bhuffman
> [2015/04/19 16:07:38.221893,  5] lib/username.c:149(Get_Pwnam_internals)
>    Get_Pwnam_internals didn't find user [bhuffman]!
> [2015/04/19 16:07:38.221932,  3] auth/auth_util.c:1073(check_account)
>    Failed to find authenticated user DS\bhuffman via getpwnam(), denying 
> access.
> [2015/04/19 16:07:38.222590,  5] auth/auth.c:281(check_ntlm_password)
>    check_ntlm_password: winbind authentication for user [bhuffman] 
> FAILED with error NT_STATUS_NO_SUCH_USER
> [2015/04/19 16:07:38.222650,  2] auth/auth.c:330(check_ntlm_password)
>    check_ntlm_password:  Authentication for user [bhuffman] -> 
> [bhuffman] FAILED with error NT_STATUS_NO_SUCH_USER
> [2015/04/19 16:07:38.222701,  3] smbd/error.c:81(error_packet_set)
>    error packet at smbd/sesssetup.c(124) cmd=115 (SMBsesssetupX) 
> NT_STATUS_LOGON_FAILURE

It seems Samba unable to find the user in first place.
In which case, "bad uid" is unlikely to work, I guess, as it gets no UID
whatsoever.
You will need to review your configuration link to the domain.

> Here is my full smb.conf:
> [global]
>          workgroup = XY
>          server string = File Server
>          netbios name = SERVER01

>          security = domain
>          encrypt passwords = Yes
>          password server = a.b.c.d

>          guest account = nobody
>          map to guest = Bad Uid

>          wins server = a.b.c.d
>          load printers = no
>          cups options = raw


> [share]
>     comment = Data
>     path = /data/share
>     public = yes
>     writable = no
>     printable = no

First, I don't see "guest ok = yes" on your share.
Second, try with "map to guest = bad user", if you don't want to fix the link
to your domain proper.


-- 
With best regards,
Andrey Repin
Monday, April 20, 2015 01:16:56

Sorry for my terrible english...



More information about the samba mailing list