I have a user account provided by client with unrestricted sudo
access, but this user has no home directory. I want to create one, but I'm not sure how to go about it.
I tried logging in as my normal user and sudo su
ing into root, then running
usermod -d /home/user -m user
But it gaves the message usermod: no changes.
I assume because my user is already logged in?
Other solutions seem to involve removing and re-creating my user account with a home directory, but again as user would be already logged in I think there may be problems with that approach.
Is there a way to create my user's home directory with the access I have, or do I need to inform my client/provider to recreate my account?
Best Answer
Just create a home directory for them and grant them permissions.
mkdir /home/$user
and thenchown $user:$user /home/$user
.Take note to replace the group in the
chown
command with something else if required.