When I was trying to mount a network share on boot by adding the following line to the /etc/fstab file:

//<server>/folder  /home/pi/target  cifs username=<username>,password=<password>,nofail,x-systemd.automount,x-systemd.requires=network-online.target,x-systemd.automount,vers=3.0  0 0

I noticed that I have to put my password there in plain text. So I was just wondering if it was possible to hide the password or encrypt it in the way that the system can read it. Any help, much appreciated.


1 Answer 1


Try Python utility cifscloak.

sudo pip3 install cifscloak


  • 1
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
    – Dougie
    Sep 13, 2021 at 18:25
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Sep 14, 2021 at 20:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.