meta-google: recipes-google: Add static dev CA and specific user
Add Feature:
1. default-users: Add static User "Megapede" without password
2. default-ca-dev: Add static dev CA
Note:
1. CA PATH:
meta-google\recipes-google\default-ca-dev\default-ca-dev\certs\authority
All CAs under the folder will be encapsulated into the firmware image
Signed-off-by: Alan Kuo <Alan_Kuo@quantatw.com>
Change-Id: I8de613ef31f7e2eab27f142bb3c0ea939693d6eb
diff --git a/recipes-google/default-users/default-users.bb b/recipes-google/default-users/default-users.bb
new file mode 100644
index 0000000..76485cc
--- /dev/null
+++ b/recipes-google/default-users/default-users.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Add default Users"
+DESCRIPTION = "Add Users"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+EXCLUDE_FROM_WORLD = "1"
+
+DEPENDS = "bmcweb"
+DEPENDS += "phosphor-ipmi-host"
+DEPENDS += "phosphor-user-manager"
+RDEPENDS_${PN} = "bmcweb"
+RDEPENDS_${PN} += "phosphor-ipmi-host"
+RDEPENDS_${PN} += "phosphor-user-manager"
+
+inherit useradd
+USERADD_PACKAGES = "${PN}"
+
+USERADD_PARAM_${PN} = "-m -N -u 1000 -g 100 -s /bin/nologin \
+ -G 'web,redfish,priv-admin' Megapede; "
+GROUPMEMS_PARAM_${PN} = "-g priv-admin -a root; "
+GROUPMEMS_PARAM_${PN} += "-g ipmi -a root; "
+
+ALLOW_EMPTY_${PN} = "1"