Bug 4529 - Capitalized user name causes BSOD on XP-SP2
Summary: Capitalized user name causes BSOD on XP-SP2
Status: RESOLVED INVALID
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.23
Hardware: Other Linux
: P3 major
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-20 14:41 UTC by Todd (dead mail address)
Modified: 2020-10-03 00:48 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Todd (dead mail address) 2007-04-20 14:41:11 UTC
Hi All,

rpm -qa \*samba\*
samba-common-3.0.23c-2.el5.2
system-config-samba-1.2.39-1.el5
samba-3.0.23c-2.el5.2
samba-client-3.0.23c-2.el5.2

cat /etc/redhat-release
CentOS release 5 (Final)
Note: Cent OS 5 is a clone of Red Hat Enterprise Linux 5

Windows XP-Pro Service Pack 2


Okay, I think this is funny, but I am easily amused.  I just upgraded
a company's file server from Red Hat 7.2 to CentOS 5.  I have been
getting reports of BSOD's when the users log into to their XP machines.
I have worked around the problem and do not require assistance:
I added a lower case routine to my script file.

I tracked the BSOD problem down to this:

1) If the XP's user name is capitalized (for example "Foo")
%username% = “Foo” with a capital “F”

2) If the Linux server user name is not capitalized ("foo")

3) The user already has his “homes” drive mounted (mapped from
Windows Explorer) and check off for remount next logon
[homes]
   comment = %S's Home Directory -- Mount as G:
   path=/export/%S

4) With a script in Windows "Startup", I attempt to mount the user's
drive a second time
    set dr=G
    set User=\\server\%USERNAME%
    if not exist %dr%:\nul (net use %dr%: %User%)

Note: M$ crappy batch language hardly ever catches the "if exist"

5) When the suer logs in and hits the start up script, the black cmd box pop up,
then the XP computer goes down with BSOD   stop 0x0000007e 0x0000005 
0x80539a9e  x y  (X, y: sorry, I never wrote down the last two)

Checking “log file = /var/log/samba/samba-log.%m” shows several attempts
to map //server/Foo (capital “F” and corresponding remarks that the directory 
does not exist

Let me know if I can help troubleshooting this.
Many thanks,
-T



~~~~ MountUserAsG.bat ~~~~
@echo off

set dr=G

:start
echo Checking to see if %dr% drive is mounted  ... Please standby
rem set wait=7
rem ping -w 1000 -%wait% 7 127.0.0.1 > null

set User=\\server\%USERNAME%
if not exist %dr%:\nul (net use %dr%: %User%)

:end

~~~~ smb.conf (drives except [homes] removed ~~~~
; /etc/rc.d/init.d/smb stop
; /etc/rc.d/init.d/smb start
;======================= Global Settings =====================================
[global]

   workgroup = PICK
   comment = Samba (NetBIOS) Server on server.pick.local
   volume = CentOS 5, %v
   netbios name = Server
   netbios aliases = PickServer

;  Not supported in 2.2.0
;  shared mem size = 10485760

; user only the specified inerfaces
   interfaces = eth0 127.0.0.1 
; don't use the bind interfaces command until Samba fixes the freeze up problems
;  bind interfaces only = true

; deny access to anyone outside the current domain
   hosts deny = ALL
   hosts allow = 192.168.255. 127.0.0.

; note: the second name in the printcap will be the primary share name
;            ONLY if it contains no spaces
   printcap name = /etc/printcap
   load printers = yes
   printing = BSD

   guest account = pcguest
;  debug level = 1
   debug level = 2
   log file = /var/log/samba/samba-log.%m
   max log size = 50   ; size in Kb

   mangle case = yes
   preserve case = yes
   default case = lower
   short preserve case = yes
   case sensitive = no

   follow symlinks = yes
   wide links = no
   lock directory = /var/lock/samba
; note: also see locking on individual shares
   locking = yes
   strict locking = no
   blocking locks = yes

;  share modes = yes    ;  Note: not supported in 2.2.2
   null passwords = yes
   security = user
;  security = share

;  update encrypted = yes
;  encrypt passwords = no
   encrypt passwords = yes
   smb passwd file = /etc/samba/smbpasswd

   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
   
# Unix users can map to different SMB User names
;  username map = /etc/samba/smbusers

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
;   include = /etc/samba/smb.conf.%m

# Most people will find that this option gives better performance.
# See speed.txt and the manual pages for details
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
;  socket options = TCP_NODELAY

# Configure remote browse list synchronisation here
#  request announcement to, or browse list sync from:
#       a specific host or from / to a whole subnet (see below)
;   remote browse sync = 192.168.3.25 192.168.5.255

# Cause this host to announce itself to local subnets here
;   remote announce = 192.168.1.255 192.168.2.44

# Browser Control Options:
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
;   local master = no
    local master = yes

   os level = 33
   domain master = yes 
   domain logons = yes

# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
;   preferred master = yes

# Enable this if you want Samba to be a domain logon server for
# Windows95 workstations.
;  domain logons = yes

; run a specific logon batch file per workstation (machine)
;   logon script = %m.bat
; run a specific logon batch file per username
;   logon script = %u.bat

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
;   wins support = yes
    wins support = no

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
#       Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
;   wins server = w.x.y.z

# WINS Proxy - Tells Samba to answer name resolution queries on
# behalf of a non WINS capable client, for this to work there must be
# at least one  WINS Server on the network. The default is NO.
;   wins proxy = yes

;  name resolve order = lmhosts host wins bcas
;  name resolve order = wins bcas lmhosts host
   name resolve order = host bcas
# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The built-in default for versions 1.9.17 is yes,
# this has been changed in version 1.9.18 to no.
;  dns proxy = no
   dns proxy = yes

;  note: deadtime is in minutes 1440=24hrs 2880=48hrs (2 days)  20160=14days
;  deadtime = 1
;  deadtime = 10
;  deadtime = 1440
;  deadtime = 2880
;  deadtime = 7200
   deadtime = 20160


;note: %S replaces with the name of the current service (user's name)
[homes]
   comment = %S's Home Directory -- Mount as G:
   path=/export/%S
   valid users = @pick
   write list = @pick
   read only = no
   create mode = 0750
   public = no
   writable = yes
   printable = no
   browseable = no
Comment 1 Björn Jacke 2020-10-03 00:48:18 UTC
thanks for your interesting finding on that Windows XP issue and sorry for the late feedback. I'll close this bug here as it's not a Samba problem though. Did you also report that problem to Microsoft?