Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Samba credentials encryption


    anyone knows how to encrypt a samba credentials file that will still be usable while mounting?
    in /etc/fstab I have the following
    //share/folder /mnt cifs defaults,soft,credentials=/path/to/cred 0 0

    in the cred file I have:

    can it be encrypted / hidden in someway but still be readable for the root user?

  2. #2
    hello and welcome, Expect!

    The text itself has to be in plain-text, so that the samba lib functions can read it, so you can't encrypt it. but you can make it hidden if you really want. just put a "." at the beginning of the filename, e.g.:

    then commands like "ls" won't show it, by default (but it will with the "-a" flag).

    and of course, you should put it in a dir owned by root that prevents world-read access, e.g.:

    but anyone who's got root will find it.

    i assume you want it to be able to mount w/o user interaction, right? if not, then yeah, you could encrypt it (with any number of Linux libraries or 3rd party utils), then decrypt it right before you run the mount command, then encrypt it again, after the mount command.

  3. #3
    Thanks for the answer mate.

  4. $spacer_open
  5. #4
    marking as Solved. Note that you can do this yourself at any time using the Thread Tools link at the top of the page.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts