user.eclass: Prevent automated home creation in useradd
authorMichał Górny <mgorny@gentoo.org>
Wed, 29 May 2019 17:45:01 +0000 (19:45 +0200)
committerMichał Górny <mgorny@gentoo.org>
Thu, 20 Jun 2019 08:16:38 +0000 (10:16 +0200)
Pass '-M' to prevent useradd from automatically creating the home
directory (depending on system configuration).  We create the home
directory ourselves anyway, and we have better control over how it's
created this way.

Signed-off-by: Michał Górny <mgorny@gentoo.org>
eclass/user.eclass

index 8935c338e1bb1c0d6883bb389cf7d1b617ec1faa..a24920af13f1aa31bc4331e35884dee798e8621a 100644 (file)
@@ -209,7 +209,7 @@ enewuser() {
                ;;
 
        *)
-               useradd -N -r "${opts[@]}" "${euser}" || die
+               useradd -M -N -r "${opts[@]}" "${euser}" || die
                ;;
        esac