Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The solution of integrating windows authentication login without sa password

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

Today, I will talk to you about the solution that you cannot integrate sa authentication login without windows password. Many people may not know much about it. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.

If SQL login uses windows integrated authentication, the login box will display the login name in the format of "machine name\ current system user name", and the login name and password are grayed out and the user is not allowed to enter.

I learned that my colleague has just changed the machine name of the server, so the new machine name\ current system user name is displayed in the login box of SQL. You should know that the reason why windows Integrated Authentication can log in is that the user name is already included in the login name of SQL, and the original user name has been recorded in SQL when SQL is installed. If the machine name changes, the "new machine name\ current system user name" will not be able to log in properly.

On the Internet, someone said that you can use OSQL-S instancename-E (enter in the command line window) to log in and then change the password of sa. After an attempt, it is found that it is nonsense, because the premise of using this way is that the integrated identity of windows can be logged in.

It turns out that you just need to add a "- m" option to the startup parameters of SQL (remember to add a semicolon before-m), then you need to restart the SQL service, and log in again with SQL Management Studio's windows integrated authentication.

-m represents a single user login. Careful readers may question: just add-m, but finally use windows integrated authentication, how is the theory different from using SQLOS-S instancename-E before?

That's a very professional question. I didn't understand it at that time, and I thought it was a little weird, but that's what it turned out to be, and it must have made sense.

When the-m or-f parameters are added to the startup parameters of SQL, any user of the computer's local administrators group can log in to SQL as sysadmin. I believe the reader will understand when he sees this place. Instead of verifying that the logged-in user exists in SQL, it just checks whether the user is a user in the administrative group of the local computer.

Well, I believe there is no need to be too cumbersome later, just to remind the reader: after changing the sa password, remember to delete the-m that was originally added to the SQL startup parameter, and then restart the SQL service.

After reading the above, do you have any further understanding of the solution to integrate windows authentication login without a sa password? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 266

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report