FTP Migration. Moving the FTP server from Windows to Ubuntu, and rebuilding the storage for FTP on a different server. I'm doing a one time pass to create about 100 users, all with the same password, with home directories on the mounted remote server. Here's what I'm running:

ls /media/OldFTP |
grep -Ev '^[[:digit:]]{4}|^P[[:digit:]]{4}|^W[[:digit:]]{4}' |
xargs -n1 -d'\n' useradd -m -g ftpusers -N -p [encryptedPassword]

This runs fine. It does everything it's supposed to, except the home directory is in the standard location of /home/, instead of the location I defined in the /etc/default/useradd file and with useradd -D -b /media/ftpShare. When I run useradd -D I get the setting I added with the previous command.

Why does useradd ignore these purported defaults?


1 Answer 1


Old question, but since I stumbled upon the same problem and solved it, I share: Apparently the defaults are no longer those in /etc/default/useradd but in /etc/adduser.conf. I edited the latter and new users adhere to my defaults. It's in the manpage for adduser ... where I should have looked first.

  • 3
    useradd and adduser are different commands and use different locations for configuration files.
    – mook765
    Mar 18 at 14:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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