-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SqlServerLogin: When LoginMode is 'Integrated' there is no error thrown #1179
Comments
I was going to open a new issue, but I think my issue is the same as this one, so I second this request. I ran into this today, and spent several hours trying to identify the root cause because I thought I was dealing with "Password failed validation for login" instead of more quickly realizing that the server itself was simply in Windows Authentication (Integrated) mode. Now that I identified my issue, hopefully the details below might save someone else some time. IssueI have 2 SQL Servers both running SQL Server 2016 using version 11.2.0.0 of the SqlServerDsc module. I am using this code on both servers:
On server 1, the code above adds the SqlLogin and results in Compliant. On server 2, the same code adds the SqlLogin, but results in:
Running
CauseSince I was unable to login to server 2 using ssrslogin even when it showed Compliant, I assumed it had something to do with #1048. However, that bug is fixed in version 11.2.0.0 of SqlServerDsc (Many thanks to @claudiospizzi for resolving it.) In the end, the issue was:
|
@mjcarrabine indeed sounds like the same issue. I labeled this as a good first issue since this this should be an easy change for a new contributor. Looks like it "just" needs adding a regression test and then changing the regex. |
I will run with this - I need something to test issue #1260 on. |
- Now when adding a login of type SqlLogin, and the SQL Server login mode is set to `'Integrated'`, an error is correctly thrown (issue dsccommunity#1179).
- Now when adding a login of type SqlLogin, and the SQL Server login mode is set to `'Integrated'`, an error is correctly thrown (issue dsccommunity#1179).
Details of the scenario you tried and the problem that is occurring
When adding an SqlLogin, and the
$serverObject.LoginMode
is'Integrated'
there is no error thrown.I don't think
Integrated
should be in this regex expression. 🤔https://github.com/PowerShell/SqlServerDsc/blob/024ce324018e847b134cfffd6355a035e1086e2b/DSCResources/MSFT_SqlServerLogin/MSFT_SqlServerLogin.psm1#L233-L236
But rather it should be
'Mixed|Normal'
according to this list.https://docs.microsoft.com/en-us/dotnet/api/microsoft.sqlserver.management.smo.serverloginmode?view=sqlserver-2016
The DSC configuration that is using the resource (as detailed as possible)
Version of the operating system and PowerShell the target node is running
SQL Server edition and version the target node is running
What SQL Server PowerShell modules, and which version, are present on the target node.
Version of the DSC module you're using, or write 'dev' if you're using current dev branch
Dev
The text was updated successfully, but these errors were encountered: