You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by sv...@apache.org on 2017/08/02 16:39:31 UTC

[2/4] incubator-trafodion git commit: [TRAFODION-2697] Make sure trafodion is member of hbase, hive groups

[TRAFODION-2697] Make sure trafodion is member of hbase, hive groups


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/250f60ac
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/250f60ac
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/250f60ac

Branch: refs/heads/master
Commit: 250f60acb9b4a62fbdd581f6b3ab1da0e57806d9
Parents: 872b91c
Author: Steve Varnau <sv...@apache.org>
Authored: Fri Jul 28 20:51:11 2017 +0000
Committer: Steve Varnau <sv...@apache.org>
Committed: Fri Jul 28 20:51:11 2017 +0000

----------------------------------------------------------------------
 install/python-installer/scripts/traf_user.py | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/250f60ac/install/python-installer/scripts/traf_user.py
----------------------------------------------------------------------
diff --git a/install/python-installer/scripts/traf_user.py b/install/python-installer/scripts/traf_user.py
index 60e191c..70f7ca3 100755
--- a/install/python-installer/scripts/traf_user.py
+++ b/install/python-installer/scripts/traf_user.py
@@ -69,6 +69,13 @@ def run():
             run_cmd('groupadd %s > /dev/null 2>&1' % traf_group)
         traf_pwd = dbcfgs['traf_pwd']
         run_cmd('useradd --shell /bin/bash -m %s -g %s --home %s --password "$(openssl passwd %s)"' % (traf_user, traf_group, traf_user_dir, traf_pwd))
+    # hbase group is generally either hbase or hadoop, depending on distro
+    if cmd_output('getent group hbase'):
+        cmd_output('/usr/sbin/usermod -a -G hbase %s' % traf_user)
+    if cmd_output('getent group hadoop'):
+        cmd_output('/usr/sbin/usermod -a -G hadoop %s' % traf_user)
+    if cmd_output('getent group hive'):
+        cmd_output('/usr/sbin/usermod -a -G hive %s' % traf_user)
 
     if not os.path.exists(traf_user_dir):
         run_cmd('mkdir -p %s' % traf_user_dir)