8

We have 12 Laptop Pc's that we have upgraded from Windows XP to Windows 7.
The laptops are used by staff on away days. They log on to a local account on the machine - say User1 with no password.
On the Windows XP Login screen there was a drop down menu allowing them to log on to the Local Machine. However in Windows7 there is no such box and it is confusing staff.
Windows 7 tries to log into the domain by default, it doesn't seem to remember where the user last logged into.

Is there a way to set Windows7 to log on to the local machine by default instead of the domain?
I do not want the staff to have to type for example stafflaptop1\User1 when they log on.

migrated from superuser.com Mar 29 '10 at 11:14

This question came from our site for computer enthusiasts and power users.

  • I shoul state that we still infrequently log onto the machines with domain accounts. However as this is infrequently i would be happy to put domain\User in when I log in. However I want my users to just put User1 when they log on. – Joe Taylor Mar 29 '10 at 11:54
  • 2
    You can use .\user1 to log on local domain. The .\ represent the local domain. Very useful for Windows 7 and Windows Server 2008 r2. – Levesquejfrancois Feb 22 '12 at 19:25
4

You can use Group Policy (local or domain) or edit the registry directly.

Direct registry edit seems to work best for us. We use a generic script to assign the local computer name, with the variable %COMPUTERNAME%, as the default domain for logon where needed. Run the following:

reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v DefaultLogonDomain /t REG_SZ /d %COMPUTERNAME% /f

If using GP look under Computer Configuration, Administrative Templates, System, Logon. The setting is labeled "Assign a default domain for logon". However, entering %COMPUTERNAME% here does not appear to be correctly interpolated prior to the logon display.

  • Editing Registry like jscott adviced, worked for me. Just add string value DefaultLogonDomain and enter your computer name in the Value. Great Tip jscott ! Thanks ! – user111621 Feb 22 '12 at 19:15
4

If you open up the GPO editor

gpedit.msc

you can edit the option under:

administrative templates 
system
logon
assign default domain...

click ENABLE and the enter "." as the domain name. That should default your login screen, after a reboot, to the "computername", which will authenticate your local accounts by default.

You'll of course have to type domainname\domainaccount or a UPN if you need to log in with a domain account.

1

Windows 7/Vista and Windows Server 2008 already log into local accounts by default. When you enter a username, Windows sets the domain to the local PC if the username is associated with a local account. If there is no matching local account, then Windows assumes that it is a domain login.

For example, if stafflaptop\User1 and domain.org\User1 both exist, Windows 7 will default to stafflaptop\User1.

1

You can use .\user1 to log on local domain.

The .\ represent the local domain.

Very useful for Windows 7 and Windows Server 2008 r2.

1

When connecting to a domain network, but using a local login, the "." in default domain name for logon in gpedit.msc does not change the user name to authenticate locally by default. Whenever I log off the local user to change to the local admin, I always have to type ".\" or I get a bad user name or password error.

Manually entering the "computer name" in the default domain name gpo works, but is a hassle when deploying multiple workstations from a single image, when there should be a default setting.

0

Shouldn't this be on Superuser?

Simply go to run (Windows Key+R) and type control userpasswords2.

Next, untick the top option Users must enter a user name and password to use this computer.

alt text http://i43.tinypic.com/2vubgax.jpg

  • I posted it on SuperUser originally, it got moved. I have added a comment in my question as I seem to have lost ownership of it. Domain users also need to log into the machine also. Plus the machine must have a username and password for basic security. Even if the password is blank. – Joe Taylor Mar 29 '10 at 11:55
  • @Joe Taylor - associate your accounts (the rightmost tab on your profile page) and you should regain ownership of the question. If not e-mail team@stackoverflow.com – ChrisF Apr 5 '10 at 22:11
  • @Wil - the question is by a person "who manage[s] or maintain computers in a professional capacity" and is "in charge of ... many desktop PCs (other than your own)" (see serverfault.com/faq) – ChrisF Apr 5 '10 at 22:14
0

Joe - does the advice at http://www.windowsitpro.com/article/configuration/how-can-i-set-the-default-domain-on-the-windows-nt-logon-screen-.aspx help? I haven't tested it, because my setup is different to yours, so use with caution; however John Savill's tips are very trustworthy and the key he refers to exists in Windows 7 (even if the article dates back to 2002).

[Edited following comments - the registry key in the article linked above is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon - create or set DefaultDomainName (String type) to the value of the domain you wish to use]

  • Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Canadian Luke Jan 23 '14 at 1:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.