[Samba] Re: XP "logon failure" but still logs on -- no roaming profile

Brian White bcwhite at precidia.com
Tue Mar 11 18:13:03 GMT 2003


> so if you reboot you get a successful logon? xp -pre sp1 ?

Usually, yes.  I did get one case where it did not but the computer had been
on for a while before I tried to log on.

SP1 was installed.  I just did another update of all critical updates but
it made no difference.  After I reboot, I could logon, logoff, logon, logoff,
but the third time I tried to logon, I got the error.

On a hunch, I tried removing everything from the logon.bat script.  It
didn't help, though.  After a reboot, I could logon/off three times and
then I started getting the error.  Continuing logon/logoff sequences shows
no discernable pattern, though it only fails about 1/2 to 1/3 of the tries.

After restoring the content of the logon.bat file, the logon process fails
much more often but not every time.  I began to wonder if it had something
to do with network activity/idle periods since when I was typing results
in to this message, it seemed that the next logon attempt would work.

Taking a more patient approach to this, I've discovered that the problem is
at least somewhat related to how long I stay logged in.  With the full
login.bat content (because it makes the problem more obvious) I've discovered
that:

 - Logout immediately after logon (waiting for logon.bat to complete first)
   causes a logon failure every time.

 - Waiting 20 seconds after a logon failure before logout will ensure that
   the next logon attempt is successful.  Waiting only 10 seconds is not
   enough.  The next logon  attempt(after one that was successful) will fail
   even if I again wait over 30 _minutes_ before logout.

 - Waiting at the "press CTRL-ALT-DELETE to logon" prompt, even up to 60
   seconds, does not help; it fails every time.

Attached is the "logon.bat" file renamed to "logon.txt" so it doesn't get
stripped by any virus scanners.  In addition to mapping a number of network
drives, it also tries to map H: to /home/userid (if it exists) or to the
users home computer on the network if they're logging in to a different
machine (sort of like a unix automounter would do for home directories on
different machines).

                                          Brian
                                 ( bcwhite at precidia.com )

-------------------------------------------------------------------------------
   Tired of spam?  See what you can do to fight it at: http://www.cauce.org/
-------------- next part --------------
:-net accounts /forcelogoff:no /minpwlen:4 /minpwage:0 /maxpwage:unlimited /uniquepw:5

:-
:- Mount the home directory
:-
net use h: /d
subst h: /d

if exist C:\Home\%USERNAME%\nul.x goto localhome

:nethome
call "%USERPROFILE%\Network\homedir.bat"
goto donehome

:localhome
subst h: C:\Home\%USERNAME%
mkdir "%USERPROFILE%\Network"
echo net use h: \\%COMPUTERNAME%\home\%USERNAME% /persistent:no /yes >"%USERPROFILE%\Network\homedir.bat"
goto donehome

:donehome


:-
:- Mount network drives
:-
net use o: \\share\office2000p /persistent:no /yes
net use p: \\share\precidia /persistent:no /yes
net use s: \\share\win32 /persistent:no /yes
net use t: \\ftp\ftp /persistent:no /yes
net use x: \\share\tmp /persistent:no /yes


:-
:- Set some environment variables
:-
mkdir C:\tmp\%USERNAME%
s:\bin\setx TEMP C:\tmp\%USERNAME%
s:\bin\setx TMP C:\tmp\%USERNAME%
:- s:\bin\setx HOMEDRIVE H:


:-
:- Update the computers clock
:-
net time \\share /set /yes




More information about the samba mailing list