Edit: I have added the share name at the end of the IP address and now I’m getting mount error(115): Operation now in progress
. I haven’t figured this one out yet either. My computer IP and the network drive IP are on the same network and within range. Both should be using the same gateway and DHCP.
I have tried just about every combination of parameters possible and nothing is working. It keeps spitting out a meaningless error and that error is the only thing in the log file too. I have tried a 100 different answers from across stack-overflow to no avail.
I’m running the command below:
sudo mount -t cifs //192.168.50.1/ /mnt/asus -o credentials=/home/user/.smbcredentials
and regardless of how many params I have removed it keeps spitting out :
mount error(22): Invalid argument Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
I have referred to the manpage and verified that all of the args I’m using are valid. At this point I’m kind of at a loss. Are there file system args I need to add or something?
I can see the disk with all of the sharenames when I run smbclient -L 192.168.50.1
, and I can navigate to it in the file browser, but I can’t mount it for some reason. I have the workgroup name set under /etc/samba/smb.conf
. I have tried enabling and disabling NT1. Does anyone have any ideas as to why it might be spitting out an invalid args error even when I removed every single argument?
You’re missing the share name, //192.168.50.1/sharename
I tried with several share names and it didn’t work. But I tried again just now for the first time since I moved the credentials to a file and it threw a different error:
mount error(115): Operation now in progress
. That’s at least something I can work with. Thank you!
It may be a number of things, but I would try to restructure your command with the options first, then the share path with the mount point as the final arguments (this matches the examples given in the documentation).
I would also suggest not using a dot file for your credentials, as they are actually a bug and not a feature.
sudo mount -t cifs -o credentials=/home/user/smb.creds //192.168.50.1/sharename /mnt/asus/
Edit: Found this to better explain the structure of command line arguments: https://unix.stackexchange.com/questions/484152/how-to-distinguish-between-a-positional-parameter-and-an-option
Thanks! I’ll give that a try tonight after work.
Okay I just tried that and it throws the
mount error(22): Invalid argument
error again.Does
/mnt/asus
exist on your system?Please share the exact command you tried, maybe there’s something we’re missing.
/home//.smbcredentials
This looks strange.
Oh I guess it edited out the user variable I put there. Weird. I’ll edit it again. It’s correct in my terminal. Good eye though.
There’s an outside chance they just don’t want to show their username, but yeah OP should make sure they’re properly pathing to their creds
Have you tried:
smb://user@ip/sharename/
I haven’t, but I will tonight. Thanks!
I’m also pretty sure that you have to specify a share. Like //192.168.50.1/$Share. IIRC.
I thought I could just map to the main drive since I have multiple shares on that drive, but I guess not. I did try with multiple share names before I moved the credentials to the file and it was throwing the same error. I tried again just now with a share name and it started throwing this error:
mount error(115): Operation now in progress
. That is at least something I can work with. Thank you!
Pop goes the weasel! Lol! Best of luck on your tech issues.