From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users@googlegroups.com
Subject: [PATCH v4 11/13] kas: Add options to activate predefined users
Date: Fri, 22 Sep 2023 11:10:01 +0200 [thread overview]
Message-ID: <20230922091003.20763-12-ubely@ilbers.de> (raw)
In-Reply-To: <20230922091003.20763-1-ubely@ilbers.de>
This allows to enable 'root' and 'isar' users and set their passwords.
Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
kas/opt/Kconfig | 40 ++++++++++++++++++++++++++++++++++++++++
kas/opt/user-isar.yaml | 19 +++++++++++++++++++
kas/opt/user-root.yaml | 11 +++++++++++
3 files changed, 70 insertions(+)
create mode 100644 kas/opt/user-isar.yaml
create mode 100644 kas/opt/user-root.yaml
diff --git a/kas/opt/Kconfig b/kas/opt/Kconfig
index 328ac5e6..87fef870 100644
--- a/kas/opt/Kconfig
+++ b/kas/opt/Kconfig
@@ -42,6 +42,46 @@ config KAS_INCLUDE_MIRROR_UBUNTU
endmenu
+menu "User management"
+
+config USER_ROOT
+ bool "Activate 'root' user"
+ help
+ Enables root user.
+
+config KAS_USER_ROOT_PASSWORD
+ string "Password for 'root' user"
+ default "root"
+ depends on USER_ROOT
+ help
+ Set password for 'root' user.
+
+config KAS_INCLUDE_USER_ROOT
+ string
+ default "kas/opt/user-root.yaml"
+ depends on USER_ROOT
+
+
+config USER_ISAR
+ bool "Activate 'isar' user"
+ default y
+ help
+ Enables `isar` user.
+
+config KAS_USER_ISAR_PASSWORD
+ string "Password for 'isar' user"
+ default "isar"
+ depends on USER_ISAR
+ help
+ Set password for 'isar' user.
+
+config KAS_INCLUDE_USER_ISAR
+ string
+ default "kas/opt/user-isar.yaml"
+ depends on USER_ISAR
+
+endmenu
+
config KAS_IMAGE_FSTYPES
string "Additional image fstypes"
default ""
diff --git a/kas/opt/user-isar.yaml b/kas/opt/user-isar.yaml
new file mode 100644
index 00000000..67611a40
--- /dev/null
+++ b/kas/opt/user-isar.yaml
@@ -0,0 +1,19 @@
+# This software is a part of ISAR.
+# Copyright (C) 2023 ilbers GmbH
+
+header:
+ version: 14
+
+local_conf_header:
+ user-isar: |
+ GROUPS += "isar"
+ GROUP_isar[flags] = "system"
+
+ USERS += "isar"
+ USER_isar[gid] = "isar"
+ USER_isar[home] = "/var/lib/isar"
+ USER_isar[comment] = "My isar user"
+ USER_isar[flags] = "system create-home"
+
+ USER_isar[password] = "${KAS_USER_ISAR_PASSWORD}"
+ USER_isar[flags] += "clear-text-password"
diff --git a/kas/opt/user-root.yaml b/kas/opt/user-root.yaml
new file mode 100644
index 00000000..65428e24
--- /dev/null
+++ b/kas/opt/user-root.yaml
@@ -0,0 +1,11 @@
+# This software is a part of ISAR.
+# Copyright (C) 2023 ilbers GmbH
+
+header:
+ version: 14
+
+local_conf_header:
+ user-root: |
+ USERS += "root"
+ USER_root[password] ??= "${KAS_USER_ROOT_PASSWORD}"
+ USER_root[flags] += "clear-text-password"
--
2.20.1
next prev parent reply other threads:[~2023-09-22 9:10 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-22 9:09 [PATCH v4 00/13] Support building Isar using kas Uladzimir Bely
2023-09-22 9:09 ` [PATCH v4 01/13] kas: Add initial Kconfig support Uladzimir Bely
2023-09-22 9:09 ` [PATCH v4 02/13] kas: Add a local copy of kas-container script Uladzimir Bely
2023-09-22 9:09 ` [PATCH v4 03/13] kas: Add mirror selection Uladzimir Bely
2023-09-25 11:34 ` Jan Kiszka
2023-09-25 14:38 ` Uladzimir Bely
2023-09-25 14:49 ` Jan Kiszka
2023-09-26 7:59 ` Uladzimir Bely
2023-09-22 9:09 ` [PATCH v4 04/13] kas: Add packages selection Uladzimir Bely
2023-09-22 9:09 ` [PATCH v4 05/13] kas: Add COMPAT_ARCH support Uladzimir Bely
2023-09-22 9:09 ` [PATCH v4 06/13] kas: Add cross compilation mode selection support Uladzimir Bely
2023-09-22 9:09 ` [PATCH v4 07/13] kas: Add ccache option Uladzimir Bely
2023-09-22 9:09 ` [PATCH v4 08/13] kas: Add image type selection Uladzimir Bely
2023-09-22 9:09 ` [PATCH v4 09/13] kas: Add IMAGE_FSTYPES selection Uladzimir Bely
2023-09-22 9:10 ` [PATCH v4 10/13] kas: Support CACHE_DEB_SRC option in menu Uladzimir Bely
2023-09-22 9:10 ` Uladzimir Bely [this message]
2023-09-22 9:10 ` [PATCH v4 12/13] kas: Add kas/README.md Uladzimir Bely
2023-09-22 9:10 ` [PATCH v4 13/13] scripts: Add a script to generate kas yaml configs Uladzimir Bely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230922091003.20763-12-ubely@ilbers.de \
--to=ubely@ilbers.de \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox