Fstab syntax difference between 64 bit and 32 bit

Is there a difference in the way the fstab file is handled between the 64 and 32 bit versions of 18.04? I have 64bit on my desktop and added the following to the fstab file to mount shares on my NAS and it works fine:

    //wdmycloud.local/Public  /media/bill/Public  cifs  username=public,password=,uid=1000,gid=1000,iocharset=utf8  0  0
  //wdmycloud.local/Library  /media/bill/Library  cifs  username=public,password=,uid=1000,gid=1000,iocharset=utf8  0  0

But I recently installed the 32bit version on my netbook which does not support 64 bit instructions. And the same changes to fstab do not work. The shares appear under devices in Caja but clicking them gives an error message: mount: operation permitted for root only.

I guess I am finding out why you are no longer planning on supporting 32 bit only builds. But I still like using this netbook. Can anyone tell me what I am doing wrong? Thanks for any suggestions.

Bill

Bill, I think /sbin/mount.cifs needs to have setuid,
sudo chmod u+s /sbin/mount.cifs

-rwsr-xr-x 1 root root 35600 Mar 6 2017 mount.cifs

Thanks for the suggestion. I had never heard of setuid before. But changing it on mount.cifs did not change the outcome.

But it got me thinking of mounting and root. I discovered that I could mount the shares in Caja: Select folder in /media/bill, right click, choose open as administrator. Curiously this mounts both shares.

This makes me wonder if mount.cifs is getting run as root. Or is it getting run at all. I seem to remember installing cifs-utils as part of my troubleshooting.

So here’s the question I should know better than to ask, but I am going to ask anyway. So how do I tell how the fstab is being processed? Is it a script? Is it understandable by mere mortals?

Well, I guess it is off to goggle,

Bill

A partial fix: adding “user” to the list of options makes it possible to mount the share by simply clicking the share name under devices in the folder pane in Caja. Admin access not needed. Still not mounted at bootup.

Bill

A question, is username=public the same user with uid 1000 and gid 1000 ?

I added to my /etc/fstab (mint is some server that has repositories for the local network, I created /media/bill to test) //mint/repo /media/bill cifs guest 0 0

then sudo mount -a I can see the share either in caja or on my desktop. I cannot umount the share from caja since it needs root so sudo umount /media/bill works. I rebooted and the share appeared again.

fstab is read by the mount command. mount -a mounts all fs.

In response to your question, public is the user account on the server. The uid and gid refer to my account (bill) on the netbook. The server is actually a NAS box the size of an external drive, Western Digital MyCloud. I am not really sure what protocols it supports. I have always connected to it using samba and it works more or less.

Could I ask what kind of box your mint server is and which protocol it uses to share files? I am assuming it is some kind of linux box. I have never been able to connect to my nas with that few options. Perhaps my problem lies in the nas setup. It has always been a bit of a black box to me.

Thanks for trying to debug this from afar. i am sure it must be frustrating.

Bill

The mint server is a Linux box running samba (4.3.11-Ubuntu), has guest access enabled, and the share it provides (repo) is readable by all. The protocol used is SMB 2.0 I think.

Do you have SSH access to the WD? if so, can you show /etc/samba/smb.conf You should have an entry at the bottom like below

[Library]
  path = /shares/Library
  comment = this is the Library share 
  writeable = no
  guest ok = yes

Can you try this line in your fstab?

//wdmycloud.local/Library /media/bill/Library cifs public 0 0

I got basically the same results with your fstab line. I think guest logins are disabled. If I remember right it was in a firmware update - they created a backdoor to accessing the nas files.

But I finally realized what my problem is. The other difference between my network and my desktop is my netbook uses wi-fi and the desktop is hardwired. After plugging an Ethernet cable into the netbook it suddenly works like expected.

So I think what happens is the fstab file is processed before the network is up. The shares can not be mounted so they are left setup and ready to be mounted with Caja. I could not mount them because I was not root so I needed to add user to the options.

I think somewhere there is an option to stop startup processes until the network is up. But I think I will stick with the way it is now because startup takes long enough.

Thanks for all the help and sorry for dragging you through this. I think it is time for a beer.

Bill

no worries, glad you figured it out … enjoy the beer.