Jump to content

Auto-logon problem.


Recommended Posts

I have previously always used nLite to define all my unattended settings and user account creation, but i have now decided that i will stop using nLite, since i will not be stripping my source down anymore and i additionally have changed from WinXP to Win2K.

Anyway, so from now on then i'll just manually make the winnt.sif and use HFSLIP to update my source, but unfortunetly then i cannot get auto-logon to work for me.

I have listed the contents of the relevant files which i use below, and so i would really appreciate if someone would be so kind as to help me out alittle here with this issue of mine.

I have also tried with adding AutoLogon="Yes" into winnt.sif, but that will just autolog me in once as using the built-in admin account and then at next logon i'm presented with the logon screen.

To me, then it would seem that my files should make it so that a user with admin rights are made at T-12 together with the needed reg entries for enabling autologon for that user, and so since i don't have AutoLogon="Yes" enabled in my winnt.sif, then i would think that autologon would work fine(since AutoLogon="Yes" is only reffering to the built-in admin account only, and since it will only work once when having a blank password defined for the built-in admin account), but unfortunetly it dosen't ?

WINNT.SIF :

;SetupMgrTag
[Data]
AutoPartition=0
MsDosInitiated="0"
UnattendedInstall="Yes"

[Unattended]
UnattendMode=FullUnattended
OemSkipEula=Yes
OemPreinstall=No
TargetPath=\WINNT

[GuiUnattended]
AdminPassword=*
OEMSkipRegional=1
TimeZone=105
OemSkipWelcome=1

[UserData]
ProductID="XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
FullName="Martin Hertz"
ComputerName=*

[RegionalSettings]
LanguageGroup=1
Language=00000406

[Identification]
JoinWorkgroup=WORKGROUP

[Networking]
InstallDefaultComponents=Yes

cmdlines.txt :

[COMMANDS]
"useraccounts.cmd"

useraccounts.cmd :

net user "Martin Hertz" /add
net localgroup Administrators "Martin Hertz" /add
net accounts /maxpwage:unlimited
regedit /s autologon.reg

autologon.reg :

Windows Registry Editor Version 5.00 

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DefaultUserName"="Martin Hertz"
"DefaultPassword"=""
"AutoAdminLogon"="1"

Link to comment
Share on other sites


I had problems with this too for quite some time, the problem is that you MUST define a password for autologon otherwise it will just autologon one time and then reset the AutoAdminLogon key.

Hope this works for you! :D

Link to comment
Share on other sites

Thank you very much for your reply, mate :)

Yes, i had actually also read that in the specification, but i'm still positive that there's a way around it still, since nLite can do this with all passwords blank, but i just don't know how(admin rights user account + built-in admin account with both blank passwords).

I had actually also tried a quick test with giving the built-in admin acount a password in winnt.sif just to test it and it didn't worked either, but i also didn't define a password for the actual user account which i wanted to auto-logon. Still, if it would have worked, then i wouldn't have used that solution anyway, as it was just a test to see if it would work or not...

Anyway, i'm sure that this can be done with still having blank passwords, since nLite must be doing it somehow, but i would really appreciate any more input on this still from you guys.

nLite can autologon fine also with only having a single account i.e. the built-in admin account with blank password, so there got to be a way ???

Again, many thanks for your reply dll32 :)

Link to comment
Share on other sites

I want to know if autologon with blank password in win 2000 is possible too!

Are you sure that nLite can handle autologon, my conclusion was that it couldn't.

If it works for you, you may be able to just rename the built-in admin account and use that account instead.

Anyway... I have done some tests to try to get it to work, eg. with the ForceAutoLogon key. but no success yet :(

Link to comment
Share on other sites

Hi dll32 :)

Yes, i'm sure, as i have always configured auto-logon to be enabled in nLite and i have also always defined blank passwords for both the built-in admin account and the admin rights user account.

Anyway, i have now checked my previous nLite ISO, to see what nLite is doing behind the scenes...

OK, this is for a config with one admin rights user account in addition to the built-in admin account and with both of them having blank passwords and set to never expire(in nLite that is) :

Relevant part from '\I386\WINNT.SIF' :

[GuiUnattended]
EncryptedAdminPassword="No"
AutoLogon="Yes"
AdminPassword=*

Relevant part from '\I386\NLITE.INF' : ('NLITE.IN_' uncabbed)

HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","AutoAdminLogon",0x00000000,1
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","DefaultUserName",0x00000000,"Martin Hertz"
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","DefaultPassword",0x00000000,""
[...]
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce","nlite_post_00",0x00000000,"nhelper net1 accounts /maxpwage:unlimited"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce","nlite_post_01",0x00000000,"nhelper net1 user """"Administrator"""" /passwordreq:no"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce","nlite_post_02",0x00000000,"nhelper net1 user """"Martin Hertz"""" /add /passwordreq:no"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce","nlite_post_03",0x00000000,"nhelper net1 localgroup """"Administrators"""" """"Martin Hertz"""" /add"

Ahh, i think i'm beginning to see the big picture now, or atleast i hope so :)

From this(and the cmdlines.txt which i didn't posted), then i can see that what nLite does, is to set winnt.sif so that the built-in admin account is logged into once, and then at T-12(cmdlines.txt), then NLITE.INF is executed and that defines some cmd commands to be run at first logon after the installation(from the 'HKLM\[...]\RunOnce' reg-key), and those cmd commands are almost identical to the ones that i run at T-12, except for these two :

net user "Martin Hertz" /add /passwordreq:no

net user Administrator /passwordreq:no

So... The solution obviously is about defining that extra "no passwords needed" switch which i haden't, whenever using an account with blank passwords.

Just strange that the MSFN unattended guide which i have studied so much dosen't mention anything about this ???

Anyway, i'm just happy to have something to try out now, so now i'm off to VMware for testing this possible solution out in real life :)

