How to rename a user with an eCryptfs encrypted home directory?
I just want to change the username of a user with an encrypted home directory. Is there a simple way instead of the suggested restoring and so forth?
- How can i move an encrypted home directory to another partition?
- How do I move my encrypted /home to a new computer?
home-directory ecryptfs user-management
add a comment |
I just want to change the username of a user with an encrypted home directory. Is there a simple way instead of the suggested restoring and so forth?
- How can i move an encrypted home directory to another partition?
- How do I move my encrypted /home to a new computer?
home-directory ecryptfs user-management
add a comment |
I just want to change the username of a user with an encrypted home directory. Is there a simple way instead of the suggested restoring and so forth?
- How can i move an encrypted home directory to another partition?
- How do I move my encrypted /home to a new computer?
home-directory ecryptfs user-management
I just want to change the username of a user with an encrypted home directory. Is there a simple way instead of the suggested restoring and so forth?
- How can i move an encrypted home directory to another partition?
- How do I move my encrypted /home to a new computer?
home-directory ecryptfs user-management
home-directory ecryptfs user-management
asked Dec 30 '18 at 5:40
LiveWireBT
21.2k1770153
21.2k1770153
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
- It's best to unmount your home directory and execute the commands from another administrator account on the computer. You could use
ecryptfs-umount-privateor just reboot to unmount the directory.
Change the login name and directory name from
old_usertonew_user:
sudo usermod -l new_user -m -d /home/new_user old_user
Here comes the important part for the proper configuration:
- There exists a file named
/home/.ecryptfs/$USER/.ecryptfs/Private.mntit usually contains the following:/home/$USER
The following symlinks exist in your home directory when eCryptfs is not mounted:
.ecryptfs -> /home/.ecryptfs/$USER/.ecryptfs
.Private -> /home/.ecryptfs/$USER/.Private
Make sure that
$USERin all these instances reflects the changes you intended to make, e.g.new_user. You can usenanoto edit text files andln -sto create new symlinks.
- There exists a file named
You should be able to login again. I just tried it on my own. If you cannot log in through the GUI try from the terminal and check again that everything is in place.
Which version of Ubuntu does this work on? (Just in case it doesn't work on a future/past version)
– Xen2050
Dec 31 '18 at 23:41
@Xen2050 Based on this answer I'd say it should work on all non-EOL releases. In this example though I actually used Fedora 29. I made similar modifications to Ubuntu hosts years ago like providing an unencrypted.ssh/authorized_keysfile for remote login, so I'd say once you understood where your data and configuration is and how the individual parts come together it's pretty basic and solid.
– LiveWireBT
Jan 1 at 0:42
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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%2faskubuntu.com%2fquestions%2f1105521%2fhow-to-rename-a-user-with-an-ecryptfs-encrypted-home-directory%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
- It's best to unmount your home directory and execute the commands from another administrator account on the computer. You could use
ecryptfs-umount-privateor just reboot to unmount the directory.
Change the login name and directory name from
old_usertonew_user:
sudo usermod -l new_user -m -d /home/new_user old_user
Here comes the important part for the proper configuration:
- There exists a file named
/home/.ecryptfs/$USER/.ecryptfs/Private.mntit usually contains the following:/home/$USER
The following symlinks exist in your home directory when eCryptfs is not mounted:
.ecryptfs -> /home/.ecryptfs/$USER/.ecryptfs
.Private -> /home/.ecryptfs/$USER/.Private
Make sure that
$USERin all these instances reflects the changes you intended to make, e.g.new_user. You can usenanoto edit text files andln -sto create new symlinks.
- There exists a file named
You should be able to login again. I just tried it on my own. If you cannot log in through the GUI try from the terminal and check again that everything is in place.
Which version of Ubuntu does this work on? (Just in case it doesn't work on a future/past version)
– Xen2050
Dec 31 '18 at 23:41
@Xen2050 Based on this answer I'd say it should work on all non-EOL releases. In this example though I actually used Fedora 29. I made similar modifications to Ubuntu hosts years ago like providing an unencrypted.ssh/authorized_keysfile for remote login, so I'd say once you understood where your data and configuration is and how the individual parts come together it's pretty basic and solid.
– LiveWireBT
Jan 1 at 0:42
add a comment |
- It's best to unmount your home directory and execute the commands from another administrator account on the computer. You could use
ecryptfs-umount-privateor just reboot to unmount the directory.
Change the login name and directory name from
old_usertonew_user:
sudo usermod -l new_user -m -d /home/new_user old_user
Here comes the important part for the proper configuration:
- There exists a file named
/home/.ecryptfs/$USER/.ecryptfs/Private.mntit usually contains the following:/home/$USER
The following symlinks exist in your home directory when eCryptfs is not mounted:
.ecryptfs -> /home/.ecryptfs/$USER/.ecryptfs
.Private -> /home/.ecryptfs/$USER/.Private
Make sure that
$USERin all these instances reflects the changes you intended to make, e.g.new_user. You can usenanoto edit text files andln -sto create new symlinks.
- There exists a file named
You should be able to login again. I just tried it on my own. If you cannot log in through the GUI try from the terminal and check again that everything is in place.
Which version of Ubuntu does this work on? (Just in case it doesn't work on a future/past version)
– Xen2050
Dec 31 '18 at 23:41
@Xen2050 Based on this answer I'd say it should work on all non-EOL releases. In this example though I actually used Fedora 29. I made similar modifications to Ubuntu hosts years ago like providing an unencrypted.ssh/authorized_keysfile for remote login, so I'd say once you understood where your data and configuration is and how the individual parts come together it's pretty basic and solid.
– LiveWireBT
Jan 1 at 0:42
add a comment |
- It's best to unmount your home directory and execute the commands from another administrator account on the computer. You could use
ecryptfs-umount-privateor just reboot to unmount the directory.
Change the login name and directory name from
old_usertonew_user:
sudo usermod -l new_user -m -d /home/new_user old_user
Here comes the important part for the proper configuration:
- There exists a file named
/home/.ecryptfs/$USER/.ecryptfs/Private.mntit usually contains the following:/home/$USER
The following symlinks exist in your home directory when eCryptfs is not mounted:
.ecryptfs -> /home/.ecryptfs/$USER/.ecryptfs
.Private -> /home/.ecryptfs/$USER/.Private
Make sure that
$USERin all these instances reflects the changes you intended to make, e.g.new_user. You can usenanoto edit text files andln -sto create new symlinks.
- There exists a file named
You should be able to login again. I just tried it on my own. If you cannot log in through the GUI try from the terminal and check again that everything is in place.
- It's best to unmount your home directory and execute the commands from another administrator account on the computer. You could use
ecryptfs-umount-privateor just reboot to unmount the directory.
Change the login name and directory name from
old_usertonew_user:
sudo usermod -l new_user -m -d /home/new_user old_user
Here comes the important part for the proper configuration:
- There exists a file named
/home/.ecryptfs/$USER/.ecryptfs/Private.mntit usually contains the following:/home/$USER
The following symlinks exist in your home directory when eCryptfs is not mounted:
.ecryptfs -> /home/.ecryptfs/$USER/.ecryptfs
.Private -> /home/.ecryptfs/$USER/.Private
Make sure that
$USERin all these instances reflects the changes you intended to make, e.g.new_user. You can usenanoto edit text files andln -sto create new symlinks.
- There exists a file named
You should be able to login again. I just tried it on my own. If you cannot log in through the GUI try from the terminal and check again that everything is in place.
answered Dec 30 '18 at 5:40
LiveWireBT
21.2k1770153
21.2k1770153
Which version of Ubuntu does this work on? (Just in case it doesn't work on a future/past version)
– Xen2050
Dec 31 '18 at 23:41
@Xen2050 Based on this answer I'd say it should work on all non-EOL releases. In this example though I actually used Fedora 29. I made similar modifications to Ubuntu hosts years ago like providing an unencrypted.ssh/authorized_keysfile for remote login, so I'd say once you understood where your data and configuration is and how the individual parts come together it's pretty basic and solid.
– LiveWireBT
Jan 1 at 0:42
add a comment |
Which version of Ubuntu does this work on? (Just in case it doesn't work on a future/past version)
– Xen2050
Dec 31 '18 at 23:41
@Xen2050 Based on this answer I'd say it should work on all non-EOL releases. In this example though I actually used Fedora 29. I made similar modifications to Ubuntu hosts years ago like providing an unencrypted.ssh/authorized_keysfile for remote login, so I'd say once you understood where your data and configuration is and how the individual parts come together it's pretty basic and solid.
– LiveWireBT
Jan 1 at 0:42
Which version of Ubuntu does this work on? (Just in case it doesn't work on a future/past version)
– Xen2050
Dec 31 '18 at 23:41
Which version of Ubuntu does this work on? (Just in case it doesn't work on a future/past version)
– Xen2050
Dec 31 '18 at 23:41
@Xen2050 Based on this answer I'd say it should work on all non-EOL releases. In this example though I actually used Fedora 29. I made similar modifications to Ubuntu hosts years ago like providing an unencrypted
.ssh/authorized_keys file for remote login, so I'd say once you understood where your data and configuration is and how the individual parts come together it's pretty basic and solid.– LiveWireBT
Jan 1 at 0:42
@Xen2050 Based on this answer I'd say it should work on all non-EOL releases. In this example though I actually used Fedora 29. I made similar modifications to Ubuntu hosts years ago like providing an unencrypted
.ssh/authorized_keys file for remote login, so I'd say once you understood where your data and configuration is and how the individual parts come together it's pretty basic and solid.– LiveWireBT
Jan 1 at 0:42
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- 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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2faskubuntu.com%2fquestions%2f1105521%2fhow-to-rename-a-user-with-an-ecryptfs-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