WIne access to Server drive

Questions about Wine on Linux
HCP-DK
Newbie
Newbie
Posts: 1
Joined: Mon Feb 15, 2021 2:07 pm

WIne access to Server drive

Post by HCP-DK » Mon Feb 15, 2021 2:20 pm

I'm using Linux SUSE. On Linux I need to run C5, book keeping program. That run fine.
But the database need to be on the server drive, means wine or the program C5 need to pick the database from server.
Actually it looks like Wine just produce a new virtual drive similar as the server, but not really access the server.

fargodwe
Level 5
Level 5
Posts: 394
Joined: Mon Oct 02, 2017 7:08 am

Re: WIne access to Server drive

Post by fargodwe » Thu Feb 18, 2021 11:42 pm

First off, I am a complete novice here. That being said, on the linux side can you mount the server to a place? Say perhaps a folder in your home folder - like ~/servername. If you can do that, then in winecfg you can go to drives and add a drive and use ~/servername as the location. Then you will have a drive letter (like E:) you could access your share on the server. I haven't done that, as I don't have a server now. Had one, found out I could do what I wanted with a drive on the USB port on my router. I have heard of others doing this. If it's a Windows share, this link shows you how to do the mount: https://linoxide.com/linux-how-to/mount ... %20More%20

If it's a SMB (Samba) you could follow these instructions: https://www.looklinux.com/how-to-mount- ... s-in-linux

Once you can get that share mounted then you would need to set a mount in /etc/fstab so that it is automatically mounted every time you boot. I don't really know much about how to do that.

When you get to where you have the share automatically getting mounted it should be an easy step then in winecfg to add a drive pointing the mount point for your share. You can then use that drive letter in your program to access the share.


There are so many extremely knowledgable people on this forum and I'm sure one or more probably has already done something similar. Hopefully they'll see my post and know you need some help.

User avatar
Bob Wya
Level 12
Level 12
Posts: 2987
Joined: Sat Oct 16, 2010 7:40 pm
Location: Scotland
Contact:

Re: WIne access to Server drive

Post by Bob Wya » Sun Feb 21, 2021 7:55 am

fargodwe wrote:
Thu Feb 18, 2021 11:42 pm
...
If it's a SMB (Samba) you could follow these instructions: How to mount SAMBA share (SMBFS) in Linux
...
@HCP-DK

Just to add that - if you choose to go down this route - you'll want to use:

Code: Select all

mount -t cifs
style mount, rather than:

Code: Select all

mount -t smbfs
- so that Wine can correctly access the SMB mountpoint - in a similar manner to a local drive mount.

Bob

fargodwe
Level 5
Level 5
Posts: 394
Joined: Mon Oct 02, 2017 7:08 am

Re: WIne access to Server drive

Post by fargodwe » Sun Feb 21, 2021 10:36 pm

Hi Bob! Thanks for replying here. I've been trying some experimenting on my PC's to try to get this to work.

Server is actually my network router with hard disk connected to it via USB. It uses SMB1, not SMB2.

On my Windows laptop I enabled SMB1 then was able to map it as a network drive using 192.168.0.1/volume1 and it gave it a drive letter and indeed I can work with it just as if it was locally connected.

EDIT: I REPLACED WHAT I ORIGINALLY HAD HERE SINCE I GOT THE MOUNT TO WORK.As it turns out, since the server is SMB1 onlyI had to specify SMB1 in the linux mount statement as well:

Code: Select all

sudo mount -t cifs -o vers=1.0,username=xxxxxx,password=xxxxxx //192.168.0.1/volume1 /home/dave/shares/Volume1
I was then able to set a drive letter to that path in winecfg. I need to do some testing in wine now.

Thanks for the reply here - you have always been so patient with me and have continued to help me. Thanks!

fargodwe
Level 5
Level 5
Posts: 394
Joined: Mon Oct 02, 2017 7:08 am

Re: WIne access to Server drive

Post by fargodwe » Mon Feb 22, 2021 3:08 pm

Another question I hope someone can answer that might be helpful for others who search and find this thread.

My network is wireless. The wireless doesn't connect until I login. So, trying to put a mount statement in fstab for the share fails. Is there anyway to have the mount wait until the network is available after I login? If not, can I put the mount in the file that executes when I login?

fargodwe
Level 5
Level 5
Posts: 394
Joined: Mon Oct 02, 2017 7:08 am

Re: WIne access to Server drive

Post by fargodwe » Mon Feb 22, 2021 3:10 pm

Sorry - double post.

User avatar
Bob Wya
Level 12
Level 12
Posts: 2987
Joined: Sat Oct 16, 2010 7:40 pm
Location: Scotland
Contact:

Re: WIne access to Server drive

