CIFS shares do not work (still)

Why is “mount.cifs” not working in fstab any more

After upgrading from 15.04 it was always the same… no mapping possible. Iit does still not work 18.04?

“Mapping a drive” on a filesserver is a quite essential functionality for me. It is natualy mostly esential when running file servers in mixed enviroments. Googling Ihave found s lot of coments to this ishue, but no usabel solution.

After changing FSTAB and running “sudo mount -a” I get…

   _Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)_

A friend wrote not long ago…

https://askubuntu.com/questions/1032237/why-is-mount-cifs-not-working-in-fstab-any-more-after-upgrading-from-16-04-to-18

His note explain my problem better than I can write. (Sorry for my english lemitation.

My last funcitiobal “maping” I have uses in FSTAB is…

//192.168.1.6/backup /media/b1 cifs credentials=/home/pba/.smbc,iocharset=utf8,gid=1000,uid=1000,file_mode=0777,dir_mode=0777,x-systemd.automount,sec=ntlm 0 0

Thanks for any help.

Regards
Poul

did you install cifs-utils ?

As @pavlos_kairis stated, first check to see if cifs-utils is installed. Then try adding the version. This what I use:

sudo mount -t cifs -o rw,noperm,username=guest,file_mode=0777,dir_mode=0777,vers=1.0 //serverip/share /mnt/share

pba@asus:~$ sudo mount -t cifs -o rw,noperm,username=pba,filemode=0777,dir_mode=0777,vers=1.0 //192.168.1.5/user /media/user
Password for pba@//192.168.1.5/user:
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
pba@asus:~$

tail /var/log/kern.log for errors.

I assume share [user] exists in the .5 system.
Your previous post was about .6 and a different share.

filemode needs to be file_mode

tail /var/log/kern.log for errors.

pba@asus:~$ sudo tail /var/log/kern.log
May 12 22:42:39 asus kernel: [19175.241336] audit: type=1107 audit(1526157759.802:262): pid=912 uid=103 auid=4294967295 ses=4294967295 msg=‘apparmor=“DENIED” operation=“dbus_signal” bus=“system” path="/org/cups/cupsd/Notifier" interface=“org.cups.cupsd.Notifier” member=“JobProgress” name=":1.76" mask=“receive” pid=2255 label="/usr/sbin/cups-browsed" peer_pid=3337 peer_label="/usr/sbin/cupsd" peer_info=“Protocol not supported”
May 12 22:42:39 asus kernel: [19175.241336] exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?’
May 12 22:42:39 asus kernel: [19175.241337] audit: type=1107 audit(1526157759.802:263): pid=912 uid=103 auid=4294967295 ses=4294967295 msg=‘apparmor=“DENIED” operation=“dbus_signal” bus=“system” path="/org/cups/cupsd/Notifier" interface=“org.cups.cupsd.Notifier” member=“PrinterStateChanged” mask=“send” name=“org.freedesktop.DBus” pid=3337 label="/usr/sbin/cupsd" peer_pid=2255 peer_label="/usr/sbin/cups-browsed" info=“Protocol not supported”
May 12 22:42:39 asus kernel: [19175.241337] exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?’
May 12 22:42:39 asus kernel: [19175.241338] audit: type=1107 audit(1526157759.802:264): pid=912 uid=103 auid=4294967295 ses=4294967295 msg=‘apparmor=“DENIED” operation=“dbus_signal” bus=“system” path="/org/cups/cupsd/Notifier" interface=“org.cups.cupsd.Notifier” member=“PrinterStateChanged” name=":1.76" mask=“receive” pid=2255 label="/usr/sbin/cups-browsed" peer_pid=3337 peer_label="/usr/sbin/cupsd" peer_info=“Protocol not supported”
May 12 22:42:39 asus kernel: [19175.241338] exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?’
May 12 22:44:43 asus kernel: [19299.039504] CIFS: Unknown mount option “file-mode=0777”
May 12 22:44:50 asus kernel: [19305.622757] CIFS: Unknown mount option “file-mode=0777”
May 12 22:45:10 asus kernel: [19325.738979] CIFS: Unknown mount option “file-mode=0777”
May 12 22:45:18 asus kernel: [19334.008311] CIFS: Unknown mount option “file-mode=0777”
------------ end-------------
Share excist = Yes

filemode => changed to file_mode
result…

mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Poul

sudo mount -t cifs -o rw,noperm,username=pba,file_mode=0777,dir_mode=0777,vers=1.0 //192.168.1.5/user /media/user

Is the [user] share defined as writable? Try basic command …
sudo mount -o username=pba //192.168.1.5/user /media/user
then add the file_mode, dir_mode, vers
tail -f /var/log/kern.log and see when an error occurs after having added a parameter …

From pavlos_kairis May 12


Is the [user] share defined as writable? Try basic command …
sudo mount -o username=pba //192.168.1.5/user /media/user
then add the file_mode, dir_mode, vers
tail -f /var/log/kern.log and see when an error occurs after having added a parameter …

–>> pba@asus:~$ sudo mount -o username=pba //192.168.1.5/user /media/user
Password for pba@//192.168.1.5/user: ***
mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
pba@asus:~$

pba@asus:~$ tail -f /var/log/kern.log
May 13 19:47:39 asus kernel: [12940.794117] start_kernel+0x4dc/0x4fd
May 13 19:47:39 asus kernel: [12940.794122] x86_64_start_reservations+0x24/0x26
May 13 19:47:39 asus kernel: [12940.794127] x86_64_start_kernel+0x74/0x77
May 13 19:47:39 asus kernel: [12940.794133] secondary_startup_64+0xa5/0xb0
May 13 19:47:39 asus kernel: [12940.794136] Code: 9a 0f 1f 44 00 00 0f 1f 44 00 00 55 89 f0 48 89 e5 41 57 41 56 41 55 41 54 53 48 8b 5f 28 48 03 1c c5 00 74 ba ad 39 57 04 76 0d <0f> 0b 5b 41 5c 41 5d 41 5e 41 5f 5d c3 39 57 08 76 ee 89 d0 f0
May 13 19:47:39 asus kernel: [12940.794224] —[ end trace 55b7e8147919b302 ]—
May 13 20:33:51 asus kernel: [15712.485615] 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 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount.
May 13 20:33:51 asus kernel: [15712.524469] CIFS VFS: cifs_mount failed w/return code = -112
May 13 20:37:28 asus kernel: [15929.688013] 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 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount.
May 13 20:37:28 asus kernel: [15929.721112] CIFS VFS: cifs_mount failed w/return code = -112

Ctrl+C back

can you ping .5 ? (your first post was referring to .6 btw).

seems you had a kernel hiccup lines 4,5. An update/upgrade & reboot might clear things.

Hi Pavlos

Ping… YES!

Kernel hiccup lines ??? ??? not understod. I am sorry but I have my limitations… :wink:

Poul

--------- start —
pba@asus:~$ ping 192.168.1.6 (NAS server)
PING 192.168.1.6 (192.168.1.6) 56(84) bytes of data.
64 bytes from 192.168.1.6: icmp_seq=1 ttl=64 time=0.310 ms

pba@asus:~$ ping 192.168.1.5 (NAS server)
PING 192.168.1.5 (192.168.1.5) 56(84) bytes of data.
64 bytes from 192.168.1.5: icmp_seq=1 ttl=64 time=0.268 ms

Gateway 192.168.1.1
Printers 192.168.1.21 to 29
Scanners 192.168.1.31 to 35

Other… 192.168.1.50 to 99
DHCP… 192.168.1.101 and up to 192.168.1.199
192.168.1.200 to 255 are not used now.
----------------- end -----

this line seems like a kernel hiccup, there should be an earlier line [ begin trace ]

So you can ping them w/o issues but mount reported host down. Why?

if you type, smbtree do you get an output like (canyon is a 16.04 and bionic 18.04)

HOME
        \\CANYON         		canyon server (Samba, Ubuntu) 4.3.11-Ubuntu
        	\\CANYON\IPC$          	IPC Service (canyon server (Samba, Ubuntu) 4.3.11-Ubuntu)
        	\\CANYON\tech_share     Tech Knowledge NFS share
        \\BIONIC         		bionic server (Samba, Ubuntu)
        	\\BIONIC\IPC$          	IPC Service (bionic server (Samba, Ubuntu))
        	\\BIONIC\public

pba@asus:~$ smbtree
WORKGROUP
\NASBOX nasbox
\NASBOX\gene Genealogy
\NASBOX\htdocs Webpages (w)
\NASBOX\media Media Server Share (m)
\NASBOX\picture Billedarkiv
\NASBOX\public Generelle data §
\NASBOX\software SW-datadrev (G)
\NASBOX\users Ny users
\NASBOX\IPC$ IPC Service (nasbox)
\MFC6490W
\BACKUP backup
\BACKUP\Back Backup på dataserver
\BACKUP\backup Backup Share
\BACKUP\IPC$ IPC Service (backup)
\ASUS asus local
\ASUS\IP22_HL5340D HL5340D - duplex - B&W laser
\ASUS\IP27_MFC-6490CW Brother MFC-6490CW
\ASUS\IP21_MFC-7820N Brother MFC-7820N - multifunktion
\ASUS\IP29_MFC-J6520DW Brother MFC-J6520DW – A3 og A4 Color duplex
\ASUS\IP23_HL3040CN Brother HL3040CN - color laser A4.
\ASUS\IPC$ IPC Service (asus local)
\ASUS\Downloads pba-xtra
\ASUS\pba
\ASUS\root directory Rod på server - K3C
\1P_PRINTSERV90E PrinterServer

None of this show a share named user.
You were trying to mount 192.168.1.5\user but I don’t see that share listed.
I see \\NASBOX\users and \\ASUS\pba

Hi Pavlos
I am leaving for 3 weeks vacation… leaving the computer back home… ;(
Thanks for your help until now… I wil continue from here when back.
Regards
Poul

enjoy your vacation; we’ ll troubleshoot after your return.