There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

Cannot mount smb shared drive from the router on my Pop!_OS system. Can someone give me some assistance?

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?

rambos ,

Have you tried:

smb://user@ip/sharename/

Anticorp OP ,

I haven’t, but I will tonight. Thanks!

funkajunk , (edited )
@funkajunk@lemm.ee avatar

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: unix.stackexchange.com/…/how-to-distinguish-betwe…

Anticorp OP ,

Thanks! I’ll give that a try tonight after work.

Anticorp OP ,

Okay I just tried that and it throws the mount error(22): Invalid argument error again.

funkajunk ,
@funkajunk@lemm.ee avatar

Does /mnt/asus exist on your system?

Please share the exact command you tried, maybe there’s something we’re missing.

gideonstar ,
@gideonstar@feddit.de avatar

I’m also pretty sure that you have to specify a share. Like //192.168.50.1/$Share. IIRC.

Anticorp OP ,

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!

jsveiga ,

You’re missing the share name, //192.168.50.1/sharename

Anticorp OP ,

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!

exu ,

Are you sure the path to your credentials file is correct and does it look like this?


<span style="color:#323232;">username=value
</span><span style="color:#323232;">password=value
</span><span style="color:#323232;">domain=value
</span>
Anticorp OP ,

It’s correct. I put it in greater than/less than brackets up above to indicate that it was a placeholder and Lemmy stripped it out for some reason. I have edited above to just say “user”. Good eye though.

My file looks like that except for the domain value. I don’t have that line. What would go there? It’s a network drive connected directly to my router with a USB cable and then the router SMB client and mapping is configured. I know that’s correct because I can map them in Windows, and I can list them in Pop in the terminal, as well as browse it in Pop in the file explorer. Alternatively I started out just using the user/password arguments for the terminal mounting command and only moved it to the file to get rid of those arguments since the error it’s throwing is saying there are invalid arguments. I have the workgroup set in the config file and I’m explicitly declaring the IP in the mount command. There’s no domain name, unless that means something I’m unaware of.

samwwwblack ,

domain in this instance is the workgroup, and is optional according to the man page.

Have you tried adding –verbose before the -o? That might yield more information.

Anticorp OP ,

The workgroup is set in the cfg file. I got a little further now. Since moving the credentials to the file I am getting a different error. Now I get mount error(115): Operation now in progress which is some sort of connection error. I was actually just logging verbose right before I checked back here and it just spits out the options from the config file and the error message. Still trying to figure this new error out since both the computer and the drive are on the same network, and within the same range.

samwwwblack ,

OK, you may want to check dmesg or journalctl if there are further errors from the kernel - there is also a -v argument for mount, eg mount -t cifs -v //SERVER/$share /mnt --verbose -o… that might help.

Don’t know if you’ve found this already (and apologies if you have!) but this suggests some not obvious solutions superuser.com/…/cifs-share-mount-errors

Also (brain dumping) if you’ve successfully mounted it via the file browser, do so again and then check mount to see what arguments/options the CIFS mount is using - it might yield some important differences.

Anticorp OP ,

Thanks! That last option is something I thought of too, but I didn’t know what to do to get that information. I tried properties in the file explorer, but that didn’t work. Do I just type mount into the terminal to get a list of mounts? I’ll definitely try all of this after work. For now I’m exhausted from staying up until 1:30 am trying to get this figured out.

samwwwblack ,

Sorry, I was thinking file browser mounts would appear in mount, but they don’t.

You should be able to list file browser mounts in a terminal using gio mount -li after mounting via the file browser, and it will list the SMB mount it’s using, ie smb://SERVER/$share/

This annoyingly doesn’t give us the username or domain for the SMB share, and to get that if the server and share looks OK we have to run gvfs (what the file browser for PopOS uses in the background) in debug mode and re-mount the SMB share; in a terminal run pkill gvfs; pkill nautilus; LANG=C GVFS_DEBUG=1 $(find /usr/lib* -name gvfsd 2>/dev/null) --replace 2>&amp;1 ; this will unmount anything in the file browser but will show what username and domain the file browser is using to access the SMB share, for example after clicking on a share in the file browser, among other logs, I get;


<span style="color:#323232;">smb: do_mount - URI = smb://absolution.local/samshared
</span><span style="color:#323232;">smb: do_mount - try #0 
</span><span style="color:#323232;">smb: auth_callback - kerberos pass
</span><span style="color:#323232;">smb: auth_callback - out: last_user = 'samblack', last_domain = 'SAMBA'
</span><span style="color:#323232;">smb: do_mount - [smb://absolution.local/samshared; 0] res = -1, cancelled = 0, errno = [22] 'Invalid argument' 
</span><span style="color:#323232;">smb: do_mount - enabling NTLMSSP fallback
</span><span style="color:#323232;">smb: do_mount - try #1 
</span><span style="color:#323232;">smb: auth_callback - ccache pass
</span><span style="color:#323232;">smb: auth_callback - out: last_user = 'samblack', last_domain = 'SAMBA'
</span><span style="color:#323232;">smb: do_mount - [smb://absolution.local/samshared; 1] res = -1, cancelled = 0, errno = [22] 'Invalid argument' 
</span><span style="color:#323232;">smb: do_mount - try #2 
</span><span style="color:#323232;">smb: auth_callback - normal pass
</span><span style="color:#323232;">smb: auth_callback - reusing keyring credentials: user = 'samblack', domain = 'ABSOLUTION'
</span><span style="color:#323232;">smb: auth_callback - out: last_user = 'samblack', last_domain = 'ABSOLUTION'
</span><span style="color:#323232;">smb: do_mount - [smb://absolution.local/samshared; 2] res = 0, cancelled = 0, errno = [0] 'Success' 
</span><span style="color:#323232;">smb: do_mount - login successful
</span><span style="color:#323232;">smb: send_reply(0x55ea6ffe5450), failed=0 ()
</span>

This should give the username and domain that connects and can be used in the credential file.

Once this is done, you can exit the terminal with gvfs running and you should be able to close and re-open the file browser and the mounts should just re-appear normally.

Hopefully this will give enough information as to why the file browser mount works and the mount command doesn’t.

Anticorp OP ,

This is amazing! Thank you very much. I’ll try this out tonight and hopefully get somewhere with it. I’ll let you know either way. Thanks again!

exu ,

I think the default domain is empty or WORKGROUP. It would be used if you had active directoy for the user authentication.
I read some more of the man page and this should be optional.

Caketaco ,
@Caketaco@lemmy.dbzer0.com avatar

Pop goes the weasel! Lol! Best of luck on your tech issues.

gideonstar ,
@gideonstar@feddit.de avatar

/home//.smbcredentials

This looks strange.

Anticorp OP ,

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.

skadden ,
@skadden@ctrlaltelite.xyz avatar

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

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • [email protected]
  • lifeLocal
  • goranko
  • All magazines