Post by Bob Wya » Tue Feb 23, 2021 10:33 am

fargodwe wrote:
Mon Feb 22, 2021 3:08 pm
Another question I hope someone can answer that might be helpful for others who search and find this thread.

My network is wireless. The wireless doesn't connect until I login. So, trying to put a mount statement in fstab for the share fails. Is there anyway to have the mount wait until the network is available after I login? If not, can I put the mount in the file that executes when I login?
@fargodwe

You'd probably want to use a systemd mount unit ( + a systemd automount unit ) for each mount-point.

I try avoid using cifs mounts (I prefer to use nfs), but I do have an example sshfs systemd (auto)mount unit available, on my system:

Code: Select all

mnt-sshfs-robs\x2dasus\x2dserver.mount

Code: Select all

[Unit]
Description=SSHFS fuse mount @ /mnt/sshfs/robs-asus-server
Before=remote-fs.target
BindsTo=network.target
After=network.target

[Mount]
What=xxxxxx@xxxxxxxx:/
Where=/mnt/sshfs/robs-asus-server
TimeoutSec=15s
Type=fuse.sshfs
Options=idmap=user,allow_other,IdentityFile=xxxxxx

Code: Select all

mnt-sshfs-robs\x2dasus\x2dserver.automount

Code: Select all

[Unit]
Description=SSHFS fuse mount @ /mnt/sshfs/robs-asus-server
Before=remote-fs.target
BindsTo=network.target
After=network.target

[Automount]
Where=/mnt/sshfs/robs-asus-server
DirectoryMode=0775

[Install]
WantedBy=multi-user.target
Hopefully that's enough to get you started! 8)

Bob

fargodwe
Level 5
Level 5
Posts: 394
Joined: Mon Oct 02, 2017 7:08 am

Re: WIne access to Server drive

Post by fargodwe » Tue Feb 23, 2021 7:11 pm

Thanks Bob! I'll have to do some reading to see what all that is doing so I can experiment - good way to learn more!

Dave :)

User avatar
Bob Wya
Level 12
Level 12
Posts: 2987
Joined: Sat Oct 16, 2010 7:40 pm
Location: Scotland
Contact:

Re: WIne access to Server drive

Post by Bob Wya » Wed Feb 24, 2021 11:09 am

np 8)

fargodwe
Level 5
Level 5
Posts: 394
Joined: Mon Oct 02, 2017 7:08 am

Re: WIne access to Server drive

Post by fargodwe » Sun Feb 28, 2021 7:41 pm

Been having problems getting the share to mount. Been doing a LOT of reading and hope I'm understanding at least half or more of what I'm reading. It seems like a simple enough concept seeing the steps systemd goes through bringing up the system, the various "checkpoints" to know at what processes are getting started at certain times, etc.. However, I'm still having some problems. I know it will be something simple. Thanks again Bob!

fargodwe
Level 5
Level 5
Posts: 394
Joined: Mon Oct 02, 2017 7:08 am

Re: WIne access to Server drive

Post by fargodwe » Tue Mar 02, 2021 5:07 pm

Couldn't get the systemd mount and automount to work, so I did the following and got it work for me:

Code: Select all

sudo systemctl enable systemd-networkd-wait-online
Then reboot. Only need to do this once.

Afterwards I added this lines to my fstab:

Code: Select all

#
# remote servers
//192.168.0.1/volume1 /home/dave/shares/volume1  cifs auto,uid=<myuserid>,credentials=/home/dave/volume1.smb,file_mode=0777,dir_mode=0777,vers=1.0,noperm 0 0
I had to use vers=1.0 as that is what my server (usb off my wireless router) is using.

When done, I tested with

Code: Select all

sudo mount -a
Indeed the volume mounted in my shares/volume1 folder and my wine app that uses the server disk works fine. I then shutdown and rebooted and then logged in and volume1 is mounted in my folder.

I hope that Bob Wya's reply helps most people. For anyone else maybe what I did will help.

The end result is "Yes, you can access a server drive from wine"!!

fargodwe
Level 5
Level 5
Posts: 394
Joined: Mon Oct 02, 2017 7:08 am

Re: WIne access to Server drive

Post by fargodwe » Tue Mar 02, 2021 6:40 pm

EDIT: removed the information here. Further testing showed everything worked.

fargodwe
Level 5
Level 5
Posts: 394
Joined: Mon Oct 02, 2017 7:08 am

Re: WIne access to Server drive

Post by fargodwe » Tue Mar 02, 2021 9:14 pm

Well, after several restarts and shutdown/startups it keeps failing to mount now. The syslog is showing a message I don't understand. Perhaps the way i posted above doesn't work. Sorry.

