The Samba-Bugzilla – Bug 3534
users.map does not take the default = * at the end when the user is not mapped
Last modified: 2006-03-01 09:33:09 UTC
We have installed version 3.0.21b and copied smb.conf and users.map from the old 2.2.5. We use Samba just to share AIX files and directories with windows boxes, so we only need to map Windows users to de AIX users through users.map. These are our smb.conf and users.map files:
workgroup = EAENT4DOM
netbios name = NEPTUNO
server string = Servidor de Datos
interfaces = en4
security = SERVER
password server = uno dos
username map = /usr/local/samba/lib/users.map
log file = /var/samba/log/log.%m
max log size = 50
deadtime = 15
load printers = No
show add printer wizard = No
wins server = tres
create mask = 0664
domain master = no
local master = no
preferred master = no
comment = Documentacion Scaneada
path = /home/explota
read list = faxcat
write list = explota cierres scan
read only = No
directory mask = 0775
default case = upper
and the users.map looks like this:
!explota = user1 user2
!cierres = user3 user4
!scan = user5 user6
faxcat = *
This configuration was working fine with 2.2.5, but with 3.0.21b the configuration has the next issues:
If user7 is added to either explota, cierres or scan it works as expected, but if no user is defined and faxcat is supposed to be the default, access to \\neptuno\scan_general shows a window in the windows client machine asking for a user and a password.
If faxcat is put the first user in users.map then every user enters as faxcat even if faxcat doesn't have the ! before it.
The error that appears on the log when faxcat is the last user is the nextone:
[2006/02/21 12:58:46, 0] lib/username.c:map_username(179)
Unable to build user list
please attach a gzipped level 10 debug log from smbd. Thanks.
Created attachment 1751 [details]
Level 10 log for smbd
Sorry. This log file does not contain a user actually connecting
to the server with the failed username map behavior that you
reported. Please make sure to capture the failure in the log file.
Created attachment 1755 [details]
Level 10 machine's log of user with error
Is it possible that you have the 'max log size' setting to something very small? The logfile you sent seems truncated.
Created attachment 1761 [details]
Log with max log size = 5000
Sorry for the the log size, I wasn't aware of that. :(
Another thing, I have checked the log before posting it, and found something, in case it helps.
The problem is a line in the users.map when a user doesn't have assigned a value, here are the last 4 lines in users.map:
!dr_admon = luis carabiam
!dr.rrhh = angeles
faxcat = *
As you will see in the log, the last check done is with user carabiam. The user angeles is not checked, so I commented the two lines without a user and it worked. The user was recognized as faxcat.
I know I shouldn't have those lines, but someone put them in a test and didn't remove them, the case is that version 2.2.5 didn't stop on that line, and the new one does.
Created attachment 1763 [details]
ignore misformed map lines rather than failing
This should fix the problem and has been checked in for 3.0.22
patch checked in.