home-assistant / supervisor

:house_with_garden: Home Assistant Supervisor
https://home-assistant.io/hassio/
Apache License 2.0
1.77k stars 643 forks source link

Using SMB Share only as non-domain User! #5104

Closed knebb closed 4 months ago

knebb commented 5 months ago

Describe the issue you are experiencing

I am trying to map a network share on my QNAP NAS. The NAS is configured as AD-Domain Controller and uses domain accounts for authentication. I went on my HAOS to Settings -> System -> Storage -> Network Storage -> Add Network Storage.

I configured everything but always got the following error when trying to save:

2024-05-23 16:58:44.405 haos kernel: CIFS: Status code returned 0xc000006d STATUS_LOGON_FAILURE

For testing purposes I tried to map the share to one of my other Linux boxes and I got the same error. Adding the domain part (i.e. in /etc/fstab) and the mount succeeded immediately! This in my good line in /etc/fstab: \\qnap\haos-backup /mnt cifs domain=mydom,credentials=/root/secret3.txt,_netdev 0 0 Removeing the "domain=..." part resulted in the same error I got on my HAOS.

So I assume I need to tell my HOAS to add the domain part somehow. Unfortunately I do not see any option to do so!

And no, there is not need to "join" HAOS to the domain, it works without joining them- my Linux boxes are not part of the domain!

We just need an (optional) field to add the domain name. I.e by allowing the Windows-Systax DOMAIN\USERNAME in the username field.

To make sure this is the issue I create a local-only user on my NAS and used this user to map the network drive. It succeeded immediately!

So please add some option for optional domain support in "Map Network Share"

/KNEBB

What type of installation are you running?

Home Assistant OS

Which operating system are you running on?

Home Assistant Operating System

Steps to reproduce the issue

  1. Try to connect as domain user --> fails
  2. Using a non-domain user --> succeeds
  3. ...

Anything in the Supervisor logs that might be useful for us?

2024-05-23 16:58:44.333 haos systemd[1]: Mounting Supervisor cifs mount: qn...
2024-05-23 16:58:44.339 haos kernel: CIFS: Attempting to mount //qnap.domain.de/haos-backup
2024-05-23 16:58:44.405 haos kernel: CIFS: Status code returned 0xc000006d STATUS_LOGON_FAILURE
2024-05-23 16:58:44.405 haos kernel: CIFS: VFS: \\qnap.domain.de Send error in SessSetup = -13
2024-05-23 16:58:44.409 haos kernel: CIFS: VFS: cifs_mount failed w/return code = -13
2024-05-23 16:58:44.409 haos mount[133857]: mount error(13): Permission denied
2024-05-23 16:58:44.409 haos mount[133857]: Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
2024-05-23 16:58:44.413 haos systemd[1]: mnt-data-supervisor-mounts-qn.mount: Mount process exited, code=exited, status=32/n/a
2024-05-23 16:58:44.413 haos systemd[1]: mnt-data-supervisor-mounts-qn.mount: Failed with result 'exit-code'.
2024-05-23 16:58:44.413 haos systemd[1]: Failed to mount Supervisor cifs mount: qn.

System Health information

No repairs available

Supervisor diagnostics

config_entry-hassio-a56acf874c749be29ec07926bc682e03.json

Additional information

No response

github-actions[bot] commented 4 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.