You are not logged in.

#1 2015-05-02 13:08:30

soelderer
Member
Registered: 2015-05-02
Posts: 2

mount doesn't find cifs-entry in fstab as non-root user

hello,

i have a samba share which i want to mount as a regular user.

i have an fstab entry as follows:

//10.10.10.10/raspi   /home/soelderer/pi/raspi   cifs   rw,noauto,users,credentials=/home/soelderer/.smbcredentials   0 0

mounting it as regular user gives the following error:

$ mount "//10.10.10.10/raspi" --verbose
mount: //10.10.10.10/raspi: No such file or directory

if i run that as root, it works just fine:

# mount "//10.10.10.10/raspi" --verbose
mount.cifs kernel mount options: ip=10.10.10.10,unc=\\10.10.10.10\raspi,user=soelderer,pass=********

however, manually mounting it with mount.cifs works as regular user as well:

$ mount.cifs "//10.10.10.10/raspi" /home/soelderer/pi/raspi -o rw,credentials=/home/soelderer/.smbcredentials --verbose
mount.cifs kernel mount options: ip=10.10.10.10,unc=\\10.10.10.10\raspi,noauto,uid=1000,gid=1000,user=soelderer,pass=********

shouldn't mount look for mountpoints in fstab as non-root user as well? seems to me like it kind of cannot find that entry.

regards,
soelderer

Offline

#2 2015-05-02 19:03:37

ackalker
Member
Registered: 2012-11-27
Posts: 201

Re: mount doesn't find cifs-entry in fstab as non-root user

Please try:

$ mount /home/soelderer/pi/raspi

As to why your usage of mount works for root and not for a normal user, I have no idea. I can reproduce it, though.

Last edited by ackalker (2015-05-02 19:28:42)

Offline

#3 2015-05-02 21:33:48

soelderer
Member
Registered: 2015-05-02
Posts: 2

Re: mount doesn't find cifs-entry in fstab as non-root user

that gives

mount: can't find /home/soelderer/pi/raspi in /etc/fstab

no problem, I'll just keep using mount.cifs; just would like to understand why "mount" does not work.

Offline

#4 2015-05-13 20:41:03

Malkymder
Member
Registered: 2015-05-13
Posts: 258

Re: mount doesn't find cifs-entry in fstab as non-root user

Personally i use systemd to mount my cifs mounts adding the x-systemd.automount option
in your case it might look like this

x-systemd.automount,rw,noauto,users,credentials=/home/soelderer/.smbcredentials

Not sure if that would provide the end result you're expecting but it has served me well...

Offline

Board footer

Powered by FluxBB