My machine has a secondary (NTFS-formatted) internal hard disk drive containing most of my personal files and data. I wish to auto-mount this drive under my user HOME. However, during installation of Ubuntu (17.10), I chose to create a separate /home partition and apply the default (ecryptfs) encryption. This appears to be preventing the HDD from auto-mounting as desired from the entry I've created in fstab. However, the drive happily auto-mounts to un-encrpyted directories.

How can I achieve auto-mounting of the secondary hard drive under /home/<username>/?

I believe auto-mounting with fstab occurs during boot, while /home isn't decrypyted until user login. Perhaps the relevant fstab entry could be automatically checked after login? Perhaps I could create a small post-login script to automatically run the mount command - but I believe this would require a sudo password prompt (or maybe I should try the AutoFS tool). Or, since ecryptfs is a stacked filesystem, perhaps I could change the mount point be in the lower, encrypted layer which, if I understand correctly, is under /user/<username>/.Private? Since this layer is persistent, it exists through boot - but I can't imagine what would happen from attempting to mount an un-encrypted NTFS filesystem there.

  • You don't need sudo (or any other thing giving you rootpermissions if you add user to the list of options in /etc/fstab. Mar 1, 2022 at 7:25

1 Answer 1


Assuming that this is a personal system. Mount the drive external to your home folder and use a symbolic link to join the drive to your home folder.

ln -s <target> <localname>

so if the drive is mounted at


and you want it in your home folder as ndfsdrive,

ln -s /mnt/ntfsdrive /home/<username>/ntfsdrive

If this is not a personal or physically secured system, then other security considerations come into play.

  • Thanks. I should have mentioned I am already aware of the symlink solution and am not against it - but I am interested to learn of any mount-based solutions.
    – user267628
    Dec 27, 2017 at 6:23

You must log in to answer this question.