Your Question: How Do I Create a Home Directory for an Existing User in Linux?
Contents How Do I Add a Home Directory to an Existing User in Linux? This Requires Three Steps: Create Directory in Compliance to /Etc/Passwd, Usually There...
Contents
How do I add a home directory to an existing user in Linux?
This requires three steps:
- Create directory in compliance to /etc/passwd , usually there will be already a /home/login entry.
- Copy initial files from /etc/skel.
- And finally set right permissions: mkdir /home/YOU. cd /home/YOU. cp -r /etc/skel/. . chown -R YOU. YOURGROUP . chmod -R go=u,go-w .
How do I create a home directory for an existing user?
Create default home directory for existing user
To create a default home directory use mkhomedir_helper command. Make sure to run mkhomedir_helper command as root or user with sudo access. The previous command creates a home directory named “/home/bob” and user settings files.