Skip to content
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

[QUESTION] Windows Authentication for User not Logged In #413

Open
ccowin-odhsoha opened this issue Sep 30, 2024 · 0 comments
Open

[QUESTION] Windows Authentication for User not Logged In #413

ccowin-odhsoha opened this issue Sep 30, 2024 · 0 comments
Labels
question Further information is requested

Comments

@ccowin-odhsoha
Copy link

Question
Hello, I'm looking for some guidance on if what I'm doing is possible and I'm just doing it wrong or if it is not possible. I have two accounts one for my local machine and another for my server. Neither can log into the other machine, The desktop user is also the owner of the SQL database and table that I'm trying to access. I thought it would be possible to provide the username and password of the desktop user within the settings.py but I keep getting the following error:

django.db.utils.InterfaceError: ('28000', "[28000] [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Login failed for user 'DHS\\OR0270734'. (18456) (SQLDriverConnect); [28000] [Microsoft][ODBC Driver 18 for SQL Server]Invalid connection string attribute (0); [28000] [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Login failed for user '{domain}//{username}'. (18456); [28000] [Microsoft][ODBC Driver 18 for SQL Server]Invalid connection string attribute (0)"

From settings:

DATABASES = {
    "default": {
        "ENGINE": "mssql",
        "NAME": 'GIS',
        "USER": '{domain}//{username}',
        "PASSWORD": '{password}',
        "HOST": 'WPDHSSQLL36\PRODI2',
        "OPTIONS": {
            'driver': 'ODBC Driver 18 for SQL Server'
        }
    }
}

I've also tried every format I can think of with the domain/username so that might be an issue. Tried both forward and backward slash with one and two slashes. Also tried the domain at the end separated by a @.

Relevant Issues and Pull Requests

@ccowin-odhsoha ccowin-odhsoha added the question Further information is requested label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant