How to make Ubuntu useradd behave like Centos useradd?

Posted by Buttle Butkus on Server Fault See other posts from Server Fault or by Buttle Butkus
Published on 2012-11-29T09:53:14Z Indexed on 2012/11/29 11:09 UTC
Read the original article Hit count: 275

Filed under:
|
|

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

© Server Fault or respective owner

Related posts about ubuntu

Related posts about centos