commit:     b2cf1be41cea95c121c3b86fb43e8939d2bcb4c8
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed May 29 17:45:01 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jun 20 08:16:38 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2cf1be4

user.eclass: Prevent automated home creation in useradd

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 <AT> gentoo.org>

 eclass/user.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/user.eclass b/eclass/user.eclass
index 8935c338e1b..a24920af13f 100644
--- a/eclass/user.eclass
+++ b/eclass/user.eclass
@@ -209,7 +209,7 @@ enewuser() {
                ;;
 
        *)
-               useradd -N -r "${opts[@]}" "${euser}" || die
+               useradd -M -N -r "${opts[@]}" "${euser}" || die
                ;;
        esac
 

Reply via email to