vb.net SQL Server 登录禁用 Windows 身份验证
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19973787/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
SQL Server Login Disable windows authentication
提问by Codemunkeee
my database filename is crystal.mdf, I tried adding logins with the help from this link VB.net and SQL Server 2005 Setting up Database password for standalone app
我的数据库文件名是 Crystal.mdf,我尝试在此链接的帮助下添加登录名VB.net 和 SQL Server 2005 为独立应用程序设置数据库密码
I can login using sql server authentication using a password and username.
我可以使用密码和用户名使用 sql server 身份验证登录。
The problem is, I CAN open the database using windows authentication. This will allow the user (if the user is a techie guy and would like to dig things up) to change the values on the database, which might give errors to my application..
问题是,我可以使用 windows authentication 打开数据库。这将允许用户(如果用户是技术人员并且想要挖掘事物)更改数据库上的值,这可能会给我的应用程序带来错误..
I don't want the users to open the database using windows authentication for security purposes, because I will deploy the application on a different place.
我不希望用户出于安全目的使用 Windows 身份验证打开数据库,因为我会将应用程序部署在不同的地方。
To summarize,
总结一下,
I want to disable windows authentication (is this even possible?) If not, how can I, atleast make the database secure that the user won't be able to open it via windows authentication?
我想禁用 Windows 身份验证(这甚至可能吗?)如果不是,我怎样才能至少使数据库安全,用户将无法通过 Windows 身份验证打开它?
EDIT
编辑
回答by user30410
You can disable the Windows Authenticated User by : Security Tab --> logins --> Right click on that login -> Properties -> status ->Enable/Disable -> click Disable
您可以通过以下方式禁用 Windows 身份验证用户:安全选项卡 --> 登录 --> 右键单击该登录名 -> 属性 -> 状态 -> 启用/禁用 -> 单击禁用
OR
或者
ALTER LOGIN [Domain\username] DISABLE
回答by Rahal
At the moment you may can't do this. Backup all DBs(not into default location) and re-install SQL Server using create fresh windows user account which have admin privileges. Then you can keep your windows authentication mode loin safer by protecting the windows user account.
目前你可能无法做到这一点。备份所有数据库(不是默认位置)并使用创建具有管理员权限的新 Windows 用户帐户重新安装 SQL Server。然后,您可以通过保护 Windows 用户帐户使您的 Windows 身份验证模式更加安全。

