Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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 = "/".

I'm new to Linux and I told myself that, no matter how hard Arch is to a new user (from what I heard), it'll be the first one. So could someone tell me why I'm receiving this error and how I can fix it?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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

share|improve this answer
1  
Ah, thank you! Is it actually vital to do groups? –  ErraticFox Mar 4 at 13:57
    
@ErraticFox - No, I think the default for Arch is to create a group with the same name as the user, so your group is now most likely fox. For some applications it is necessary to add extra groups, like audio. Start simple and add if the need arises. You can check current group membership with either of the commands groups or id –  grebneke Mar 4 at 14:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.