1

I've created a new user account (with home directory) with the $ useradd -m newuser command. Every time I open a terminal in this new account the follow message appears just immediately before the terminal prompt:

dircolors: no SHELL environment variable, and no shell type option given

This doesn't happen in the (only) other one account. It is an Ubuntu distro and I don't have local config files such as ~/.bash_profile or ~/.bashrc. All variables and configs are sourced from /etc/profile and /etc/bash.bashrc.

0

1 Answer 1

2

On Debian based systems (including Ubuntu), don't use useradd. In fact, that's the first thing its man page mentions:

useradd is a low level utility for adding users. On Debian, administrators should usually use adduser(8) instead.

So, just use adduser newuser and everything will work as expected. To do the same thing with useradd, you would need:

useradd -d /home/newuser -m -s /bin/bash newuser

But you'd also need to create the user's group and add them to it and just forget it. Use adduser.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .