From 685707ac395459bc6504000bd6eb5c8f49efb83f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Bollo?= Date: Thu, 5 Feb 2015 17:53:01 +0100 Subject: [PATCH] Use of gumd instead of legacy pwdutils MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The commands useradd/userdel/groupadd/groupmod are now handled by gumd equvalent calls to gum-utils. This patch removes the use of generic_base_fix_user_homedir that is implemented in tizen-platform-config. Change-Id: I75aa11d08960f1a14899f23f911a6189e879cee1 Signed-off-by: José Bollo --- scripts/common-base.post | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/scripts/common-base.post b/scripts/common-base.post index 939706b..d3f7ab7 100644 --- a/scripts/common-base.post +++ b/scripts/common-base.post @@ -2,18 +2,16 @@ echo "############### common-base.post ################" ######### multiuser mode: create additional users and fix their homedirs -tizen_crypted_pass=$(perl -e 'print crypt("tizen", "aa")') -uid=5001 - for user in alice bob carol guest; do if ! generic_base_user_exists $user; then - useradd -u $uid -d /home/$user -g users -G audio,video,users,display -m --password "$tizen_crypted_pass" $user - uid=$(( $uid + 1 )) + gum-utils --offline --add-user --username="$user" --usertype=normal --usecret=tizen fi - - generic_base_fix_user_homedir $user done ######### add 'guest' user that runs bt-service daemon to vconf_bt group -/usr/sbin/groupmod -A guest vconf_bt +function mygetid() { sed '/^'"$1"':/!d;s/^\([^:]*:\)\{2\}\([^:]*\):.*$/\2/' "$2"; } +function mygetuid() { mygetid "$1" /etc/passwd; } +function mygetgid() { mygetid "$1" /etc/group; } + +gum-utils --offline --add-member --gid=$(mygetgid vconf_bt) --mem_uid=$(mygetuid guest) -- 2.7.4