none
Last User Logon Feature via Group Policy RRS feed

  • Question

  • I understand the way to disable the last user logon feature is via group policy if I wanted the users to always have to type in their username and passwords when logging into their Windows XP or Windows 7 workstations.

    What I really would like to do if I can is enable the ability for the user that's assigned to the specific workstation to always display their username when they log in but if I the SysAdmin logs in, I don't want them to see this.

    So, if I work on their workstations and then logoff or restart it, I want for their username to be remembered and displayed only not mine.

    Is there a way to accomplish this?
    Saturday, January 19, 2013 1:57 AM

Answers

  • Hi,

    I think you can configure Do not display last user name in logon screen Group Policy (Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options) to hide the last logon user name option.

    Also, you can try the following method to have a test:

    Hide User Accounts on Windows 7 Logon

    http://social.technet.microsoft.com/Forums/en/w7itproui/thread/16378967-8a39-4aef-85e4-d859a71648d3


    Alex Zhao
    TechNet Community Support

    Tuesday, January 22, 2013 9:58 AM
    Moderator
  • Bummer Dude, apparently Alex can't actually read.

    I know this is old and all but what the hack.

    I used to use a vbscript that would reset the registry setting

    to the previous users name.

    something like this.

      WshShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon\DefaultUserName", UserName
      WScript.Echo "   Last User Name Saved.  

    peace out.

    Monday, July 28, 2014 8:24 PM
  • Hi,

    Alex's solution will work only in Non domain environments. It works on default home/workgroup welcome screen, where you should choose local users instead of typing Ctrl+Alt+Del.

    However, BottomOfTheSea's solution will work in domain environment. But the Vbs script that he gave is for WinXP.

    These are values for Windwos XP:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
    "DefaultUserName"="username"
    "DefaultDomainName"="Domain Name"
    "CachePrimaryDomain"="Domain Name"
    "CachePrimaryDomain"="DomainName"

    These are for Windows 7:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI]
    "LastLoggedOnSAMUser"="domain\username"
    "LastLoggedOnUser"="domain\username"

    Please refer to this link: https://social.technet.microsoft.com/Forums/windows/en-US/7fb857b3-a760-40fb-a8be-a14ffa285214/i-need-to-be-able-to-change-the-default-domainuser-logon-prompt?forum=w7itprosecurity

    Thursday, December 18, 2014 4:26 PM

All replies

  • Hi,

    I think you can configure Do not display last user name in logon screen Group Policy (Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options) to hide the last logon user name option.

    Also, you can try the following method to have a test:

    Hide User Accounts on Windows 7 Logon

    http://social.technet.microsoft.com/Forums/en/w7itproui/thread/16378967-8a39-4aef-85e4-d859a71648d3


    Alex Zhao
    TechNet Community Support

    Tuesday, January 22, 2013 9:58 AM
    Moderator
  • Bummer Dude, apparently Alex can't actually read.

    I know this is old and all but what the hack.

    I used to use a vbscript that would reset the registry setting

    to the previous users name.

    something like this.

      WshShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon\DefaultUserName", UserName
      WScript.Echo "   Last User Name Saved.  

    peace out.

    Monday, July 28, 2014 8:24 PM
  • Thanks for the tip, but I'll revisit this later.  I really would like to have a more standard approach using a tool like Group Policy or something similar to accomplish this without having to custom run any scripts...thanks anyway.
    Thursday, December 18, 2014 2:40 PM
  • Hi,

    Alex's solution will work only in Non domain environments. It works on default home/workgroup welcome screen, where you should choose local users instead of typing Ctrl+Alt+Del.

    However, BottomOfTheSea's solution will work in domain environment. But the Vbs script that he gave is for WinXP.

    These are values for Windwos XP:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
    "DefaultUserName"="username"
    "DefaultDomainName"="Domain Name"
    "CachePrimaryDomain"="Domain Name"
    "CachePrimaryDomain"="DomainName"

    These are for Windows 7:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI]
    "LastLoggedOnSAMUser"="domain\username"
    "LastLoggedOnUser"="domain\username"

    Please refer to this link: https://social.technet.microsoft.com/Forums/windows/en-US/7fb857b3-a760-40fb-a8be-a14ffa285214/i-need-to-be-able-to-change-the-default-domainuser-logon-prompt?forum=w7itprosecurity

    Thursday, December 18, 2014 4:26 PM
  • As this thread has been quiet for a while, we assume that the issue has been resolved. At this time, we will mark it as ‘Answered’ as the previous steps should be helpful for many similar scenarios.  <o:p></o:p>

    If the issue still persists and you want to return to this question, please reply this post directly so we will be notified to follow it up. You can also choose to unmark the answer as you wish.  <o:p></o:p>

    In addition, we’d love to hear your feedback about the solution. By sharing your experience you can help other community members facing similar problems.  <o:p></o:p>

    Thanks!<o:p></o:p>


    Arnav Sharma | http://arnavsharma.net/ Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Monday, March 9, 2015 3:40 AM
    Moderator