Saturday, 7 September 2013

Windows 7 adding admin user cmd command line

net user alexx passphrase /add
net localgroup administrators alexx /add
net user alexx /active:yes

but if your laptop is in french then the second command is:

net localgroup administrateurs alexx /add

est pour windows 7 en france.

Change "alexx" to the user that you want to add and passphrase to your own super-secret passphrase.


I found this when I was asked to repair a windows7 laptop that had only one admin user and trying to log in gave:

"Echec de l'ouverture de session par le service Service de profil utilisateur. Impossible de charger le profil d'utilisateur."

Interestingly I could reboot, (hammering F8) and boot into safe mode and then logging in as the admin worked fine.

This enabled me to add an additional admin user to repair the other one.

http://support.microsoft.com/kb/947215 had an interesting suggestion but in the end I just changed the name of the problem account, (which didn't match the underlying C:\Users\{username}) and created a new account with the old name. Then I copied all of the files over, and once the owner was happy I showed them where their "back up" was and how to install SpiderOak, (because like far too many people, they had no back up at all.)

 If they come back I'll move them to Mint Linux, (they aren't ready for the power of Crunchbang.)


[0] found on http://www.trickyways.com/2009/10/add-or-delete-users-account-with-command-line-in-windows/
Also http://www.geek.com/news/windows-8-password-reset-trick-requires-no-third-party-software-1532242/ could have been useful, had they forgotten their password. ( http://pcsupport.about.com/od/windows-8/a/reset-password-windows-8.htm is another walk-through of the windows password reset.)

No comments:

Post a Comment

About this blog

Sort of a test blog... until it isn't