I'll post back here when i have tested it out...

CU, Martin.

Link to comment
Share on other sites

...Just wanted to say that i have just finished running 2 VMware sessions with the above mentioned change, one with autologon=yes in winnt.sif and one without, and they both don't work i.e. they don't enable autologon for the admin rights user account.

So, the only conclusion to draw then, must be that the solution lies in nLite running the cmd commands for making the admin rights user account from the built-in admin account at T-0(RunOnce), and not at T-12(cmdlines.txt) as i do.

However, i'm pretty tired now, so i'm first going to test it out tomorrow evening though...

Link to comment
Share on other sites

Well, i have just finished testing an ISO of what i believe that nLite is doing and it didn't work.

It showed a logon-screen with my name pre-entered and an error box stating that something was wrong with either the password or username or something. I can also see why that is, since that account hasen't even been made yet, and so i just changed to the built-in admin account and logged in and then my RunOnce commands where executed and my user account created, but still no autologon at the next reboot...

This is really annoying to not have a clue about how to fix this issue...

Anyway, again if anyone can help me out here, then i would be most gratefull :)

Link to comment
Share on other sites

Sorry, in my previous post then i forgot to say what i had actually done to mimick nLite's behaviur... Instead of using a batch file and a reg file, then i just made a reg file which handled everything. Btw, the 'sfcdisable' reg-entry' is just because i am disabling SFC(WFP) with a pached SFC.DL_ in my \I386\ folder, and it has nothing to do with my current issue...

I haven't even comed to the part where i am adding tweaks to my CD, since i can't even get this freakin' autologon thing working :realmad:

...Never thought that doing things manually would be so difficult, i must confess :)

Again, if someone can help, then i would be very gratefull ;)

WINNT.SIF :

[GuiUnattended]
[...]
EncryptedAdminPassword="No"
AutoLogon="Yes"
AdminPassword=*
[...]

cmdlines.txt :

[COMMANDS]
"regedit /s setup.reg"

setup.reg :

Windows Registry Editor Version 5.00 

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DefaultUserName"="Martin Hertz"
"DefaultPassword"=""
"AutoAdminLogon"="1"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
"command1"="cmd /c net user Administrator /passwordreq:no"
"command2"="cmd /c net user \"Martin Hertz\" /add /passwordreq:no"
"command3"="cmd /c net localgroup Administrators \"Martin Hertz\" /add"
"command4"="cmd /c net accounts /maxpwage:unlimited"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"SFCDisable"=dword:FFFFFF9D

I can see why this won't work(as the account i'm trying to log into, isn't even made yet, at that time), but from looking at the NLIE.INF which i posted some posts above, then i believe that this is exactly what nLite is doing ???

Link to comment
Share on other sites

I've done some more test's with nLite and I cannot get autologon to work with a blank password, there's even an infobox where i can read that it doesn't work with blank passwords.

So my question is: How did you do to make autologon with a blank password work in nLite?

Anyhow, you may make autologon work in the ugly way, by adding:

set KEY=HKLM\Software\Microsoft\Windows\CurrentVersion\Run

REG ADD "%KEY%" /f /v "AutoAdminLogon" /d "cmd /c REG ADD \"HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\" /f /v \"AutoAdminLogon\" /d \"1\""

But I suppose you have already thought about this?

Link to comment
Share on other sites

I enable blank password for the built-in admin account and then i add a user with admin rights and enable blank password for that account also, and then i set autologon to my admin rights user account and leave the autologon-count at 0(unlimited).

No i haden't thought about that i must admit(your cmd code), but indeed some good thinking there on your part :) Still, it would be prefferable to get it to work without such hacks :)

Anyway, since it dosen't seem like there is anyone out there that is able to help us with this, then i am thinking about throwing the towel in the ring and simply begin using passwords from now on.

My reasoning for preffering to not do this, is simply that my PC is 100% single user only, and so enabling passwords in such a scenario dosen't really make much sence IMHO, but oh well, what can you do :)

Thanks for your help, my friend :)

Link to comment
Share on other sites

  • 4 weeks later...

@dll32

I'm very sorry mate, you where absolutely right in what you said to me :blushing:

I knew from my many nLite'd WinXP iso's, that autologon with blank password worked perfectly on WinXP and hence, i just assumed that it would also work with Win2k, and so i then just made a nLite'd Win2k iso and extracted the 'NLITE.IN_' and 'WINNT.SIF' files and checked them out, but without actually doing a test run in VirtualBox...

I have then now actually tried it out in a VM, and found that you where absolutely right in what you said!

So, i just wanted to say that i'm sorry for posting wrong info to you, mate...

Anyway, i'm not really that much bothered about this issue anymore, and i just decided to bite the bullet and use a password...

CU, Martin.

Edited by Martin H
Link to comment
Share on other sites

From what I can tell you may be stepping on your own toes trying to enable all instances of autologon. Once mini-setup completes it will autolog you on for x number of times. Once that threshold is reached, it resets HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon to 0 (disabled). If you want autologon all the time, don't mess with the autologon after mini-setup at all. Configure the Winlogon keys in the registry and let it do it's thing.

Also, since you are setting up autologon, skip trying to do so with a blank password. It will be in the Winlogon key for reference if you forget, so just set one. nbd

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...