Mounting NAS share via CIFS in HASSIO - access denied

My Home Assistant OS 7.2, core 2021.12.10, IP 192.168.122.xxx lives inside Virtual Machine Manager on a desktop Ubuntu machine. My NAS lives in the same network as the Ubuntu machine (192.168.50.xxx), and publishes a Samba-share //myip/Multimedia

On the host I installed cifs-utils. Now I can mount the share (it asks for the password):

When I run the same command in the HA terminal, it fails with “permission denied”:

The mountpoint folders have identical permissions on host system and HA
image

I’ve tried specifying -o 'vers=2.0' or 1.0 or 3.0. “permission denied”.

I’d appreciate any suggestions to troubleshoot this…

Yeah, would also be great fo my VirtualBox-installation to include a fileshare in HASSio. Appreciate any idea as well.

Same here: Permission denied. The same command works from another linux machine

1 Like

I’ve managed to mount my SMB-share every time the HA-VM starts, like this:

  • a shell command is defined in HA configuration.yaml:
shell_command:
  mount_nas_folder: mkdir -p /media/multimedia;mount -t cifs -o vers=1.0,noserverino,username=ticon367,password=PUTYOUROWNPASSWORDHERE,domain=WORKGROUP //192.168.50.XXX/Multimedia /media/multimedia
  • an automation calls the shell-command on HA-start
alias: Mount Multimedia folder from NAS
description: ""
trigger:
  - platform: homeassistant
    event: start
condition: []
action:
  - service: shell_command.mount_nas_folder
    data: {}
mode: single

Could I ask where this is usable? e.g can it be used in addons?

Only a few more days until 2023.06 which will include remote NAS shares as part of HA.