Well, you can get /etc/fstab
mounts to work without sudo, but then you will have problems with the username.
I can have a
//<some-server>/data$/smbshares/Cluster /mnt/Dfs/Cluster cifs user,vers=3.0,sec=ntlmv2,uid=1000,gid=1000,iocharset=utf8,nounix,noauto,_netdev 0 0
entry in fstab, and I can then do a user mount as
mount -v -v /mnt/Dfs/Cluster/
and it will also ask for a password when mounting
Password for myuser@//<some-server>/data$/smbshares/Cluster:
But it will now mount the SMB remote with my login username.
Now, my username and the username for the SMB may not be equal,
and here is the main problem: I could specify a -o
option for the user mount as
mount -v -v /mnt/Dfs/Cluster/ -o user=mysambauser1231
but it seems this local user=name
clashes with the needed user
options in the fstab entry.
Trying different modes of the --options-mode
mount /mnt/Dfs/Cluster/ -o user=au204573 --options-mode append
did not work for me (I tried append
, prepend
, and replace
). So I am not able to mount as a user with an SMB username different than the current username.
(But hardcoding the SMB username in the fstab works,
à la user,user=mysambauser1231,vers=3.0,sec=ntlmv2,..
!)