Setting up autofs help

Need help setting up autofs. I followed the tutorial and when I check to see if it’s set up correctly in terminal I get error message:

osmc@osmc:~$ ls -lah /mnt/kuro/gtest
ls: cannot open directory ‘/mnt/kuro/gtest’: No such file or directory

error log from automount:

Starting automounter version 5.1.2, master map /etc/auto.master
using kernel protocol version 5.02
lookup_nss_read_master: reading master file /etc/auto.master
do_init: parse(sun): init gathered global options: (null)
lookup_read_master: lookup(file): read entry +dir:/etc/auto.master.d
lookup_nss_read_master: reading master dir /etc/auto.master.d
lookup(dir): dir map /etc/auto.master.d missing or not readable
lookup(file): failed to read included master map dir:/etc/auto.master.d
lookup_read_master: lookup(file): read entry +auto.master
lookup_nss_read_master: reading master files auto.master
do_init: parse(sun): init gathered global options: (null)
lookup(file): failed to read included master map auto.master
lookup_read_master: lookup(file): read entry /-
master_do_mount: mounting /-
automount_path_to_fifo: fifo name /var/run/autofs.fifo–
lookup_nss_read_map: reading map file /etc/auto.smb.shares
do_init: parse(sun): init gathered global options: (null)
mounted direct on /mnt/kuro/gtest with timeout 15, freq 4 seconds
do_mount_autofs_direct: mounted trigger /mnt/kuro/gtest
st_ready: st_ready(): state = 0 path /-
handle_packet: type = 5
handle_packet_missing_direct: token 4, name /mnt/kuro/gtest, request pid 2962
attempting to mount entry /mnt/kuro/gtest
lookup_mount: lookup(file): looking up /mnt/kuro/gtest
lookup_mount: lookup(file): /mnt/kuro/gtest -> -fstype=cifs,rw,ver=3.0,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc ://192.168.1.4/gtest/
parse_mount: parse(sun): expanded entry: -fstype=cifs,rw,ver=3.0,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc ://192.168.1.4/gtest/
parse_mount: parse(sun): gathered options: fstype=cifs,rw,ver=3.0,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc
parse_mount: parse(sun): dequote("://192.168.1.4/gtest/") -> ://192.168.1.4/gtest/
parse_mount: parse(sun): core of entry: options=fstype=cifs,rw,ver=3.0,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc, loc=://192.168.1.4/gtest/
sun_mount: parse(sun): mounting root /mnt/kuro/gtest, mountpoint /mnt/kuro/gtest, what //192.168.1.4/gtest/, fstype cifs, options rw,ver=3.0,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc
do_mount: //192.168.1.4/gtest/ /mnt/kuro/gtest type cifs options rw,ver=3.0,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc using module generic
mount_mount: mount(generic): calling mkdir_path /mnt/kuro/gtest
mount_mount: mount(generic): calling mount -t cifs -o rw,ver=3.0,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc //192.168.1.4/gtest/ /mnt/kuro/gtest

mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount(generic): failed to mount //192.168.1.4/gtest/ (type cifs) on /mnt/kuro/gtest
dev_ioctl_send_fail: token = 4
failed to mount /mnt/kuro/gtest
st_expire: state 1 path /-
expire_proc: exp_proc = 4103074896 path /-
expire_cleanup: got thid 4103074896 path /- stat 0
expire_cleanup: sigchld: exp 4103074896 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
statemachine:1500: got unexpected signal 28!
statemachine:1500: got unexpected signal 28!
statemachine:1500: got unexpected signal 28!
statemachine:1500: got unexpected signal 28!
statemachine:1500: got unexpected signal 28!

Text in /etc/auto.smb.shares

/mnt/kuro/gtest -fstype=cifs,rw,ver=3.0,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc ://192.168.1.4/gtest/

I’ve tried every “ver=” and without it. Tried without smbcredentials and having user and pw in command line.

.smbcredentials is set up properly as far as I can tell.

username=myusername
password=mypassword

Added to end of /etc/auto.master

/- /etc/auto.smb.shares --timeout 15 browse

I am able to see the directory if I add the directory through SMB so the server is fine.

Also able to see the directory when I browse to root, but kodi cannot find any files in the directory.

Tutorials I followed:


Thanks for any help.

Real quick, I can see it is not. Use equal signs, not colons.

After changing the credentials file, and with autofs disabled/stopped, try the following from the command line (as root):

mount -t cifs -o rw,credentials=/home/osmc/.smbcredentials,uid=osmc,gid=osmc //192.168.1.4/gtest /mnt/kuro/gtest

If it fails, the error should be easier to debug. If it succeeds, then something in your autofs config file is wrong. Based on part of the error message, I think it’s an extra colon:

loc=://192.168.1.4/gtest/
1 Like

.smbcredentials is correct. I transcribed it over incorrectly when posting in forum.

username=user
password=pwd

This is what I get when I type in that command in root:

osmc@osmc:~$ sudo su
root@osmc:/home/osmc# mount -t cifs -o rw,credentials=/home/osmc/.smbcredentials,uid=osmc,gid=osmc //192.168.1.4/gtest /mnt/kuro/gtest
Couldn’t chdir to /mnt/kuro/gtest: No such file or directory

Thanks.

That’s simple enough:

mkdir -p /mnt/kuro/gtest

And, try the mount again.

root@osmc:/home/osmc# mkdir -p /mnt/kuro/gtest
root@osmc:/home/osmc# mount -t cifs -o rw,credentials=/home/osmc/.smbcredentials,uid=osmc,gid=osmc //192.168.1.4/gtest /mnt/kuro/gtest
mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
root@osmc:/home/osmc#

Thanks.

Hi,

I’m not sure if it will make any difference, but it should be:

vers=3.0

Thanks Tom.

That was it, such a silly error. Thank you Tom and nabsltd.

1 Like