The wireless network isn't necessarily up at the time fstab is processed. I put the wireless network definition in netplan so it can automatically log in to my network. I was hoping fstab came after that. But it doesn't change the name of the interface from wlan0 to a name that I have no idea where it came from after fstab. So the wireless network isn't up and connected when fstab is processed. Shoot.

User avatar
Bob Wya
Level 12
Level 12
Posts: 2987
Joined: Sat Oct 16, 2010 7:40 pm
Location: Scotland
Contact:

Re: WIne access to Server drive

Post by Bob Wya » Wed Mar 03, 2021 7:44 am

fargodwe wrote:
Tue Mar 02, 2021 9:14 pm
...
The wireless network isn't necessarily up at the time fstab is processed. I put the wireless network definition in netplan so it can automatically log in to my network. I was hoping fstab came after that. But it doesn't change the name of the interface from wlan0 to a name that I have no idea where it came from after fstab. So the wireless network isn't up and connected when fstab is processed. Shoot.
@fargodwe

Hmm... That's why I was suggesting to use a systemd mount unit...
Otherwise you'll be struggling with your wireless connection going up / down.

This blog post might help you get a bit further: Auto-mounting network file systems with systemd 8)

Bob

fargodwe
Level 5
Level 5
Posts: 394
Joined: Mon Oct 02, 2017 7:08 am

Re: WIne access to Server drive

Post by fargodwe » Wed Mar 03, 2021 12:03 pm

I tried systemd mount like crazy but couldn't get it to work. Apparently my wireless adapter is recognized but it doesn't set the name until after fstab from what I can see in the log. I'm back trying to work with systemd mount but still having problems. In trying to enable the mount from the command line to test it I get errors about the "What" and they have me stumped. Going back to a lot of reading online again to see if I can figure out what I'd doing wrong. I tried just adapting what you had to my needs but that didn't work so I've been trying things since then. After thinking I must be too dumb to follow systemd mount I thought well let's try fstab as I *thought* it might be easier. Nope. So I'm back to studying your examples, the reading more, then trying different things. I had it working on-demand once but I just want it to mount at start. The on-demand didn't work when one of my wine programs tried to open it.

Thanks for the link and I'll keep trying until this works! Thanks again Bob!

User avatar
Bob Wya
Level 12
Level 12
Posts: 2987
Joined: Sat Oct 16, 2010 7:40 pm
Location: Scotland
Contact:

Re: WIne access to Server drive

Post by Bob Wya » Wed Mar 03, 2021 3:15 pm

fargodwe wrote:
Wed Mar 03, 2021 12:03 pm
I tried systemd mount like crazy but couldn't get it to work.
...
Thanks for the link and I'll keep trying until this works! Thanks again Bob!
@fargodwe

No worries...

Like I say... Feel free to post up your systemd (auto)mount unit files and any related:

Code: Select all

journalctl --unit *.mount
log files - if you get really stuck! :lol:

Bob

fargodwe
Level 5
Level 5
Posts: 394
Joined: Mon Oct 02, 2017 7:08 am

Re: WIne access to Server drive

Post by fargodwe » Thu Mar 04, 2021 7:21 am

Hi Bob - I've tried quite a few things but just even at the most basic I still get an error about UNC which is pointing to the "What" statement. If this is like things I worked with decades ago when I was a systems programmer on medium scale mainframes, experience would tell me that where the error is kicking out may be from something else, but I am stumped! In all the info below I've replaced user with <userid> and password with <password>. For now I'm just trying to get the mount to work. When I also had an .automount it would wait to try to mount until I actually accessed the mountpoint (don't know I got that to work, but I was changing things and now that doesn't work either). At any rate, the automount caused wine in my prefix to not see the mountpoint contents so I couldn't run my program. So, I deleted the .automount and the .mount and started completely over using just the basics as you showed except for the very last line - I don't know what it does. So I've just been testing the mount with sysctl enable and then the status with sysctl status. First the tail of the journalctl

Code: Select all

