From a Windows machine, log into router's /mnt/usb as named user (not guest) with write privileges.
From Ubuntu, log into a Windows machine's shared folder as named user with write privileges.
Having done that, I thought I could simply model myself on the last bullet and mount router's /mnt/usb from Ubuntu, with something like:
sudo mount -t cifs -o username=bobby,uid=1000,gid=1000 //192.168.1.1/mnt/usb /mnt/router_usb
where "bobby" is both a Linux user and ksmbd user in the router as well as a Linux user in Ubuntu (though I think this last bit does not matter). "bobby" uid is 1000 at both router and Ubuntu.
But the command failed. The error message is "mount error(2): No such file or directory", or in more detail:
bobby@ub18-em:~$ sudo mount -t cifs -o username=bobby,uid=1000,gid=1000 //192.168.1.1/mnt/usb /mnt/router_usb
[sudo] password for bobby:
Password for bobby@//192.168.1.1/mnt/usb: ******
mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
bobby@ub18-em:~$
I've done some Web searches, but apparently this area of mount -t cifs is fraught with technicalities.
Thanks! Totally worked for an smb share (e.g. a Windows folder), including the Ctrl+D bookmarking. Mount was good not just for Nautilus but showed in Thunar too.
Doesn't seem to mount a ksmbd share though. ("Oops! Something went wrong. Unhandled error message: Failed to mount Windows share: Invalid argument".) Failed while the OpenWrt ksmbd share location was up in a Windows machine; so I know the location was available.
Thanks. I believe the command edits /etc/samba/smb.conf. What would the lines look like if I were to open the conf file and hand-insert them?
I did try running the command. I thought it was meant to be one line. I tried both of these (the difference being a space after =/d or not):
sudo sed -i -e "/^\s*client min protocol =/d /^\[global\]$/a \\\tclient min protocol = NT1" /etc/samba/smb.conf
sudo sed -i -e "/^\s*client min protocol =/d/^\[global\]$/a \\\tclient min protocol = NT1" /etc/samba/smb.conf
But either gave me:
sed: -e expression #1, char 29: extra characters after command
I ran command on a copy of smb.conf (to preserve the original till I knew what I was about).
That didn't do either. (I opened smb.conf, inserted the above line with a leading tab just under [global], saved, rebooted the Ubunbu, and tried the nautilus command just the same format that got me to a Windows share folder, all this while the OpenWrt share directory was up and showing in a Windows machine.)
Thanks so much. I would have like to get this ksmbd to work in every way, but can live with not having access to it from Linux.
I have not yet done extensive Linux-Linux networking and am exploring options. Actually I am only just entering the whole Linux world (started when I noticed Microsoft used my old Windows computer so much that I sometimes had to wait). This crash course in OpenWrt has been a real pleasure thanks to help from people like yourself.
I prefer using encrypted connections whenever possible.
This adds another layer of security even if the network is considered private.
Simple configuration, low overhead, no increase in attack surface.
Did you ever get this to work? I've been trying every type of combination of mount cifs commands that I could find, including adding/removing:
sec=ntlm
vers=2.1 , 3.0, and 3.1.1
uid/gid
using IP or host name
Windows and Mac clients work fine to connect and browse to ksmbd. Linux, not so much .. at least via mount.cifs. I AM able to browse from linux using smbclient .. but can't mount a network drive.
dmesg says CIFS_VFS: cannot find root inode
I've tried to look that up with no success.
At one time in the past, I was able to mount a folder from linux when I used samba4 .. so it must be something with ksmbd.