On a server, I have mounted a big drive on /home2 in order to store all the user accounts.
Supposedly in order to set the default directory to /home2, we are supposed to edit /etc/default/useradd
Inside is a line (commented out)
#HOME=/home
which I change to:
HOME=/home2
Yet subsequently, useradd -m continues to create users home directories in /home. For the moment, I just mounted the new drive as /home, and that did work obviously.
Can anyone tell me what I am doing wrong?
/etc/default/useraddwhen you made the change to it? – Terrance Aug 04 '17 at 17:55diff /etc/default/useradd useradd.backup. You did keep a backup of the only working copy you know of, right? – waltinator Aug 04 '17 at 19:48adduserseems to ignore theuseraddsetting.useradduses the location specified in the configuration file butaddusersimply ignores it – Felix B. Mar 11 '21 at 17:22