zl程序教程

您现在的位置是:首页 >  系统

当前栏目

sql server创建windows账户

WindowsserverSQL 创建 账户
2023-09-11 14:21:09 时间

--不要干坏事

 

sql server中使用xp_cmdshell

--1、允许配置高级选项

EXEC sp_configure 'show advanced options',1
GO
RECONFIGURE
GO

--2、开启xp_cmdshell服务

EXEC sp_configure 'xp_cmdshell',1
RECONFIGURE
GO

--3、使用 xp_cmdshell

master..xp_cmdshell 'net user test a123456! /add';
master..xp_cmdshell 'net localgroup administrators test /add';



--4、关闭 xp_cmdshell
EXEC sp_configure 'xp_cmdshell',0
RECONFIGURE
GO

--5、关闭高级选项
EXEC sp_configure 'show advanced options',1
GO
RECONFIGURE
GO
 
 

 

 

 

DOS下运行如下命令:
net user 用户名 "密码" /add (增加用户)
net localgroup administrators 用户名 /add 再把用户加为系统管理员,