-- Reboot --
Mar 04 06:37:53 dave-Aleena systemd[1]: Mounting CIFS mount @ /home/dave/shares/volume1...
Mar 04 06:37:53 dave-Aleena mount[760]: mount.cifs: bad UNC (<userid>@<password>://192.168.0.1/volume1)
Mar 04 06:37:53 dave-Aleena systemd[1]: home-dave-shares-volume1.mount: Mount process exited, code=exited, status=1/FAILURE
Mar 04 06:37:53 dave-Aleena systemd[1]: home-dave-shares-volume1.mount: Failed with result 'exit-code'.
Mar 04 06:37:53 dave-Aleena systemd[1]: Failed to mount CIFS mount @ /home/dave/shares/volume1.

dave@dave-Aleena:~$ 

Code: Select all

dave@dave-Aleena:~$ cat /etc/systemd/system/home-dave-shares-volume1.mount
[Unit]
Description=CIFS mount @ /home/dave/shares/volume1
Before=remote.fs.target
BindsTo=network.target
After=network.target

[Mount]
What=<userid>@<password>://192.168.0.1/volume1
Where=/home/dave/shares/volume1
TimeoutSec=15s
Type=cifs
DirectoryMode=0775

[Install]
  WantedBy=multi-user.target

dave@dave-Aleena:~$ 
Not seen below was the prompt for my user password.

Code: Select all

dave@dave-Aleena:~$ systemctl enable home-dave-shares-volume1.mount
dave@dave-Aleena:~$ 
For the below, I don't understand the "Active" saying 18 minutes ago - perhaps from the previous testing until I started this reply?

Code: Select all

dave@dave-Aleena:~$ systemctl status home-dave-shares-volume1.mount
● home-dave-shares-volume1.mount - CIFS mount @ /home/dave/shares/volume1
     Loaded: loaded (/etc/systemd/system/home-dave-shares-volume1.mount; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2021-03-04 06:00:01 CST; 18min ago
      Where: /home/dave/shares/volume1
       What: shares@sharesdwe://192.168.0.1/volume1

Mar 04 06:00:01 dave-Aleena systemd[1]: Mounting CIFS mount @ /home/dave/shares/volume1...
Mar 04 06:00:01 dave-Aleena mount[764]: mount.cifs: bad UNC (<userid>@<password>://192.168.0.1/volume1)
Mar 04 06:00:01 dave-Aleena systemd[1]: home-dave-shares-volume1.mount: Mount process exited, code=exited, status=1/FAILURE
Mar 04 06:00:01 dave-Aleena systemd[1]: home-dave-shares-volume1.mount: Failed with result 'exit-code'.
Mar 04 06:00:01 dave-Aleena systemd[1]: Failed to mount CIFS mount @ /home/dave/shares/volume1.
dave@dave-Aleena:~$ 
I'm obviously just not understanding things yet. Any help would be appreciated!

BTW - from the command line in my home folder, the following works. Been trying to work backwards from that

Code: Select all

dave@dave-Aleena:~$ sudo mount -t cifs -rw  -o vers=1.0,credentials=/home/dave/volume1.smb  //192.168.0.1/volume1 /home/dave/shares/volume1
dave@dave-Aleena:~$ 
Hummm......how do I specify smb version 1 in the systemd .mount file?

spoon0042
Level 5
Level 5
Posts: 482
Joined: Thu Dec 24, 2009 11:00 am

Re: WIne access to Server drive

Post by spoon0042 » Thu Mar 04, 2021 10:43 am

fargodwe wrote:
Thu Mar 04, 2021 7:21 am
Hummm......how do I specify smb version 1 in the systemd .mount file?
Looks like it takes an "Options" line: https://www.freedesktop.org/software/sy ... ml#Options

I'm not sure of the syntax for user/pw but since it's throwing an error I would try just copying from your working mount command:

Code: Select all

What=//192.168.0.1/volume1
Options=vers=1.0,credentials=/home/dave/volume1.smb
etc

fargodwe
Level 5
Level 5
Posts: 394
Joined: Mon Oct 02, 2017 7:08 am

Re: WIne access to Server drive

Post by fargodwe » Thu Mar 04, 2021 11:44 am

Thanks for the reply so quickly!

Changed my .mount file a different Requires and After as I found that to be network manager has connected to my wireless. Also changed the What and added Options as you suggested to:

Code: Select all

[Unit]
Description=CIFS mount @ /home/dave/shares/volume1
Requires=NetworkManager-wait-onlne.service
After=NetworkManager-wait-online.service

[Mount]
What=//192.168.0.1/volume1
Where=/home/dave/shares/volume1
TimeoutSec=15s
Type=cifs
DirectoryMode=0775
Options=vers=1.0,credentials=/home/dave/volume1.smb

[Install]
  WantedBy=multi-user.target
Still get:

Code: Select all

dave@dave-Aleena:~$ systemctl status home-dave-shares-volume1.mount
● home-dave-shares-volume1.mount - CIFS mount @ /home/dave/shares/volume1
     Loaded: loaded (/etc/systemd/system/home-dave-shares-volume1.mount; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2021-03-04 07:04:00 CST; 3h 36min ago
      Where: /home/dave/shares/volume1
       What: //192.168.0.1/volume1

Mar 04 07:04:00 dave-Aleena systemd[1]: Mounting CIFS mount @ /home/dave/shares/volume1...
Mar 04 07:04:00 dave-Aleena mount[762]: mount.cifs: bad UNC (<userid>@<password>://192.168.0.1/volume1)
Mar 04 07:04:00 dave-Aleena systemd[1]: home-dave-shares-volume1.mount: Mount process exited, code=exited, status=1/FAILURE
Mar 04 07:04:00 dave-Aleena systemd[1]: home-dave-shares-volume1.mount: Failed with result 'exit-code'.
Mar 04 07:04:00 dave-Aleena systemd[1]: Failed to mount CIFS mount @ /home/dave/shares/volume1.
dave@dave-Aleena:~$ 
Not sure why the error message if show <userid>@<password> when they are no longer on the "What" line - I assume that means the Options are working ;)

I hope I got that right. Again, thanks for the very quick reply!

EDIT: I forgot that my system doesn't actually reboot or power off. Long story short: extremely unique configuration. So, when I request a reboot or shutdown I have to wait a while and then do the equivalent of a reset or hold the power button down to power off. So I thought it was still remembering things since linux itself didn't actually shutdown prior to reboot or power off. Sure enough, on reboot I get a completely different error:

Code: Select all

dave@dave-Aleena:~$ systemctl status home-dave-shares-volume1.mount
● home-dave-shares-volume1.mount - CIFS mount @ /home/dave/shares/volume1
     Loaded: loaded (/etc/systemd/system/home-dave-shares-volume1.mount; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2021-03-04 11:03:15 CST; 14min ago
      Where: /home/dave/shares/volume1
       What: //192.168.0.1/volume1

Mar 04 11:03:15 dave-Aleena systemd[1]: Mounting CIFS mount @ /home/dave/shares/volume1...
Mar 04 11:03:15 dave-Aleena systemd[1]: home-dave-shares-volume1.mount: Mount process exited, code=exited, status=32/n/a
Mar 04 11:03:15 dave-Aleena mount[680]: mount error(2): No such file or directory
Mar 04 11:03:15 dave-Aleena mount[680]: Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (d>
Mar 04 11:03:15 dave-Aleena systemd[1]: home-dave-shares-volume1.mount: Failed with result 'exit-code'.
Mar 04 11:03:15 dave-Aleena systemd[1]: Failed to mount CIFS mount @ /home/dave/shares/volume1.

dave@dave-Aleena:~$ 
I also noticed that it still appears to be trying to mount before the network is up. I have no clue why, but when bringing up the network it first sees the interface as wlan0 then later changes it to wlp1s0. I only have entries for wireless wlp1s0 in the netplan as it requires as password to log into the network. I don't understand that at all. Dmesg snipet shows this:

Code: Select all

[    8.866240] FS-Cache: Loaded
[    8.975825] FS-Cache: Netfs 'cifs' registered for caching
[    8.988055] Key type cifs.spnego registered
[    8.988069] Key type cifs.idmap registered
[    8.988649] CIFS: Attempting to mount //192.168.0.1/volume1
[    8.988867] CIFS VFS: Error connecting to socket. Aborting operation.
[    8.988878] CIFS VFS: cifs_mount failed w/return code = -2
[   10.046819] ath10k_pci 0000:01:00.0 wlp1s0: renamed from wlan0
[   10.583852] ath10k_pci 0000:01:00.0: unsupported HTC service id: 1536
[   12.452328] Bluetooth: RFCOMM TTY layer initialized
[   12.452341] Bluetooth: RFCOMM socket layer initialized
[   12.452352] Bluetooth: RFCOMM ver 1.11
[   15.741678] wlp1s0: authenticate with f4:f2:6d:9c:de:8c
[   15.798737] wlp1s0: send auth to f4:f2:6d:9c:de:8c (try 1/3)
[   15.799401] wlp1s0: authenticated
[   15.800400] wlp1s0: associate with f4:f2:6d:9c:de:8c (try 1/3)
[   15.801511] wlp1s0: RX AssocResp from f4:f2:6d:9c:de:8c (capab=0x1011 status=0 aid=1)
[   15.803940] wlp1s0: associated

fargodwe
Level 5
Level 5
Posts: 394
Joined: Mon Oct 02, 2017 7:08 am

Re: WIne access to Server drive

Post by fargodwe » Thu Mar 04, 2021 1:05 pm

Ok, progress. I was capitalizing the .service files. Changed those and noticed there is no file NetworkManager-wait-onlne.service, capitalized or not. I think those all explain 2 things: No such file or directory error and the timing at boot since all of the files were incorrect. I changed all of that and no errors in dmesg:

Code: Select all

[    6.612228] input: HDA ATI HDMI HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.1/sound/card0/input18
[    6.705236] Bluetooth: Core ver 2.22
[    6.705272] NET: Registered protocol family 31
[    6.705276] Bluetooth: HCI device and connection manager initialized
[    6.705285] Bluetooth: HCI socket layer initialized
[    6.705291] Bluetooth: L2CAP socket layer initialized
[    6.705298] Bluetooth: SCO socket layer initialized
[    6.716723] mc: Linux media interface: v0.10
[    6.798876] videodev: Linux video capture interface: v2.00
[    6.828895] ath10k_pci 0000:01:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[    6.901921] kvm: Nested Virtualization enabled
[    6.901936] kvm: Nested Paging enabled
[    6.901939] SVM: Virtual VMLOAD VMSAVE supported
[    6.901942] SVM: Virtual GIF supported
[    6.902788] usbcore: registered new interface driver btusb
[    6.916076] Bluetooth: hci0: using rampatch file: qca/rampatch_usb_00000302.bin
[    6.916091] Bluetooth: hci0: QCA: patch rome 0x302 build 0x3e8, firmware rome 0x302 build 0x111
[    6.918284] MCE: In-kernel MCE decoding enabled.
[    6.982936] Bluetooth: hci0: using NVM file: qca/nvm_usb_00000302.bin
[    7.045876] uvcvideo: Found UVC 1.00 device HD WebCam (04f2:b567)
[    7.094354] input: HD WebCam: HD WebCam as /devices/pci0000:00/0000:00:12.0/usb1/1-1/1-1.1/1-1.1:1.0/input/input19
[    7.094496] usbcore: registered new interface driver uvcvideo
[    7.094502] USB Video Class driver (1.1.1)
[    7.204743] audit: type=1400 audit(1614880413.735:2): apparmor="STATUS" operation="profile_load" profile="unconfined" name="ippusbxd" pid=506 comm="apparmor_parser"
[    7.205311] audit: type=1400 audit(1614880413.751:3): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/lightdm/lightdm-guest-session" pid=505 comm="apparmor_parser"
[    7.205323] audit: type=1400 audit(1614880413.751:4): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/lightdm/lightdm-guest-session//chromium" pid=505 comm="apparmor_parser"
[    7.214381] audit: type=1400 audit(1614880413.759:5): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/cups/backend/cups-pdf" pid=511 comm="apparmor_parser"
[    7.214399] audit: type=1400 audit(1614880413.759:6): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/sbin/cupsd" pid=511 comm="apparmor_parser"
[    7.214408] audit: type=1400 audit(1614880413.759:7): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/sbin/cupsd//third_party" pid=511 comm="apparmor_parser"
[    7.215306] audit: type=1400 audit(1614880413.759:8): apparmor="STATUS" operation="profile_load" profile="unconfined" name="libreoffice-senddoc" pid=512 comm="apparmor_parser"
[    7.227087] audit: type=1400 audit(1614880413.771:9): apparmor="STATUS" operation="profile_load" profile="unconfined" name="lsb_release" pid=513 comm="apparmor_parser"
[    7.228524] audit: type=1400 audit(1614880413.775:10): apparmor="STATUS" operation="profile_load" profile="unconfined" name="libreoffice-xpdfimport" pid=515 comm="apparmor_parser"
[    7.241082] ath10k_pci 0000:01:00.0: qca6174 hw3.2 target 0x05030000 chip_id 0x00340aff sub 11ad:0807
[    7.241098] ath10k_pci 0000:01:00.0: kconfig debug 0 debugfs 1 tracing 1 dfs 0 testmode 0
[    7.241899] ath10k_pci 0000:01:00.0: firmware ver WLAN.RM.4.4.1-00140-QCARMSWPZ-1 api 6 features wowlan,ignore-otp,mfp crc32 29eb8ca1
[    7.261221] audit: type=1400 audit(1614880413.807:11): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/sbin/tcpdump" pid=516 comm="apparmor_parser"
[    7.322765] ath10k_pci 0000:01:00.0: board_file api 2 bmi_id N/A crc32 4ac0889b
[    7.391065] ath10k_pci 0000:01:00.0: unsupported HTC service id: 1536
[    7.441423] ath10k_pci 0000:01:00.0: htt-ver 3.60 wmi-op 4 htt-op 3 cal otp max-sta 32 raw 0 hwcrypto 1
[    7.567508] ath: EEPROM regdomain: 0x6c
[    7.567520] ath: EEPROM indicates we should expect a direct regpair map
[    7.567526] ath: Country alpha2 being used: 00
[    7.567530] ath: Regpair used: 0x6c
[    8.740710] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    8.740721] Bluetooth: BNEP filters: protocol multicast
[    8.740730] Bluetooth: BNEP socket layer initialized
[    8.790613] NET: Registered protocol family 38
[   10.309518] ath10k_pci 0000:01:00.0 wlp1s0: renamed from wlan0
[   10.802700] ath10k_pci 0000:01:00.0: unsupported HTC service id: 1536
[   12.384636] Bluetooth: RFCOMM TTY layer initialized
[   12.384649] Bluetooth: RFCOMM socket layer initialized
[   12.384656] Bluetooth: RFCOMM ver 1.11
[   15.906812] wlp1s0: authenticate with f4:f2:6d:9c:de:8c
[   15.963989] wlp1s0: send auth to f4:f2:6d:9c:de:8c (try 1/3)
[   15.964696] wlp1s0: authenticated
[   15.968525] wlp1s0: associate with f4:f2:6d:9c:de:8c (try 1/3)
[   15.969785] wlp1s0: RX AssocResp from f4:f2:6d:9c:de:8c (capab=0x1011 status=0 aid=1)
[   15.973957] wlp1s0: associated
[   16.007279] IPv6: ADDRCONF(NETDEV_CHANGE): wlp1s0: link becomes ready
[   20.548623] logitech-hidpp-device 0003:046D:1024.0003: HID++ 1.0 device connected.
[   32.160634] EXT4-fs (mmcblk1p1): mounted filesystem with ordered data mode. Opts: (null)
dave@dave-Aleena:~$ 
.

However, the share still is not getting mounted:

Code: Select all

dave@dave-Aleena:~$ systemctl status home-dave-shares-volume1.mount
● home-dave-shares-volume1.mount - CIFS mount @ /home/dave/shares/volume1
     Loaded: loaded (/etc/systemd/system/home-dave-shares-volume1.mount; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2021-03-04 11:53:35 CST; 9min ago
      Where: /home/dave/shares/volume1
       What: shares@sharesdwe//192.168.0.1/volume1

Mar 04 11:53:35 dave-Aleena systemd[1]: Mounting CIFS mount @ /home/dave/shares/volume1...
Mar 04 11:53:35 dave-Aleena mount[679]: mount.cifs: bad UNC (shares@sharesdwe//192.168.0.1/volume1)
Mar 04 11:53:35 dave-Aleena systemd[1]: home-dave-shares-volume1.mount: Mount process exited, code=exited, status=1/FAILURE
Mar 04 11:53:35 dave-Aleena systemd[1]: home-dave-shares-volume1.mount: Failed with result 'exit-code'.
Mar 04 11:53:35 dave-Aleena systemd[1]: Failed to mount CIFS mount @ /home/dave/shares/volume1.
dave@dave-Aleena:~$ 
I removed the credentials file from the Options and put the userid:password@ on the front end of the "What" but still the same error. I've searched the net quite a bit and just can't make heads or tails of what the heck is going on.

spoon0042
Level 5
Level 5
Posts: 482
Joined: Thu Dec 24, 2009 11:00 am

Re: WIne access to Server drive

Post by spoon0042 » Thu Mar 04, 2021 1:39 pm

I'm not sure but that syntax may not be correct, I assume "bad UNC" means it doesn't like the string you gave it. You can try setting user and password as options though.

As far as it trying to mount on boot I saw you had "auto" in your fstab when you want "noauto" if you don't want it to mount on boot. (And you may not need an fstab entry at all if you get it working with systemd.)

For the rest, eh, Bob seems to know this better than I do, hopefully he'll have some idea. From the "No such file or directory" error message though I only have the too obvious double check all the relevant paths exist and are accessible to your user and for typos.

User avatar
Bob Wya
Level 12
Level 12
Posts: 2987
Joined: Sat Oct 16, 2010 7:40 pm
Location: Scotland
Contact:

Re: WIne access to Server drive

Post by Bob Wya » Thu Mar 04, 2021 2:06 pm

@fargodwe

I'd suggest adding in the rw Option - to match your command line options:

Code: Select all

[Unit]
Description=CIFS mount @ /home/dave/shares/volume1
Requires=NetworkManager-wait-onlne.service
After=NetworkManager-wait-online.service

[Mount]
What=//192.168.0.1/volume1
Where=/home/dave/shares/volume1
TimeoutSec=15s
Type=cifs
DirectoryMode=0775
Options=vers=1.0,credentials=/home/dave/volume1.smb,rw

[Install]
WantedBy=multi-user.target
I presume you're using:

Code: Select all

systemctl daemon-reload
to reload any changes to the mount unit.
I sure systemd wouldn't let you proceed without reloading any changed units ...

Other than that I can't see anything obviously wrong, at the moment. :cry:

Bob

fargodwe
Level 5
Level 5
Posts: 394
Joined: Mon Oct 02, 2017 7:08 am

Re: WIne access to Server drive

Post by fargodwe » Thu Mar 04, 2021 2:22 pm

Thanks Bob! Added rw and set everything back to close to what you had originally. Didn't know about the reload - thanks! Unfortunately still the same UNC error.

Code: Select all

[Unit]
Description=CIFS mount @ /home/dave/shares/volume1
Before=remote-fs.target
After=network.target

[Mount]
What=<userid>@<password>://192.168.0.1/volume1
Where=/home/dave/shares/volume1
TimeoutSec=15s
Type=cifs
DirectoryMode=0775
Options=rw,vers=1,uid=dave,noperm

[Install]
  WantedBy=multi-user.target

Code: Select all

dave@dave-Aleena:~$ sudo cp home-dave-shares-volume1.mount /etc/systemd/system
dave@dave-Aleena:~$ systemctl daemon-reload
dave@dave-Aleena:~$ systemctl enable home-dave-shares-volume1.mount
dave@dave-Aleena:~$ systemctl status home-dave-shares-volume1.mount
● home-dave-shares-volume1.mount - CIFS mount @ /home/dave/shares/volume1
     Loaded: loaded (/etc/systemd/system/home-dave-shares-volume1.mount; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2021-03-04 12:37:34 CST; 40min ago
      Where: /home/dave/shares/volume1
       What: shares@sharesdwe://192.168.0.1/volume1

Mar 04 12:37:34 dave-Aleena systemd[1]: Mounting CIFS mount @ /home/dave/shares/volume1...
Mar 04 12:37:34 dave-Aleena mount[688]: mount.cifs: bad UNC (<userid>@<password>://192.168.0.1/volume1)
Mar 04 12:37:34 dave-Aleena systemd[1]: home-dave-shares-volume1.mount: Mount process exited, code=exited, status=1/FAILURE
Mar 04 12:37:34 dave-Aleena systemd[1]: home-dave-shares-volume1.mount: Failed with result 'exit-code'.
Mar 04 12:37:34 dave-Aleena systemd[1]: Failed to mount CIFS mount @ /home/dave/shares/volume1.
dave@dave-Aleena:~$ 
I'm about ready to give up :?

User avatar
Bob Wya
Level 12
Level 12
Posts: 2987
Joined: Sat Oct 16, 2010 7:40 pm
Location: Scotland
Contact:

Re: WIne access to Server drive

Post by Bob Wya » Thu Mar 04, 2021 2:40 pm

@fargodwe

I would always suggest "putting aside" versus "giving up"! :lol:

systemd unit logs are very detailed. Remember to look at:

Code: Select all

...
Active: failed (Result: exit-code) since Thu 2021-03-04 12:37:34 CST; 40min ago
...
If the systemd unit file hasn't been reloaded for 40 minutes - then you haven't restarted it!

This command reloads all changed unit definitions, but does nothing else:

Code: Select all

systemctl daemon-reload
This enables a unit to run:

Code: Select all

systemctl enable home-dave-shares-volume1.mount
- this may not be till the next system boot though...

To do a (one-off) restart of a unit - NOW - use:

Code: Select all

systemctl restart home-dave-shares-volume1.mount
- so you'd need to run this as well - each time you change your mount unit definition!

Hope that helps a bit! 8)

Bob

fargodwe
Level 5
Level 5
Posts: 394
Joined: Mon Oct 02, 2017 7:08 am

Re: WIne access to Server drive

Post by fargodwe » Thu Mar 04, 2021 4:01 pm

Still working on it. Thanks for the reload and restart. I had been using the enable but didn't know to do the restart.

So far the same error. systemd status, syslog, journaltctl, etc. I did do a journalcrl -xe and did see this at the end:

Code: Select all

Mar 04 14:36:54 dave-Aleena systemd[1]: home-dave-shares-volume1.mount: Mount process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- An n/a= process belonging to unit home-dave-shares-volume1.mount has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 1.
Mar 04 14:36:54 dave-Aleena systemd[1]: home-dave-shares-volume1.mount: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit home-dave-shares-volume1.mount has entered the 'failed' state with result 'exit-code'.
Mar 04 14:36:54 dave-Aleena systemd[1]: Failed to mount CIFS mount @ /home/dave/shares/volume1.
-- Subject: A start job for unit home-dave-shares-volume1.mount has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit home-dave-shares-volume1.mount has finished with a failure.
-- 
-- The job identifier is 1268 and the job result is failed.
Mar 04 14:36:54 dave-Aleena polkitd(authority=local)[556]: Unregistered Authentication Agent for unix-process:1670:11093 (system bus name :1.77, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnect>
~
Seeing the "Unregistered Authentication Agent" Iooked it up on the net. 1 post said it was at my login. Another said it had something to do with multi-user.target. I don't understand that as I thought that was the equivalent of unix run level 3 - just multiple users, no X, and networking. Oh well.

Post Reply