/home/user: change directory failed error
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
It's actually a SELinux issue. Not sure about Arch Linux's configuration but I encountered it when replacing my home directory with another (i.e. restoring it from a backup). You can check it yourselves with
ls -lZ /home
That prints out SELinux labels. Your home directory should have the user_home_dir_t label. The fix is straightforward:
restorecon -R /home
A longer discussion can be found in the Fedora forums.