Samba help - drive available in Dolphin

Hello,
I have tried several things, and am coming for help as a last resort.
I have a custom program that needs to have this drive mounted as a samba share to work.

I can currently access the drive in Dolphin at this addresss:
smb://mmiesner@vm-dc2/Scanned Inbox/047-Michael-Miesner/

However, I have not been able to figure out how to go about getting it mounted.

The IT company we use gave me the IP of the share, but I suspect they gave me the wrong IP (responded with VM-DC1) not VM-DC2) and I’d prefer to not have to point this out. However, if needed I will request it again.

I know that the files are there and that the above address works because I can move files around, etc.

Thanks

Update: heres some output to help you help me

smb.service - Samba SMB Daemon
     Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; preset: disabled)
     Active: active (running) since Mon 2024-10-21 07:39:05 EDT; 1h 38min ago
 Invocation: 1215767169ef45beadb5e4dc8ae752f8
       Docs: man:smbd(8)
             man:samba(7)
             man:smb.conf(5)
   Main PID: 686 (smbd)
     Status: "smbd: ready to serve connections..."
      Tasks: 3 (limit: 38407)
     Memory: 12.1M (peak: 12.9M)
        CPU: 86ms
     CGroup: /system.slice/smb.service
             ├─686 /usr/bin/smbd --foreground --no-process-group
             ├─689 "smbd: notifyd "
             └─690 "smbd: cleanupd"

Oct 21 07:39:05 michael systemd[1]: Starting Samba SMB Daemon...
Oct 21 07:39:05 michael smbd[686]: [2024/10/21 07:39:05.159138,  0] ../../source3/smbd/server.c:1965>
Oct 21 07:39:05 michael smbd[686]:   smbd version 4.21.0 started.
Oct 21 07:39:05 michael smbd[686]:   Copyright Andrew Tridgell and the Samba Team 1992-2024
Oct 21 07:39:05 michael systemd[1]: Started Samba SMB Daemon.

… and what did you try which apparently didn’t work as expected?

mount -t cifs ... is how it usually starts

Hi @sleepraider, and welcome!

While I no longer have samba shares on my network, I believe this will help in getting it mounted:

and

Hope this helps!

1 Like

Yeah, I had tried this.
Admittedly, since this is not my wheelhouse I was not confident about how to go about doing this via the command line and what all to put in there.

 sudo mount -t cifs -o user=mmiesner //smb://mmiesner@vm-dc2/                ✔ 
[sudo] password for michael: 
mount: //smb://mmiesner@vm-dc2/: can't find in /etc/fstab.

while I’m no expert either:
why the slashes before smb://… ?
and
you forgot to tell the command where (which directory) to mount it to
the command is incomplete

You’ll need one slash /
to escape the space in between the two words in:
Scanned Inbox

It is like 10 years ago that I last used samba - what @Mirdarthos said is likely much more helpful than what I can say.

sudo mount -t cifs -o user=mmiesner smb://mmiesner@vm-dc2  /etc/samba     1 ✘ 
Mounting cifs URL not implemented yet. Attempt to mount smb://mmiesner@vm-dc2

I was thinking- perhaps erroneously, that if I just mounted the whole vm-dc2 drive (which I have access to) for ease.

You might only have access to a specific directory within …

I dont. I know from past experience I have access to all of it. For whatever reason, this recently seems to have changed. As recently as a month ago, this was not an issue.

This might be different, but in dolphin I can manipulate files anywhere on the VM-DC2 drive.

That is probably just the way it’s being presented to you. @Nachlese is right, you only have access to a or some directories, and for the smb:// you’ll need more than that :point_up_2: to be able to mount it. a Typical resource URl would look something like:

smb://username<:password>@host.name:/path/to/mount

And I noticed in your URI you didn’t spacify a path to mount, so try:

smb://mmiesner@vm-dc2:

or

smb://mmiesner@vm-dc2:/

(I have no idea if this will work or not/)

I think there is some information if you Google it, but at least in my case, I can mount a smb share with:

sudo mount -t cifs //server/share /mount_point -o username=user,vers=3.0,password=something

