supervisor: Mounting to Network Share Failed using guest

The problem

I can’t connect Home Assistant to samba share. I got USB drive connected to Asus router. Guest login is allowed and no user and pass is needed. When I type \192.168.0.1\ext1 to windows explorer I can access this share. I can use this share from all other devices in my network. For example media players, android mobiles, TV set top boxes.

What version of Home Assistant Core has the issue?

2023.6

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Jun 08 17:13:08 homeassistant systemd[1]: Mounting Supervisor cifs mount: wrt...
Jun 08 17:13:08 homeassistant kernel: CIFS: Attempting to mount \\192.168.0.1\ext1
Jun 08 17:13:08 homeassistant mount[7193]: Password for root@//192.168.0.1/ext1:
Jun 08 17:13:08 homeassistant mount[7192]: mount error(22): Invalid argument
Jun 08 17:13:08 homeassistant mount[7192]: Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
Jun 08 17:13:08 homeassistant systemd[1]: mnt-data-supervisor-mounts-wrt.mount: Mount process exited, code=exited, status=32/n/a
Jun 08 17:13:08 homeassistant systemd[1]: mnt-data-supervisor-mounts-wrt.mount: Failed with result 'exit-code'.
Jun 08 17:13:08 homeassistant systemd[1]: Failed to mount Supervisor cifs mount: wrt.
Jun 08 17:13:08 homeassistant kernel: CIFS: VFS: cifs_mount failed w/return code = -22

Additional information

image image

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 2
  • Comments: 15 (5 by maintainers)

Most upvoted comments

You are still off-topic here @markli96, you are using username/password, this issue is about guest access. Your problem is that your router is using too old SMB, you need 2.1 or higher.

Hi, I don’t know if I should create a new issue, but I am having the same problem when using guest access and also when using username and password.

I have just purchased TP-Link AX55 and I tried to find, what SMB it supports and it should be version 2. But I don’t know if it is 2.0 or 2.1+.

When I use guest mode, the log looks like this:

Jun 10 06:52:00 homeassistant systemd[1]: Mounting Supervisor cifs mount: TPLinkShare… Jun 10 06:52:00 homeassistant kernel: CIFS: Attempting to mount \192.168.2.1\G Jun 10 06:52:00 homeassistant mount[234819]: Password for root@//192.168.2.1/G: Jun 10 06:52:00 homeassistant mount[234818]: mount error(22): Invalid argument Jun 10 06:52:00 homeassistant mount[234818]: Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg) Jun 10 06:52:00 homeassistant kernel: CIFS: VFS: cifs_mount failed w/return code = -22 Jun 10 06:52:00 homeassistant systemd[1]: mnt-data-supervisor-mounts-TPLinkShare.mount: Mount process exited, code=exited, status=32/n/a Jun 10 06:52:00 homeassistant systemd[1]: mnt-data-supervisor-mounts-TPLinkShare.mount: Failed with result ‘exit-code’. Jun 10 06:52:00 homeassistant systemd[1]: Failed to mount Supervisor cifs mount: TPLinkShare.

And when I use username and password it looks like this:

Jun 10 06:56:35 homeassistant systemd[1]: Mounting Supervisor cifs mount: TPLinkShare… Jun 10 06:56:35 homeassistant kernel: CIFS: Attempting to mount \192.168.2.1\G Jun 10 06:56:35 homeassistant mount[236248]: mount error(22): Invalid argument Jun 10 06:56:35 homeassistant mount[236248]: Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg) Jun 10 06:56:35 homeassistant kernel: CIFS: VFS: cifs_mount failed w/return code = -22 Jun 10 06:56:35 homeassistant systemd[1]: mnt-data-supervisor-mounts-TPLinkShare.mount: Mount process exited, code=exited, status=32/n/a Jun 10 06:56:35 homeassistant systemd[1]: mnt-data-supervisor-mounts-TPLinkShare.mount: Failed with result ‘exit-code’. Jun 10 06:56:35 homeassistant systemd[1]: Failed to mount Supervisor cifs mount: TPLinkShare.

The network folder \\192.168.2.1\g is accessible via windows file manager. image

image image

And here is my router settings: image image

I have tried to use //TPShare instead of router IP address (192.168.2.1), but the home assistant cannot resolve the domain address.

Jun 10 07:06:54 homeassistant systemd[1]: Mounting Supervisor cifs mount: TPLinkShare… Jun 10 07:06:55 homeassistant systemd[1]: run-docker-runtime\x2drunc-moby-c29cbc5cac75c6e24aff381328f982a1d31790f4f1c788c1976286a659b5e26f-runc.dKe0GS.mount: Deactivated successfully. Jun 10 07:06:58 homeassistant mount[238429]: mount error: could not resolve address for TPShare: Unknown error Jun 10 07:06:58 homeassistant systemd[1]: mnt-data-supervisor-mounts-TPLinkShare.mount: Mount process exited, code=exited, status=1/FAILURE Jun 10 07:06:58 homeassistant systemd[1]: mnt-data-supervisor-mounts-TPLinkShare.mount: Failed with result ‘exit-code’. Jun 10 07:06:58 homeassistant systemd[1]: Failed to mount Supervisor cifs mount: TPLinkShare.

I hope this will help someone to fix this. Thank you in advance.

No, that is not the same. For CIFS we currently do not support guest access (what this issue is about).

For version, you need to be running 2.1+ on your NAS/router/server. “-22” error, means something was wrong, it’s a catch-all error.

Hi. I have the same issue with same error message (mount error).

I can connect to my USB drive connected to my router in Windows but cannot connect via HA.

image This happens if any user name is used. For example: anonymous, guest, the login name for my router, the name of my PC