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

Unable to login to Azure drives from linux #256

Open
davymcf opened this issue Dec 10, 2023 · 1 comment
Open

Unable to login to Azure drives from linux #256

davymcf opened this issue Dec 10, 2023 · 1 comment

Comments

@davymcf
Copy link

davymcf commented Dec 10, 2023

I am unable to connect to azure drives from a python application running on a lambda container :

`FROM public.ecr.aws/lambda/python:3.8

RUN yum update -y &&
yum install -y gcc python-devel krb5-devel krb5-workstation python-devel &&
yum clean all

COPY requirements.txt /requirements.txt

RUN pip install --trusted-host files.pythonhosted.org --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org -r /requirements.txt

COPY ./code ${LAMBDA_TASK_ROOT}

CMD ["lambda_function.lambda_handler"]
`

Requirements:
smbprotocol[kerberos]
krb5
gssapi

Errror: [ERROR] LogonFailure: Received unexpected status from the server: The attempted logon is invalid. This is either due to a bad username or authentication information. (3221225581) STATUS_LOGON_FAILURE: 0xc0    raise SMBResponseException(response)kages/smbprotocol/connection.py"

I am successful in connecting to the drive when running the application locally via PyCharm py3.8 on Macos, with the above python dependencies.

I have also tried using DOMAIN\username and username@domain.com.
Another note is that I am able to connect to other drives using this user within my docker container.

@jborean93
Copy link
Owner

Hi sorry I missed this issue. I'm not sure why the server has replied with this error but if it worked on your macOS with the same credentials but not in the container it could be that the version of MIT krb5 has a problem authenticating with the server. Looking online it seems like that Lamba image is based on Amazon Linux 2 which is based on RHEL 7 and can have older packages. It might be worthwhile attempting to fallback to ntlm auth to rule out whether it's a problem with the Kerberos libraries or not.

Unfortunately I don't really have such an environment to test these things out but it certainly seems like something specific to the OS it's running on, especially if it works from your macOS host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants