From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7329832894717755392 X-Received: by 2002:a05:6512:1ce:b0:511:8a8:2bad with SMTP id f14-20020a05651201ce00b0051108a82badmr4527675lfp.65.1706609711462; Tue, 30 Jan 2024 02:15:11 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6512:2311:b0:511:1738:dcf6 with SMTP id o17-20020a056512231100b005111738dcf6ls609826lfu.1.-pod-prod-07-eu; Tue, 30 Jan 2024 02:15:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IEF3W/i1voorXnYwTB8XwdnokscuQwCrzHi3I/6h/v/V/rAnYHEmKhd9t3EmsA83QV3C9rD X-Received: by 2002:a2e:80d7:0:b0:2d0:54ef:1dc6 with SMTP id r23-20020a2e80d7000000b002d054ef1dc6mr1537762ljg.33.1706609708966; Tue, 30 Jan 2024 02:15:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706609708; cv=none; d=google.com; s=arc-20160816; b=LLAy5u+JA2dOtHSs9d719AhPQlJD/tV1Rh+/ALTryGqvBErGBK2cub3/iBnc76tGEv vpzzNKtL+Ym1dFJYmXnee59iL0pnz6aualUpcqoDGgdGjJJ2EnNVTz1IUsUOxkClPYG9 f02tcULJ605sx4TbV473He3hfq2K4ad0Evd/LoKoxHJ3CXW8AmvIr+KRK7gDGy4L7Hx/ XvLcXq3XdImYZ3OTVt2r6DiWA/wFGJoPimFDrOMx+Za/A23ZJlNlXCAbu/Fp80D6alJ+ U8lySoWNMoEEpjrrTIXXUpSCzud05eo9yj3LZgj7ll6TZ5AoEdBu+r+3fFLNGOd3Ylz9 57mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from; bh=HXakBnK4k6uECbv06kbLsj/m3F9AFnkbO/jc5iqKtLs=; fh=7tclEdh7YbwSQowgJ6LNq720O7H5HTEaqj22NJWRE2E=; b=vEOuWb90NbStsvZ7z+r5i50jKJeaq5xZRQU3trh3qN/62nqwsBmzYqQSv/9jaFUgCr ewGer2/hS5O3luG48Sx5kBt0Hkblssiw/CR+mNlkSs+p/nouwTGhFQGRs8khmDKRLNy7 5JWrFbNj5k5Y1MgGhi+e/BCmAm0cnrZ+xs/pczRftjoRBnq9LJTKz1nR/Y7MQGrjm77w U21OKgeReiClIZBlwvkf0cddrwcQ24yFjDnUL5O4sF0OzQ249nbKRcc5zNifeTL8Hrk0 iLXCS0nZeDWBUCNWCFDH/yigkn704o1hrHiBrbSDA+VNvkO+6aCWK+YlHHc9foAtAkFQ r39A== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id a25-20020a2e8619000000b002cf1dbde597si402499lji.2.2024.01.30.02.15.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Jan 2024 02:15:08 -0800 (PST) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from baighyz.m.ilbers.de (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 40UAF62p006374 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 30 Jan 2024 11:15:07 +0100 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: [PATCH 2/2] image-account-extension: Move examples to user manual Date: Tue, 30 Jan 2024 11:15:06 +0100 Message-Id: <20240130101506.27451-3-ubely@ilbers.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20240130101506.27451-1-ubely@ilbers.de> References: <20240130101506.27451-1-ubely@ilbers.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: /dqOCtz2uCs4 Based on discussion in https://github.com/ilbers/isar/issues/103 Signed-off-by: Uladzimir Bely --- doc/user_manual.md | 22 ++++++++++++++++++++ meta/classes/image-account-extension.bbclass | 18 ---------------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/doc/user_manual.md b/doc/user_manual.md index 27b86869..747b5ffe 100644 --- a/doc/user_manual.md +++ b/doc/user_manual.md @@ -700,6 +700,28 @@ The `USERS` and `USER:` variable works similar to the `GROUPS` and `GR - `clear-text-password` - The `password` flag of the given user contains a clear-text password and not an encrypted version of it. - `force-passwd-change` - Force the user to change to password on first login. +#### Example + +``` +GROUPS += "root" +GROUP_root[gid] = "0" +GROUP_root[flags] = "system" + +USERS += "root" +USER_root[password] = "$6$rounds=10000$RXeWrnFmkY$DtuS/OmsAS2cCEDo0BF5qQsizIrq6jPgXnwv3PHqREJeKd1sXdHX/ayQtuQWVDHe0KIO0/sVH8dvQm1KthF0d/" +USER_root[expire] = "180" +USER_root[inactive] = "30" +USER_root[uid] = "0" +USER_root[gid] = "0" +USER_root[comment] = "The ultimate root user" +USER_root[home] = "/home/root" +USER_root[shell] = "/bin/sh" +USER_root[groups] = "audio video" +USER_root[flags] = "create-home system force-passwd-change" +``` + +Some examples can be also found in `meta-isar/conf/local.conf.sample`. + #### Home directory contents prefilling To cover all users simply use `/etc/skel`. Files in there will be available in every home directory under correct permissions. diff --git a/meta/classes/image-account-extension.bbclass b/meta/classes/image-account-extension.bbclass index 412aa06d..9e67cb91 100644 --- a/meta/classes/image-account-extension.bbclass +++ b/meta/classes/image-account-extension.bbclass @@ -6,26 +6,8 @@ # This class extends the image.bbclass for creating user accounts and groups. USERS ??= "" - -#USERS += "root" -#USER_root[password] = "" # Encrypted password, or clear-text when [flags] = "clear-text-password" -#USER_root[expire] = "" -#USER_root[inactive] = "" -#USER_root[uid] = "" -#USER_root[gid] = "" # If first character is a number: gid, otherwise groupname -#USER_root[comment] = "The ultimate root user" -#USER_root[home] = "/home/root" -#USER_root[shell] = "/bin/sh" -#USER_root[groups] = "audio video" -#USER_root[flags] = "no-create-home create-home system allow-empty-password clear-text-password force-passwd-change" - GROUPS ??= "" -#GROUPS += "root" -#GROUP_root[gid] = "" -#GROUP_root[flags] = "system" - - def image_create_groups(d: "DataSmart") -> None: """Creates the groups defined in the ``GROUPS`` bitbake variable. -- 2.20.1