How to make Ubuntu useradd behave like Centos useradd?
- by Buttle Butkus
I don't remember modifying CentOS useradd to get this behavior.
useradd in CentOS creates the user's home directory with all the normal files (like .bashrc).
I modified /etc/default/useradd to make it looks like CentOS (just required some uncommenting) except for Ubuntu having SHELL=/bin/sh instead of SHELL=/bin/bash
How do I make useradd act like it does in CentOS? Is there some existing option to change? Or should I just add an alias to /etc/bash.bashrc?
The difference:
On Ubuntu, useradd is not creating the home directory.
as root:
$ useradd test
$ cd ~test
-su: cd: /home/test: No such file or directory