Login Failure due to deletion of all users in win7

Source: Internet
Author: User

A friend named win7 deleted all users, but the administrator user was not activated, resulting in a failure to log on to the system.

■ Solution: 

1.replace the osk.exe(virtual keyboard program) or magnify.exe (magnifier program) of the system ):

1) Prepare a CD with winpe and start winpe. The system 32/osk.exe program cannot be modified because it does not have sufficient permissions.

File properties-security-advanced-owner: Select administrator or system. Then confirm to exit the current dialog box. Then, change the File Attribute-Security to full control. Osk.exe-> _osk.exe make a backup.

Then copy system32/cmd.exe-> osk.exe.

2) or use a CD to enter dos for NTFs and directly use the command to modify it as needed, which is more convenient. Permissions are not checked in pure dos.

 

2. Start the command line to add a win7 user

Then, that is, cmd.exe ". Or select "zoom in projects on the screen ".Magnify.exe.

After entering the command line:

1) Enter "Net user administrator/active" to activate the Administrator. After restart, log on to the Administrator.

2) or create a user:

"Net user temp password/Add" to create a temp user. The password can also be blank.

"Net localgroup administrators temp/Add" adds the temp user to the Administrators group. Restart.

3. In Win XP:

In XP, it can be replacedSethc.exe(Sticky key function program), usually press the Shift key five times in a row to call up the program.

 

 

 

■ Net userUsed to add/create/modify user accounts
Syntax:
Net user <username> [password or *] [/Add] [Options] [/domain]
Net user <username]/delete/Domain
Username
Password allocation or Password Change
* Password prompt
/Domain execution in a domain
/Add create an account
/Delete an account
/Active: [Yes or No] Activating or stopping an account
/Comment: "<text>" add descriptive description
/Counterycode. NNN is the system code. 0 is the default value.
/Expires: <date or never> account expiration time. Format: month, day, year or day, month, and year (the format is determined by the country code)
/Fullname: "<Name>" full name of the account
/Homedir: <path> path of the user's main directory
/Passwordchg: [Yes or No] set whether the user can change the password
/Passwordreq: [Yes or No] set whether the user needs a password
/Profilepath: <path> set the Environment File Path
/Scriptpath: <path> logon script path

/Times: <times or all> Number of hours that a user can log on

 

Net user username/Time: M-F, five o'clock P.M.-restrict users to log on only from Monday to Friday between and.
For daily reality, use semicolons to separate them:

Net user username/Time: M, 4am-5pm; t, 1pm-3pm; W-F ,-

Unlimitedly:

Net user username/Time: All

These are only restrictions on the time at which you log on. If the time is reached, logged-on users will not be forced to log off, as long as they do not restart or log off, they can continue to use. Only Administrator-level accounts have permission settings.

 

 

/Usercomment: "<text>" account description
/Workstations: <machine names> username that allows logon. * indicates all users.
 
The net group command is used to manage local groups,
Net localgroup and net group
Common examples:
1. Add a user to a group. Net localgroup administrators 123/Add 123 to the Administrators group.
2. delete a user from a group. Net localgroup administrators 123/delete
3. Net localgroup: list all local user groups
4. Net localgroup administrators: List users in a specific group
Net localgroup
[Groupname [/comment: "text"] [/domain]
Groupname {/Add [/comment: "text"] |/delete} [/domain]
Groupname name [...] {/Add |/delete} [/domain]
Net localgroup is used to modify the Local Group on the computer. When you use this command without the option, it will
Displays the Local Group on the computer.
Groupname refers to the name of the Local Group to be added, expanded, or deleted. You only need to enter the group name.
You can browse the user or global group list in the Local Group.
/Comment: "text" adds comments to a new or existing group. Text must be enclosed in quotation marks.
/Domain performs operations on the master domain controller of the current domain. Otherwise, execute
.
Name [...] lists one or more user names that need to be added or deleted from a local group or
Group name. Multiple user names can be separated by spaces. The name can be a user.
Or global group, but it cannot be another local group. If a user comes from another
A domain name (such as sales/ralphr) must be added before the user name ).
/Add add a group name or user name to a local group. Must be used
This command adds a user to the local group or creates an account globally.
/Delete deletes a group name or user name from a local group.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.