-
Notifications
You must be signed in to change notification settings - Fork 74
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
smbprotocol.exceptions.AccessDenied with require_signing=False #290
Comments
Thanks Max, for the report Is this test executed using a Samba container? See the last part of the "Testing" section from the Readme https://github.com/jborean93/smbprotocol/blob/master/README.md#testing
There are various automated tests for example this one smbprotocol/tests/test_connection.py Lines 972 to 991 in a951779
It would help to get this reproduced using the automated tests. In this way, if this needs an improvement to the tests, once this is fixed, we know that this use case is covered for any of the future releases |
No. I have simply installed the Ubuntu samba package via apt.
At this point, I feel veritably cursed to trigger every possible issue. The tests failed because I had an
After renaming that by stripping the .py extension, the tests run through successfully. Although there are some skipped ones because of Partial log output
I am probably still misconfiguring something ... The credentials work with smbclient (and anonymous login also works, so they shouldn't even be necessary). Your linked |
Potentially Samba is adding another check on the tree to not allow tree connects without signing. I'll have to try and set up a test environment to try this out to see what is happening here. Edit: This actually shouldn't matter, |
sudo apt install samba [visualstudio] sudo smbpasswd -a kali sudo systemctl start smbd mkdir /home/kali/data |
Ok I was wrong, the
It looks like Samba requires either signing or encryption to be used when the dialect is SMB 3.11 or greater. The check for this is at https://github.com/samba-team/samba/blame/9ad287ed9c4a06c34db4e6431e5845ffd2100e2a/source3/smbd/smb2_tcon.c#L240-L253 and doesn't seem to be controllable. While the kwarg name is poorly named it's not something I can change at this point in time and Samba requires signing or encryption for non-guest sessions. Without it you'll see this failure. |
I have set up a samba share:
I have successfully connected to it with:
and even with:
However, with
require_signing=False
, i.e.:I get:
which make no sense to me. I am only lowering requirements, not outright disabling signing. And why should the login still succeed but only result in an access rights error for listing the share further on?
The text was updated successfully, but these errors were encountered: