cifs in fstab from debian to debian

Kernels & Hardware, configuring network, installing services

cifs in fstab from debian to debian

Postby creepwood » 2019-08-06 14:00

I have one Debian 9 machine that I run as a home server, mostly serving files over the network through samba. I've installed Debian 10 in my desktop which I ran windows on before without any problem connecting to my files on my homeserver.

So when I try to mount the cifs shares on my homeserver in fstab on my desktop I just don't rights to do anything but read the files. I've been trying for a few weeks to figure out what's wrong, trying different mounting commands. When I connect to the shares in dolphin (I run KDE) there's no problem, I get full rights using the exact same credentials.

So what happens with the permissions when I connect through the fstab mounted volumes is that the permissions on the files (running ls -l) is root:root instead of userA (UID 1000) which exist only on the home server. I created a different username on my desktop, userB (UID 1000) and this is where I think the problem comes from. that they have the same UID but on two different machines with two different usernames, at least when it comes to fstab.

I'm very new at this, I only had help setting up my home server and I've been on Buster for a couple of weeks managing to fix one problem at a time but I just can't figure out how to mount my shares in fstab. If you answer, please take into consideration that I'm not well versed in the linux world.
creepwood
 
Posts: 28
Joined: 2013-09-15 20:29

Re: cifs in fstab from debian to debian

Postby ruwolf » 2019-08-06 14:35

User avatar
ruwolf
 
Posts: 365
Joined: 2008-02-18 05:04
Location: Slovakia, Banovce nad Bebravou, Matice slovenskej 1260/4-7

Re: cifs in fstab from debian to debian

Postby creepwood » 2019-08-06 15:23

I've tried a bunch of different ones.

Code: Select all
//10.101.242.21/alexandria /media/share/alexandria cifs username=userA,uid=userA,gid=1000,password=pwd,iocharset=utf8,users


Code: Select all
//10.101.242.21/alexandria /home/userB/mnt/alexandria cifs username=userA,password=pwd,user 0   0


Code: Select all
//10.101.242.21/alexandria /media/share/alexandria cifs username=userA,uid=userA,gid=groupA,password=pwd,iocharset=utf8,users


I haven't even been able to mount the share manually in the command prompt with the right privileges. I've tried a couple of others but I don't have the command line anymore. I looked at the link you recommended and I didn't have an a-ha moment reading it.

Edit: Worth nothing is that if I try to sudo mount -t cifs the share to the folder in my /home/userA/mnt/alexandria folder it gives me an error saying that it can't find that in /etc/fstab like it can only mount network shares that are defined in /etc/fstab.
creepwood
 
Posts: 28
Joined: 2013-09-15 20:29

Re: cifs in fstab from debian to debian

Postby ruwolf » 2019-08-06 16:36

The uid is always a number, probably 1000 as you have mentioned it...
User avatar
ruwolf
 
Posts: 365
Joined: 2008-02-18 05:04
Location: Slovakia, Banovce nad Bebravou, Matice slovenskej 1260/4-7

Re: cifs in fstab from debian to debian

Postby creepwood » 2019-08-06 19:10

ruwolf wrote:The uid is always a number, probably 1000 as you have mentioned it...


I used the number for UID, I was just stating from what user
creepwood
 
Posts: 28
Joined: 2013-09-15 20:29

Re: cifs in fstab from debian to debian

Postby Head_on_a_Stick » 2019-08-06 19:36

Try removing the user & users options, they shouldn't be needed.

And I think the password should be defined in a credentials file (declared in the options) with the x-systemd.automount option also added in.

Reference: https://wiki.debian.org/SAMBAClientSetup
User avatar
Head_on_a_Stick
 
Posts: 10346
Joined: 2014-06-01 17:46
Location: /dev/chair


Return to System configuration

Who is online

Users browsing this forum: No registered users and 13 guests

fashionable