blob: dbdabb8c90b6685b1f4e7fd27b1a322bbbbba4fe [file] [log] [blame]
Artem Senichevca64d292020-05-10 10:28:02 +03001SUMMARY = "Default administrative account"
2DESCRIPTION = "Creating default account for system administrator"
3PR = "r1"
4
5inherit useradd
6
7# License info
8LICENSE = "Apache-2.0"
9LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
10
11# Dependencies
12DEPENDS = "sudo \
13 phosphor-ipmi-host \
14 phosphor-user-manager"
15
16# Groups
17GROUP_ADMIN = "priv-admin"
18GROUP_OPERATOR = "priv-operator"
19GROUP_USER = "priv-user"
20GROUP_IPMI = "ipmi"
Artem Senichevca64d292020-05-10 10:28:02 +030021
22# Default administrative account (login: admin, password: admin)
23ADMIN_LOGIN = "admin"
24ADMIN_PASSW = "\$1\$Fze0kFe8\$sylEANC01t.osF8OewyB/1"
25USERADD_PACKAGES = "${PN}"
Andrei Kartashev0f66db42021-08-17 21:47:15 +030026USERADD_PARAM:${PN} = "--groups ${GROUP_ADMIN},${GROUP_IPMI} \
Artem Senichevca64d292020-05-10 10:28:02 +030027 --password '${ADMIN_PASSW}' \
28 ${ADMIN_LOGIN}"
29
30# We don't have package body
Andrei Kartashev0f66db42021-08-17 21:47:15 +030031ALLOW_EMPTY:${PN} = "1"
Artem Senichevca64d292020-05-10 10:28:02 +030032
33# Workaround for meta-phosphor/classes/phosphor-rootfs-postcommands.bbclass.
34# The bb-script cannot add root to non-empty groups (invalid sed command).
Andrei Kartashev0f66db42021-08-17 21:47:15 +030035GROUPMEMS_PARAM:${PN} = "-a root -g ${GROUP_ADMIN}; \
Artem Senichevca64d292020-05-10 10:28:02 +030036 -a root -g ${GROUP_IPMI}"