Windows 7 changes my account name... except it does not. How do I REALLY change my account name?

10

2

I created a new standard user account named dm500hd-ag1 on a Windows 7 Ultimate PC. The name of the host computer is ag1 so I thought I would add that in the name of the user account name.

Then I changed my mind, and i said to myself... eh what the hell, I'll just dub it dm500hd and be happy with it. So I went back to the Control Panel and I changed the user account name. All done and well, no errors reported.

a

I intend to use this account to share a local disk drive with my Dreambox STB. Initially, my idea was to add the "ag-1" suffix in the name to distinguish the user account name from the share name.

So in Windows Explorer, I clicked on all the right buttons and I got to the "Select Users or Groups" dialog where I'm supposed to enter the name of the user account name and click the "Check Names" button.

b

Except when I click the button I get the "Name Not Found" dialog.

An object named "dm500hd" cannot be found. Check the selected object types and location for accuracy and ensure that you typed the object name correctly, or remove this object from the selection.

c

Oh boy... can't find the fricking it just created. Well okay, it renamed an existing name... but what difference does it make? Doesn't the word "rename" mean the same thing in the Windows world and in all of its subsystems, as it does in the real world?

So my best guess... is that it still recognizes this account as dm500hd-ag1. What do you think? Let's try it, shall we? So I input dm500hd-ag1 and click the "Check Names" button again, and it works!

d

Well would you look at that... sun of a b....

Have I powered it off and on again you say? Yes, that was my first thought. I logged out of my admin account and logged in as the new dm500hd standard user. There's currently no password for this one yet. It logged me in straight away, prepped the desktop and everything. I logged out, and logged back into my admin account to try this again. It was a no go. So I rebooted the system, hoping it would fresh up its memory and its fricking mind and realize what the new user account name is. Nope! It didn't...

So the user account name titled dm500hd that is being displayed on the Control Panel is just for the show then? It's not really the name of the account, am I right? So it didn't really do anything, it didn't rename the account?

How do I get this dinosaur of a system to do what I tell it to do?... How do I REALLY change my account name?

Samir

Posted 2014-02-16T22:50:24.737

Reputation: 17 919

Also consider the profile folder (C:\Users\[Username]) – that is actually completely separate from the account name, and can be changed by logging in with another account, renaming the directory and changing the relevant ProfileImagePath registry key in HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\[User ID]. – ntoskrnl – 2014-02-17T00:11:01.710

Answers

12

Solution

When you use the User Accounts control panel applet, you can't actually change the logon user name but just the full, display name. This way the name can be changed at any time without side effects (e.g. classic user logon).

  1. Log off, and log on with an administrator account.

  2. Press Win+R, type or paste netplwiz.exe in the text box, and press Enter.

  3. Select the account you want to rename from the list, and click Properties.

  4. Rename it as you like, and click OK when done.

Remarks

  • If you're using Professional or higher editions you can achieve the same result by running lusrmgr.msc.

  • Logon user names are limited to 20 characters for backward compatibility. Unlike full names, they can't contain dots, spaces, or any of the following characters:

    \ / " [ ] : |  + = ; , ? * @
    
  • Changing a user name won't have any effect on the associated Security Identifier (SID), which is generated when the account is first created. Under the hood, Windows uses SIDs to handle accounts regardless of their names. This means you don't need to change the privileges or permissions on the renamed account.

and31415

Posted 2014-02-16T22:50:24.737

Reputation: 13 382

Now, this sounds like a plan. I will test this right away. – Samir – 2014-02-16T23:39:53.147

1So that's what "Full name" means then. I used lusrmgr.msc shortcut and looked around in the "Local Users and Groups" window. I saw that the fields "User name" and "Full name" did not match for this account. But I wasn't sure of the difference between "User name" and "Full name". But I see it now, the "Full name" is just a description, or the display name. – Samir – 2014-02-17T00:21:37.290

So what if I enforce the classic Windows logon screen instead of the Windows welcome screen, where users are asked to type in not only their passwords but also their user name? I won't be able to log in as dm500hd? Or is Windows intelligent enough to understand this, and apply the changes I make in Control Panel to both "User name" and "Full name" while this policy is in place?

– Samir – 2014-02-17T00:35:35.007

This seems very strange to me. First off, when they say "change the account name" in Control Panel, they actually mean "change the display name for this account". Well can't they type it out like that in plain English? And as to breaking stuff and potential issues with changing a user name... well if a Sir or a Madam is trying to change a user name while still logged into that account, can't they just prompt them to log out first, and/or display an informative error message? This is so typical M$. – Samir – 2014-02-17T00:42:13.627

Well I will never use the Control Panel to change a user name again, ever. I can tell you that much. Thanks for your help! – Samir – 2014-02-17T00:43:20.540

2@Sammy: For the vast majority of use cases, changing the display name is what the user wants. The few who need to change the actual name are expected to know either how to change the username or where to ask – 3Doubloons – 2014-02-17T04:07:41.390

Security permissions do not rely on the name of the account. Each account has a "SID" that is a long binary identifier that is used for access control lists, file ownership, and such. Changing an account name does not change the SID. – Gabe – 2014-02-17T09:22:39.480

@Sammy When using a classic/domain-style logon screen, what you have to use is the "real" user name. | @Gabe You're absolutely right (yay for drowsiness), I was actually thinking about executing something like icacls file /grant <userName>:F. Anyway, thanks for pointing it out; I've edited my answer accordingly. – and31415 – 2014-02-17T13:35:16.030

@Sammy I've added some more info in my previous answer. Let me know if you have any further questions. – and31415 – 2014-02-17T15:07:16.573

@Gabe Does SID and/or ACL have any implication as to whether or not you will be able to (have the right permissions to) access network shares that are associated with this user account, from a Linux machine? I have the above mentioned STB with embedded Linux and I have problems accessing the local drive I shared to use for recording. But that might be some other issue within the Linux machine itself. – Samir – 2014-02-20T20:21:52.343

I have used the STB this way before. It's just a matter of entering the mount manager, and mounting a new CIFS share. But I have used a different user name back then. My best guess is that the STB has somehow remembered the old settings in some config file deep down in the system, despite it displaying an empty mount manager. So I would probably need to flush that out... if I only knew how... and then try mounting my CIFS share again with the new credentials. – Samir – 2014-02-20T20:24:58.733