Today at work, a colleague said I do not know who set the power-on password, the computer has not been the power-on password he is not in the desktop now
The computer does not have an optical drive, and I do not have to start the USB disk on hand, or use the WinPE with the password cracking tool to crack the power-on password
Luckily, the computer was a developer and installed SQLSERVER2005, and luckily he remembers the SA user and password for SQL Server.
Enter the following SQL statement to add a system user to the Administrator group
Copy Code code as follows:
--Open advanced options to see OLE Automation procedures OLE Automation turned on No
EXEC [SYS]. [sp_configure] @configname = ' Show advanced options ',-varchar (35)
@configvalue = 1--int
Reconfigure with override
Go
--See if Open
EXEC [SYS]. [sp_configure]
--If not, open it.
EXEC [SYS]. [sp_configure] @configname = ' Ole automation procedures ',--varchar (35)
@configvalue = 1--int
Copy Code code as follows:
--Add a hack user, the owning user group is administrators
DECLARE @shell INT
EXEC sp_OACreate ' Wscript.Shell ', @shell out
EXEC sp_OAMethod @shell, ' run ', NULL, ' Net user Hack/add '
EXEC sp_OAMethod @shell, ' run ', NULL, ' net localgroup Administrators hack/add '
Enter the system with hack users, hack the password is empty, and then enter the computer-"right-" management-"Local Users and Groups-" Set the password of the administrator to NULL,
Then open Task Manager, click the "User" tab, in the user interface, select Hack user, right-"Disconnected, Windows pop-up dialog box said hack user's Windows session will end,
Data can not be saved, select "Yes", and then pop-up Login dialog box, in the User name input box input "Administrator", Password input box is a blank password, successfully logged on to the desktop
Fortunately, some knowledge of SQL Server database security, or really to reload the system, the whole process is the use of OLE Automation, he is equivalent to give you a CMD environment, so you can enter the cmd command
In fact, I think SQL Server to use Windows services to write this idea is very good, do not boot and then need to double-click Sqlserver.exe to run the Windows service, the boot will not have to enter the desktop
My boss told me that larger platform software is typically written with Windows services, and that the key core components are run with Windows services, like our company's software
Most of the core features are run with Windows services. But there's a downside to using Windows services, which is that if the service doesn't start up, your software won't run, just like SQL Server.