Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

migrated from 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
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
up vote 4 down vote accepted

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.

share|improve this answer
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

If you open up the GPO editor


you can edit the option under:

administrative templates 
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.

share|improve this answer

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\User1 both exist, Windows 7 will default to stafflaptop\User1.

share|improve this answer

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

The .\ represent the local domain.

Very useful for Windows 7 and Windows Server 2008 r2.

share|improve this answer

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.

share|improve this answer

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

share|improve this answer
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 – 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 – ChrisF Apr 5 '10 at 22:14

Joe - does the advice at 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]

share|improve this answer
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

protected by Michael Hampton May 20 at 9:22

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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