Cifs/smb mount with hidden credentials

Hi,
i want to add in fstab some line to auto-mount smb/cifs shares, but i don’t want to let the credential file readable. So is it possible so use kde-wallet or something else?
Maybe simliar to this here:

for ssh this works great.
Thanks in advance.

I strongly advise against using fstab to mount network shares as your system may hang if network is not available for some reason - and believe me - you don’t want that.

This is a utility script using gio to mount

This is an example on how to create a mount/automount set of units

Technically you create a file with the credentials e.g. /etc/samba/credentials

user=$SMBUSER
password=$SMBPASS
workgroup=$WORKGROUP

Then you supply that file in the mount options

//server/share cifs /mountpoint/sharename  rw,_netdev,credentials=/etc/samba/credentials

More resources - search the Tutorials section using samba keyword

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.