Artem Senichev | ca64d29 | 2020-05-10 10:28:02 +0300 | [diff] [blame] | 1 | SUMMARY = "Default administrative account" |
| 2 | DESCRIPTION = "Creating default account for system administrator" |
| 3 | PR = "r1" |
| 4 | |
| 5 | inherit useradd |
| 6 | |
| 7 | # License info |
| 8 | LICENSE = "Apache-2.0" |
| 9 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" |
| 10 | |
| 11 | # Dependencies |
| 12 | DEPENDS = "sudo \ |
| 13 | phosphor-ipmi-host \ |
| 14 | phosphor-user-manager" |
| 15 | |
| 16 | # Groups |
| 17 | GROUP_ADMIN = "priv-admin" |
| 18 | GROUP_OPERATOR = "priv-operator" |
| 19 | GROUP_USER = "priv-user" |
| 20 | GROUP_IPMI = "ipmi" |
Artem Senichev | ca64d29 | 2020-05-10 10:28:02 +0300 | [diff] [blame] | 21 | |
| 22 | # Default administrative account (login: admin, password: admin) |
| 23 | ADMIN_LOGIN = "admin" |
| 24 | ADMIN_PASSW = "\$1\$Fze0kFe8\$sylEANC01t.osF8OewyB/1" |
| 25 | USERADD_PACKAGES = "${PN}" |
Andrei Kartashev | 0f66db4 | 2021-08-17 21:47:15 +0300 | [diff] [blame] | 26 | USERADD_PARAM:${PN} = "--groups ${GROUP_ADMIN},${GROUP_IPMI} \ |
Artem Senichev | ca64d29 | 2020-05-10 10:28:02 +0300 | [diff] [blame] | 27 | --password '${ADMIN_PASSW}' \ |
| 28 | ${ADMIN_LOGIN}" |
| 29 | |
| 30 | # We don't have package body |
Andrei Kartashev | 0f66db4 | 2021-08-17 21:47:15 +0300 | [diff] [blame] | 31 | ALLOW_EMPTY:${PN} = "1" |
Artem Senichev | ca64d29 | 2020-05-10 10:28:02 +0300 | [diff] [blame] | 32 | |
| 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 Kartashev | 0f66db4 | 2021-08-17 21:47:15 +0300 | [diff] [blame] | 35 | GROUPMEMS_PARAM:${PN} = "-a root -g ${GROUP_ADMIN}; \ |
Artem Senichev | ca64d29 | 2020-05-10 10:28:02 +0300 | [diff] [blame] | 36 | -a root -g ${GROUP_IPMI}" |