Pre-creating Ranger DB Users with the DBA Setup Script
You can set up Ranger users using a Hortonworks custom database script. The purpose of this script is to set up database (DB) users in environments where there is a separate database administrator managing the databases, and you do not want to provide database admininstrator credentials to Ranger for creating the database users.
To pre-create Ranger DB users using the dba_script.py
script:
Download the Ranger rpm using the yum install command.
yum install ranger-admin
You should see one file named
dba_script.py
in the/usr/hdp/current/ranger-admin
directory.Execute the script by running the following command:
python dba_script.py
Pass all values required in the argument. These should include
db flavor
,JDBC jar
,db host
,db name
,db user
, and other parameters.Note If you would prefer not to pass runtime arguments, then simply update the
install.properties
file and then run thepython dba_script.py -q
. If you specify-q
in a given argument, then the script will read all required information from theinstall.properties
file
Note | |
---|---|
If DB users are pre-created using the dba_script.py as described above, you must clear the Setup DB and DB user check box under “Advanced ranger-env” before proceeding with the installation. |