Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 2/9] user.eclass: Prevent automated home creation in useradd
Date: Thu, 30 May 2019 12:51:36
Message-Id: 20190530125039.15591-3-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 0/9] User/group package draft implementation by "Michał Górny"
1 Pass '-M' to prevent useradd from automatically creating the home
2 directory (depending on system configuration). We create the home
3 directory ourselves anyway, and we have better control over how it's
4 created this way.
5
6 Signed-off-by: Michał Górny <mgorny@g.o>
7 ---
8 eclass/user.eclass | 2 +-
9 1 file changed, 1 insertion(+), 1 deletion(-)
10
11 diff --git a/eclass/user.eclass b/eclass/user.eclass
12 index a6c6ad82b7a0..6be76666d9f3 100644
13 --- a/eclass/user.eclass
14 +++ b/eclass/user.eclass
15 @@ -246,7 +246,7 @@ enewuser() {
16 ;;
17
18 *)
19 - useradd -N -r "${opts[@]}" "${euser}" || die
20 + useradd -M -N -r "${opts[@]}" "${euser}" || die
21 ;;
22 esac
23
24 --
25 2.22.0.rc1