From ba302c548aaa7aadc38db2804ce33da4b6f9b826 Mon Sep 17 00:00:00 2001 From: Karol Lewandowski Date: Fri, 14 Sep 2018 10:51:24 +0200 Subject: [PATCH] Add generic-users.post(script) This script will create standard 'owner' user. It's supposed to be used by all profile wanting standard Tizen user(s). Change-Id: I3db0ea3a9bc2366a8ad9d3dd26d64fe48f3d9579 --- scripts/generic-users.post | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 scripts/generic-users.post diff --git a/scripts/generic-users.post b/scripts/generic-users.post new file mode 100644 index 0000000..cb2a242 --- /dev/null +++ b/scripts/generic-users.post @@ -0,0 +1,18 @@ +#!/bin/sh +echo "#################### generic-users.post ####################" + +if ! generic_base_user_exists owner; then + # By default GUM will create users in /opt/etc/passwd, which is + # additional users database suitable for end-user created accounts. + # However, the 'owner' user is shipped by Tizen system itself and + # it's its default user. Consequently, it should always be available + # and thus, it should be added to /etc/passwd. + conf=/etc/gumd/gumd.conf + origf=${conf}.orig + mv -v $conf $origf + sed -e 's,^\(PASSWD_FILE\).*,\1=/etc/passwd,' -e 's,^\(SHADOW_FILE\).*,\1=/etc/shadow,' <$origf >$conf + gum-utils --offline --add-user --username=owner --usertype=admin --usecret=tizen + mv -v $origf $conf +fi + + -- 2.7.4