Sorry for the bother but i’m trying to get Autofs to work with a NAS specifically the Unifi nas Pro using SMB. I have connected to the NAS using SMB multiple times from both Mac and PC using Mac Finder/Windows file explorer. I have also tested that the credentials im using work on other devices. I have followed this document (Mounting network shares with autofs (alternative to fstab) - General - OSMC) but still have no luck i am wondering if i need to specify a version or im doing something else wrong. Any advice would be much appreciated
CONTENTS of my
etc/auto.master file
#
# Sample auto.master file
# This is a 'master' automounter map and it has the following format:
# mount-point [map-type[,format]:]map [options]
# For details of the format look at auto.master(5).
#
#/misc /etc/auto.misc
#
# NOTE: mounts done from a hosts map will be mounted with the
# "nosuid" and "nodev" options unless the "suid" and "dev"
# options are explicitly given.
#
#/net -hosts
#
# Include /etc/auto.master.d/*.autofs
# To add an extra map using this mechanism you will need to add
# two configuration items - one /etc/auto.master.d/extra.autofs file
# (using the same line format as the auto.master file)
# and a separate mount map (e.g. /etc/auto.extra or an auto.extra NIS map)
# that is referred to by the extra.autofs file.
#
+dir:/etc/auto.master.d
#
# If you have fedfs set up and the related binaries, either
# built as part of autofs or installed from another package,
# uncomment this line to use the fedfs program map to access
# your fedfs mounts.
#/nfs4 /usr/sbin/fedfs-map-nfs4 nobind
#
# Include central master map if it can be found using
# nsswitch sources.
#
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes
# precedence.
#
+auto.master
/- /etc/auto.smb.shares --timeout 15 browse
Thanks for your post. Congratulations on being the first (and hopefully last) person to post on our forums and get accidentally banned. I do apologise.
Sometimes our moderation system will flag a post particularly for new users: in your case it was because it thought you typed to fast. I suspect you pre-typed the post somewhere else and copied and pasted it here or you just type fast…
The same flag came up on this new post.
I have manually adjusted your trust level on your account so you shouldn’t have such restrictions in the future.
I always forget, but I think on some versions of autofs you actually have to mkdir the target directory you plan to mount over, e.g. you should mkdir -p /mnt/unifi/videos.
below is the output of systemctl status autofs
Also sorry but i did make the directory /mnt/unifi/videos but when autofs is running even though i can see the directory using ls i cannot access it with cd or view its contents with ls
as shown by these commands as i was able to run
osmc@SkydiveDanielsonOSMC:~$ cd /mnt/unifi/videos/
-bash: cd: /mnt/unifi/videos/: No such file or directory
osmc@SkydiveDanielsonOSMC:~$ systemctl stop autofs
osmc@SkydiveDanielsonOSMC:~$ cd /mnt/unifi/videos/
osmc@SkydiveDanielsonOSMC:/mnt/unifi/videos$
osmc@SkydiveDanielsonOSMC:~$ systemctl status autofs
autofs.service - Automounts filesystems on demand
Loaded: loaded (/lib/systemd/system/autofs.service; enabled; vendor preset>
Active: active (running) since Tue 2025-05-20 19:23:04 EDT; 59s ago
Docs: man:autofs(8)
Process: 2516 ExecStart=/usr/sbin/automount $OPTIONS --pid-file /var/run/au>
Main PID: 2546 (automount)
Tasks: 4 (limit: 3659)
Memory: 4.5M
CGroup: /system.slice/autofs.service
`-2546 /usr/sbin/automount --pid-file /var/run/autofs.pid
May 20 19:23:03 SkydiveDanielsonOSMC systemd[1]: Starting Automounts filesystem>
May 20 19:23:04 SkydiveDanielsonOSMC systemd[1]: Started Automounts filesystems>
lines 1-13/13 (END)…skipping…
autofs.service - Automounts filesystems on demand
Loaded: loaded (/lib/systemd/system/autofs.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2025-05-20 19:23:04 EDT; 59s ago
Docs: man:autofs(8)
Process: 2516 ExecStart=/usr/sbin/automount $OPTIONS --pid-file /var/run/autofs.pid (code=exited, status=0/SUCCESS)
Main PID: 2546 (automount)
Tasks: 4 (limit: 3659)
Memory: 4.5M
CGroup: /system.slice/autofs.service
`-2546 /usr/sbin/automount --pid-file /var/run/autofs.pid
May 20 19:23:03 SkydiveDanielsonOSMC systemd[1]: Starting Automounts filesystems on demand…
May 20 19:23:04 SkydiveDanielsonOSMC systemd[1]: Started Automounts filesystems on demand.
@bryandlong , I cleaned your posting. If you want to post some logs or configs it is best to use the “Preformatted Text” button </> or you can use the Code block marker “````”
For your problem maybe we start with something easy. On the Vero run sudo apt install smbclient and the run the command: smbclient -U osmc -L 192.168.1.38
Thank you For the feedback i appreciate it and will make sure to use the </> button going forward. if i should format it in any other way going forward let me know and sorry for the inconvenience
here is the output of the smbclient -U osmc -L 192.168.1.38 command
osmc@SkydiveDanielsonOSMC:~$ smbclient -U osmc -L 192.168.1.38
Enter WORKGROUP\osmc's password:
Sharename Type Comment
--------- ---- -------
Fun_Jumpers Disk
Corporate Disk
Personal-Drive Disk UniFi Drive Personal-Drive
IPC$ IPC IPC Service (UniFi Samba Server 4.13.13-Debian)
SMB1 disabled -- no workgroup available
sudo mkdir -p /mnt/unifi/videos
osmc@SkydiveDanielsonOSMC:~$ sudo mount -t cifs -o rw,vers=3.0,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc //192.168.1.38/Fun_Jumpers/ /mnt/unifi/videos
osmc@SkydiveDanielsonOSMC:~$ cd /mnt/unifi/videos/
Documents/ .DS_Store Videos/
osmc@SkydiveDanielsonOSMC:~$ cd /mnt/unifi/videos/Videos/
Compilations/ .DS_Store Other/ People/
osmc@SkydiveDanielsonOSMC:~$ cd /mnt/unifi/videos/Videos/People/
Bryan/ Ivy/ Nick LoBianco/ Philip Tancreade/
Dan Eisnor/ Melissa/ Nicky Lee/ Sean Caruso/
.DS_Store Nathaniel/ Pat V/ Sort/
osmc@SkydiveDanielsonOSMC:~$ cd /mnt/unifi/videos/Videos/People/
Your an absolute Genius Sir my problem has been solved after restarting autofs i can now see the NAS share. i am doing all this over a VPN so i cant confirm visually but would the gui need any configuration for the share to show up when file browsing?
Also if anyone is curious this is the final /etc/auto.smb.shares