You are not logged in.

#1 2019-03-07 17:20:13

Buddlespit
Member
From: Chesapeake, Va.
Registered: 2014-02-07
Posts: 501

(SOLVED)Public samba share fails on kernel 5.0 (stock or zen)

I have two shares on my server, Homes and Shares. Homes mounts ok, doesn't appear to have any problems. I can move files between my desktop and my server.
The public share, Shares, will not mount using stock kernel 5.0.0-arch1-1-ARCH or the zen variant. Shares mount properly from the LTS kernel.

[root@PatsMain pat]# systemctl start mnt-Shares.mount 
Job for mnt-Shares.mount failed.
See "systemctl status mnt-Shares.mount" and "journalctl -xe" for details.

[root@PatsMain pat]# systemctl status mnt-Shares.mount
● mnt-Shares.mount - Mount Public Share at boot
   Loaded: loaded (/etc/systemd/system/mnt-Shares.mount; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2019-03-07 11:59:50 EST; 5s ago
    Where: /mnt/Shares
     What: //192.168.1.13/Shares

Mar 07 11:59:50 PatsMain systemd[1]: Mounting Mount Public Share at boot...
Mar 07 11:59:50 PatsMain mount[10995]: mount error(13): Permission denied
Mar 07 11:59:50 PatsMain mount[10995]: Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Mar 07 11:59:50 PatsMain systemd[1]: mnt-Shares.mount: Mount process exited, code=exited, status=32/n/a
Mar 07 11:59:50 PatsMain systemd[1]: mnt-Shares.mount: Failed with result 'exit-code'.
Mar 07 11:59:50 PatsMain systemd[1]: Failed to mount Mount Public Share at boot.

[root@PatsMain pat]# journalctl -xe
Mar 07 11:59:03 PatsMain systemd-networkd[441]: enp8s0: Could not acquire DHCPv6 lease on NDisc request: Address already in use
Mar 07 11:59:10 PatsMain systemd-networkd[441]: enp8s0: Could not acquire DHCPv6 lease on NDisc request: Address already in use
Mar 07 11:59:17 PatsMain systemd-networkd[441]: enp8s0: Could not acquire DHCPv6 lease on NDisc request: Address already in use
Mar 07 11:59:25 PatsMain systemd-networkd[441]: enp8s0: Could not acquire DHCPv6 lease on NDisc request: Address already in use
Mar 07 11:59:33 PatsMain systemd-networkd[441]: enp8s0: Could not acquire DHCPv6 lease on NDisc request: Address already in use
Mar 07 11:59:42 PatsMain systemd-networkd[441]: enp8s0: Could not acquire DHCPv6 lease on NDisc request: Address already in use
Mar 07 11:59:44 PatsMain systemd[1]: Reloading.
Mar 07 11:59:44 PatsMain systemd[1]: /usr/lib/systemd/system/reflector.service:5: Failed to add dependency on NetworkManager-wait-online, ignoring: Unknown error -22
Mar 07 11:59:44 PatsMain systemd[1]: /usr/lib/systemd/system/fancontrol.service:7: PIDFile= references path below legacy directory /var/run/, updating /var/run/fancontrol.pid → /run/fancon>
Mar 07 11:59:50 PatsMain systemd[1]: Mounting Mount Public Share at boot...
-- Subject: A start job for unit mnt-Shares.mount has begun execution
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- A start job for unit mnt-Shares.mount has begun execution.
-- 
-- The job identifier is 948.
Mar 07 11:59:50 PatsMain kernel: CIFS: Attempting to mount //192.168.1.13/Shares
Mar 07 11:59:50 PatsMain kernel: No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dia>
Mar 07 11:59:50 PatsMain mount[10995]: mount error(13): Permission denied
Mar 07 11:59:50 PatsMain mount[10995]: Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Mar 07 11:59:50 PatsMain systemd[1]: mnt-Shares.mount: Mount process exited, code=exited, status=32/n/a
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- An n/a= process belonging to unit mnt-Shares.mount has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 32.
Mar 07 11:59:50 PatsMain systemd[1]: mnt-Shares.mount: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- The unit mnt-Shares.mount has entered the 'failed' state with result 'exit-code'.
Mar 07 11:59:50 PatsMain systemd[1]: Failed to mount Mount Public Share at boot.
-- Subject: A start job for unit mnt-Shares.mount has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- A start job for unit mnt-Shares.mount has finished with a failure.
-- 
-- The job identifier is 948 and the job result is failed.
Mar 07 11:59:50 PatsMain kernel: CIFS VFS: failed to connect to IPC (rc=-13)
Mar 07 11:59:50 PatsMain kernel: CIFS VFS: cifs_mount failed w/return code = -13
Mar 07 11:59:50 PatsMain systemd-networkd[441]: enp8s0: Could not acquire DHCPv6 lease on NDisc request: Address already in use
Mar 07 11:59:59 PatsMain systemd-networkd[441]: enp8s0: Could not acquire DHCPv6 lease on NDisc request: Address already in use
lines 2198-2244/2244 (END)

My Shares mount unit:

/etc/systemd/system/mnt-Shares.mount
[Unit]
Description=Mount Public Share at boot
Requires=systemd-networkd.service
After=systemd-resolved.service
Wants=systemd-resolved.service

[Mount]
What=//192.168.1.13/Shares
Where=/mnt/Shares
#Options=guest,uid=1000,auto,x-systemd.automount,iocharset=utf8,file_mode=0777,dir_mode=0777 *<--actually removed, just left here for reference
Options=guest,x-systemd.automount,iocharset=utf8
Type=cifs
TimeoutSec=30

[Install]
WantedBy=multi-user.target

My Homes mount unit which works with kernel 5.0 (stock and zen):

/etc/systemd/system/mnt-Home.mount
[Unit]
Description=Mount Home Share at boot
Requires=systemd-networkd.service
After=systemd-resolved.service
Wants=systemd-resolved.service

[Mount]
What=//192.168.1.13/Homes
Where=/mnt/Home
Options=credentials=(blanked),auto,x-systemd.automount,iocharset=utf8
Type=cifs
TimeoutSec=30

[Install]
WantedBy=multi-user.target

My servers smb.conf, just in case someones wondering:

#======================= Global Settings =====================================
[global]

   workgroup = DEBRIELLA
   server string = Samba Server
   hosts allow = 192.168.1.0/255.255.255.0 127.0.0.1
   deadtime = 15
   keepalive = 300
   log file = /var/log/samba/%m.log
   max log size = 50
   map to guest = Bad User
   socket options = IPTOS_LOWDELAY TCP_NODELAY SO_RCVBUF=65536 SO_SNDBUF=65536
   preferred master = yes
   strict sync = no
   sync always = no

#============================ Share Definitions ==============================

[Homes]
   comment = Home Directories
   browseable = no
   read only = no
   create mask = 0700
   directory mask = 0700
   valid users = %S
   inherit acls = Yes

[Shares]
   path = /share
   browseable = yes
   read only = no
   guest ok = yes
   create mask = 0777
   directory mask = 0777
   force user = nobody
   force group = nobody

Last edited by Buddlespit (2019-03-08 19:59:38)

Offline

#2 2019-03-07 21:07:18

seth
Member
Registered: 2012-09-03
Posts: 50,970

Re: (SOLVED)Public samba share fails on kernel 5.0 (stock or zen)

This can have a lot of causes. For a start, see https://unix.stackexchange.com/question … ion-denied
If this is a regression, I'd assume the security protocol.

Why is "credentials=(blanked)"? Is this anything but a path??

Offline

#3 2019-03-07 22:14:38

Buddlespit
Member
From: Chesapeake, Va.
Registered: 2014-02-07
Posts: 501

Re: (SOLVED)Public samba share fails on kernel 5.0 (stock or zen)

The Shares share isn't password protected like Homes is. It works just fine on the LTS kernel (which the server is also running), just not on either stock or zen 5.0 kernels.

And I blanked my creds because I'm anal. It's in a super-duper secret location with permissions set to 600 and named something off the wall.

If you need specific logs or for me to test something, I'm free all weekend (I think).

Offline

#4 2019-03-08 10:12:58

seth
Member
Registered: 2012-09-03
Posts: 50,970

Re: (SOLVED)Public samba share fails on kernel 5.0 (stock or zen)

Ah, sorry. I half-ass.umed the restricted mount failed.
Check the server log and attempt a manual mount. Assuming the guest option is critical, try to pass user/password explicitly, eg. "user=nobody,pass=", instead.

There are no explicit share defs on the server?

Offline

#5 2019-03-08 11:54:26

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,645

Re: (SOLVED)Public samba share fails on kernel 5.0 (stock or zen)

Check your dmesg if it complains due to the negotiated protocol version and try e.g. vers=3.0.2 on your mount options. (The default dialect to try was bumped to 3.1.1)

Offline

#6 2019-03-08 19:59:05

Buddlespit
Member
From: Chesapeake, Va.
Registered: 2014-02-07
Posts: 501

Re: (SOLVED)Public samba share fails on kernel 5.0 (stock or zen)

You gentlemen (and/or ladies, whichever the case may be) are awsome! Thank you! I was able to manually mount with just "-o vers=3.0.2", ended up removing just the uid and auto and was able to settle with "-o vers=3.0.2,guest,x-systemd.automount,iocharset=utf8,file_mode=0777,dir_mode=0777". Changed the systemd mount unit option to the above and now it works beautifully. Thank you, thank you, thank you!

edit: I had to put the uid=1000 back in, or it wouldn't give me access after moving files. So it was just the auto that was removed and vers added.

Last edited by Buddlespit (2019-03-08 20:17:30)

Offline

Board footer

Powered by FluxBB