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" |
| 21 | GROUP_SUDO = "sudo" |
| 22 | |
| 23 | # Default administrative account (login: admin, password: admin) |
| 24 | ADMIN_LOGIN = "admin" |
| 25 | ADMIN_PASSW = "\$1\$Fze0kFe8\$sylEANC01t.osF8OewyB/1" |
| 26 | USERADD_PACKAGES = "${PN}" |
| 27 | USERADD_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 |
| 33 | ALLOW_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). |
| 37 | GROUPMEMS_PARAM_${PN} = "-a root -g ${GROUP_ADMIN}; \ |
| 38 | -a root -g ${GROUP_IPMI}" |