Pages

Wednesday, July 29, 2015

Windows Operating System- "net user" Command

net user [username [password | *] [/add] [options]] [/domain]] [username [/delete] [/domain]] [/help] [/?]

This command can be very useful if you have administrative privileges to the computer your working on. (Since most times I've used this its been for other people with computers they "found")
*HINT: Sometimes you can access the administrative user through safe mode

Most times I've used this tool it was to delete the current user and make a new one. This allows for all viruses, configurations, applications  and restriction of the old user to be erased.

As long as someone did not change the account settings, by default, there are two admin accounts. See image here:
https://s.yimg.com/lo/api/res/1.2/dCXTNoowPX_i2XZJNiuZFA--/YXBwaWQ9eWlzZWFyY2g7Zmk9Zml0O2dlPTAwNjYwMDtncz0wMEEzMDA7aD0zNTE7dz02MDA-/http://thewindowsclub.thewindowsclubco.netdna-cdn.com/wp-content/uploads/2014/05/Net-User-command-600x351.jpg?0479ea.cf.jpg
You will see two main accounts, the user account that has admin privileges and another user called administrator. The administrator account sometimes can be accessed from safe mode (it won't have a password by default) and can use the net user command without the users password, allowing you to delete the user account and Create your own.

One time at McDonald's I was doing work on my  laptop and someone else was having issues with there PC in front of me. I asked what was wrong and they gave me a issue about there PC that was new to me at the time. The man said to me that he had found his mini laptop in a garbage and grabbed it. He could get on the guest user but nothing else. So I went to work and thought up of a good idea, delete the old user and make a new one. But with out the user password, this would be hard. So I went through the laptops safe mode and got into the user accounts log in screen which had two options, the main locked user account, and administrator. I clicked on admin, and it logged in right away. I got on the cmd or terminal and deleted the old user with command:
c: net user [user] /delete
I added the new user with:
c: net user [new user] [new user password] /add
Like: [c:net user mike password123 /add]
Added them to the admin localgroup:
c: net localgroup [new user] Administrators /add
And restarted the PC. Logged on to the new user account and he was free to do what he wanted. At least that's one way to do it.

No comments:

Post a Comment