I am trying to understand system administration on Ubuntu. So, as an example, I create a dummy user using
sudo useradd -d /home/linda linda
and passwd
to create the password. I check that an entry has been made using cat /etc/passwd
linda:x:1004:1004::/home/linda:/bin/sh
However, when I su - linda
, I get
No directory, logging in with HOME=/
and indeed, no home directory has been created. What am I missing?
Thanks.
adduser
but still the created home directory only contains a fileexamples.desktop
and nothing else. How can I get Ubuntu to create the default folders Desktop, Downloads and so on? (I'm logged in via ssh) – mcExchange Aug 13 '15 at 11:35adduser
will not create the directory either if someone has changed CREATE_HOME in /etc/login.defs to "no". You can override this with the-m
flag. – Noumenon Jun 11 '18 at 22:35shadow-utils
to getadduser
and then you can useadduser
. – Trevor Boyd Smith Jan 01 '21 at 19:57