How do I automatically bind mount on boot in a non-root encrypted home directory?

Clash Royale CLAN TAG#URR8PPP
I want to bind mount a directory within my home when I log on. The line in fstab would be
/foo/bar /home/me/wherever none bind 0 0
The trouble is my home directory is encrypted, so it has to happen after I log in. The problem is my login scripts don't have permission to run mount.
Is there a way to do this?
ubuntu mount fstab disk-encryption
add a comment |
I want to bind mount a directory within my home when I log on. The line in fstab would be
/foo/bar /home/me/wherever none bind 0 0
The trouble is my home directory is encrypted, so it has to happen after I log in. The problem is my login scripts don't have permission to run mount.
Is there a way to do this?
ubuntu mount fstab disk-encryption
add a comment |
I want to bind mount a directory within my home when I log on. The line in fstab would be
/foo/bar /home/me/wherever none bind 0 0
The trouble is my home directory is encrypted, so it has to happen after I log in. The problem is my login scripts don't have permission to run mount.
Is there a way to do this?
ubuntu mount fstab disk-encryption
I want to bind mount a directory within my home when I log on. The line in fstab would be
/foo/bar /home/me/wherever none bind 0 0
The trouble is my home directory is encrypted, so it has to happen after I log in. The problem is my login scripts don't have permission to run mount.
Is there a way to do this?
ubuntu mount fstab disk-encryption
ubuntu mount fstab disk-encryption
asked Feb 1 '15 at 19:42
spraffspraff
2212615
2212615
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Everything you need is already built into mount.
The user option will allow non-root users to mount it
also add noauto to stop mount attempts during system startup.
/foo/bar /home/me/wherever none user,noauto,bind 0 0
Tried that. Nothing mounts, but it also doesn't interrupt the boot with an error as it did before. Will there be a log of this?
– spraff
Feb 2 '15 at 18:21
1
yeah, you have to add the command to mount it in your log-on script.
– Jasen
Feb 2 '15 at 22:22
add a comment |
super can run scripts setuid root. Try it. http://www.ucolick.org/~will/RUE/super/super.1.html.
1
Is there any reason to prefer super over sudo
– Jasen
Feb 2 '15 at 7:17
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f182350%2fhow-do-i-automatically-bind-mount-on-boot-in-a-non-root-encrypted-home-directory%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Everything you need is already built into mount.
The user option will allow non-root users to mount it
also add noauto to stop mount attempts during system startup.
/foo/bar /home/me/wherever none user,noauto,bind 0 0
Tried that. Nothing mounts, but it also doesn't interrupt the boot with an error as it did before. Will there be a log of this?
– spraff
Feb 2 '15 at 18:21
1
yeah, you have to add the command to mount it in your log-on script.
– Jasen
Feb 2 '15 at 22:22
add a comment |
Everything you need is already built into mount.
The user option will allow non-root users to mount it
also add noauto to stop mount attempts during system startup.
/foo/bar /home/me/wherever none user,noauto,bind 0 0
Tried that. Nothing mounts, but it also doesn't interrupt the boot with an error as it did before. Will there be a log of this?
– spraff
Feb 2 '15 at 18:21
1
yeah, you have to add the command to mount it in your log-on script.
– Jasen
Feb 2 '15 at 22:22
add a comment |
Everything you need is already built into mount.
The user option will allow non-root users to mount it
also add noauto to stop mount attempts during system startup.
/foo/bar /home/me/wherever none user,noauto,bind 0 0
Everything you need is already built into mount.
The user option will allow non-root users to mount it
also add noauto to stop mount attempts during system startup.
/foo/bar /home/me/wherever none user,noauto,bind 0 0
edited Feb 2 '15 at 7:20
answered Feb 2 '15 at 7:11
JasenJasen
2,210813
2,210813
Tried that. Nothing mounts, but it also doesn't interrupt the boot with an error as it did before. Will there be a log of this?
– spraff
Feb 2 '15 at 18:21
1
yeah, you have to add the command to mount it in your log-on script.
– Jasen
Feb 2 '15 at 22:22
add a comment |
Tried that. Nothing mounts, but it also doesn't interrupt the boot with an error as it did before. Will there be a log of this?
– spraff
Feb 2 '15 at 18:21
1
yeah, you have to add the command to mount it in your log-on script.
– Jasen
Feb 2 '15 at 22:22
Tried that. Nothing mounts, but it also doesn't interrupt the boot with an error as it did before. Will there be a log of this?
– spraff
Feb 2 '15 at 18:21
Tried that. Nothing mounts, but it also doesn't interrupt the boot with an error as it did before. Will there be a log of this?
– spraff
Feb 2 '15 at 18:21
1
1
yeah, you have to add the command to mount it in your log-on script.
– Jasen
Feb 2 '15 at 22:22
yeah, you have to add the command to mount it in your log-on script.
– Jasen
Feb 2 '15 at 22:22
add a comment |
super can run scripts setuid root. Try it. http://www.ucolick.org/~will/RUE/super/super.1.html.
1
Is there any reason to prefer super over sudo
– Jasen
Feb 2 '15 at 7:17
add a comment |
super can run scripts setuid root. Try it. http://www.ucolick.org/~will/RUE/super/super.1.html.
1
Is there any reason to prefer super over sudo
– Jasen
Feb 2 '15 at 7:17
add a comment |
super can run scripts setuid root. Try it. http://www.ucolick.org/~will/RUE/super/super.1.html.
super can run scripts setuid root. Try it. http://www.ucolick.org/~will/RUE/super/super.1.html.
answered Feb 1 '15 at 21:32
Nizam MohamedNizam Mohamed
42536
42536
1
Is there any reason to prefer super over sudo
– Jasen
Feb 2 '15 at 7:17
add a comment |
1
Is there any reason to prefer super over sudo
– Jasen
Feb 2 '15 at 7:17
1
1
Is there any reason to prefer super over sudo
– Jasen
Feb 2 '15 at 7:17
Is there any reason to prefer super over sudo
– Jasen
Feb 2 '15 at 7:17
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f182350%2fhow-do-i-automatically-bind-mount-on-boot-in-a-non-root-encrypted-home-directory%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown