/home/user: change directory failed error

accountshomeusers

I just installed Arch reading from the Beginners' Guide on the Arch Wiki. Once I rebooted Arch, I logged into root then I added my own personal account: useradd fox then passwd fox and set my password for the account. Once I logged in with fox I was prompted with the error --fox: /home/fox: change directory failed: No such file or directory. Logging in with home = "/".

Why I'm receiving this error and how I can fix it?

Best Answer

You need to tell useradd to create your home directory:

useradd -m fox

You might also want to add options for group(s) -g -G, login-shell -s etc.

But don't worry - you can create your homedir now (as root using sudo or su):

# mkdir /home/fox
# chown fox:fox /home/fox

See Arch Linux Documentation - User Management

Related Question