skybird182
New Member
It appears the -M / --no-create-home switch does not prevent the creation of the home directory as can be seen in the command line text below.
The useradd man page clearly states the following:
-M, --no-create-home Do not create the user's home directory, even if the system wide setting from /etc/login.defs (CREATE_HOME) is set to yes.
Is this a bug ? Am I missing something ? I am using xubuntu 20.04 LTS
In the /etc/login.defs I could only fine CREATE_HOME and not DEFAULT_HOME.
[email protected]:~$ sudo useradd -M test_acct
[email protected]:~$ grep test_acct /etc/passwd
test_acct:x:1004:1004::/home/test_acct:/bin/sh
[email protected]:~$
from /etc/logins.def
# Should login be allowed if we can't cd to the home directory?
# Default in no.
#
DEFAULT_HOME yes
The useradd man page clearly states the following:
-M, --no-create-home Do not create the user's home directory, even if the system wide setting from /etc/login.defs (CREATE_HOME) is set to yes.
Is this a bug ? Am I missing something ? I am using xubuntu 20.04 LTS
In the /etc/login.defs I could only fine CREATE_HOME and not DEFAULT_HOME.
[email protected]:~$ sudo useradd -M test_acct
[email protected]:~$ grep test_acct /etc/passwd
test_acct:x:1004:1004::/home/test_acct:/bin/sh
[email protected]:~$
from /etc/logins.def
# Should login be allowed if we can't cd to the home directory?
# Default in no.
#
DEFAULT_HOME yes