So something like this in your case:

sudo mount -t cifs //vm-dc2/shared_folder /mnt -o username=mmiesner,vers=3.0

This will ask for user’s password (in the server) if it needs it.

As others have pointed out, you can’t directly mount the server. You need to mount a shared folder/resource from the server.

The local mount point needs to be something reasonable like /mnt. /etc/samba is not an appropriate mount point.

Notice you don’t need to use smb:// in the address.

By default this will mount the remote folder on the mount point with root as owner, so you may or not have access with your local user. You need to add a uid=your_user to mount it with your normal user as owner.

You can add a line to fstab like the following to be able to mount with your normal user:

//vm-dc2/shared_folder    /mnt    cifs     uid=your_local_user,username=your_remote_user,iocharset=utf8,dir_mode=0770,user,vers=3.0,noauto,_netdev 0 0

You may have to adjust some parameters to your convenience. If you need to provide your password to access the remote share, you can add a password or credentials parameter.

If you add the share to the fstab file, it will appear in Dolphin and you can mount it with just one click.

1 Like

cfinnberg, I appreciate your help.
How do I find out the right thing to put in //vm-dc2/shared_folder part? I ran this as is and got:
mount error: could not resolve address for vm-dc2: Unknown error

The IT support we use is largely unaware of how to use linux, as you’d expect. Is it time to try again, say the IP address they gave me before didnt work, and see if they can provide more help? Is there a different tool to search for vm-dc2?

I really appreciate everyone’s help thus far.

That points to a name resolution problem. It seems that vm-dc2 is unknown to your computer. But that is quite odd, as you said in your first message that you can access it through dolphin with the address:

smb://mmiesner@vm-dc2/Scanned Inbox/047-Michael-Miesner/

That address uses the same network name (vm-dc2). You can test if it is available on your network with ping:

ping vm-dc2

It should give you the IP address and it should answer to the pings. (CTRL+C to stop pinging).

On the other hand, now I noticed that the address of your first message contains the shared folder you have to access:

sudo mount -t cifs '//vm-dc2/Scanned Inbox/047-Michael-Miesner' /mnt -o username=mmiesner

Notice that you have to put the remote address in quotes (single or double quotes) as it contains a space. I have also removed the vers parameter as it seems that from some time ago the default is for client and server to negotiate the hightest protocol supported by both ends.

For reference, manual page of the mount.cifs command with all the options: mount.cifs(8) — Arch manual pages

I appreciate your help so much.
I reached out to the IT ppl to make sure the address I had was correct. I also tried and got these outputs just now:

sudo mount -t cifs 1.1.1.10 /mnt -o username=mmiesner,vers=3.0,password=(redacted password)
mount.cifs: bad UNC (1.1.1.10)
    ~  ping vm-dc2                                                                         1 ✘ 
ping: vm-dc2: Temporary failure in name resolution
    ~  sudo mount -t cifs '//vm-dc2/Scanned Inbox/047-Michael-Miesner' /mnt -o username=mmiesner
mount error: could not resolve address for vm-dc2: Unknown error

The IP address replaces the server name, so the command should be:

sudo mount -t cifs '//1.1.1.10/Scanned Inbox/047-Michael-Miesner' /mnt -o username=mmiesner
3 Likes

That worked! Y’all are awesome! Thank you!

1 Like

Great! You can still consider adding it to the fstab with the indications I gave you before, so it’s easier for you to mount and open it from Dolphin. Just a single click :slight_smile:

With the last information, the line to add should be:

'//1.1.1.10/Scanned Inbox/047-Michael-Miesner'    /mnt    cifs     uid=your_local_user,username=mmiesner,iocharset=utf8,dir_mode=0770,user,noauto,_netdev 0 0

/mnt can be replaced with a folder in your user profile (/home/your_local_user/my_scanned_files)

Please, be careful modifying the /etc/fstab file as it is quite sensitive and a small error can lead to an unbootable system (but everything can be fixed with a liveUSB of Manjaro)

1 Like

I would add nofail to the mount options in /etc/fstab, so as to prevent a stalled boot if the network share is down.

1 Like