blob: d94952e1f7ee70ec6bb5417569f2664d8f2bc804 [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"
21GROUP_SUDO = "sudo"
22
23# Default administrative account (login: admin, password: admin)
24ADMIN_LOGIN = "admin"
25ADMIN_PASSW = "\$1\$Fze0kFe8\$sylEANC01t.osF8OewyB/1"
26USERADD_PACKAGES = "${PN}"
27USERADD_PARAM_${PN} = "--gid ${GROUP_ADMIN} \
28 --groups ${GROUP_ADMIN},${GROUP_OPERATOR},${GROUP_USER},${GROUP_IPMI},${GROUP_SUDO} \
29 --password '${ADMIN_PASSW}' \
30 ${ADMIN_LOGIN}"
31
32# We don't have package body
33ALLOW_EMPTY_${PN} = "1"
34
35# Workaround for meta-phosphor/classes/phosphor-rootfs-postcommands.bbclass.
36# The bb-script cannot add root to non-empty groups (invalid sed command).
37GROUPMEMS_PARAM_${PN} = "-a root -g ${GROUP_ADMIN}; \
38 -a root -g ${GROUP_IPMI}"