Created 10-13-2015 06:52 PM
Created 10-14-2015 06:38 AM
Created 10-13-2015 06:57 PM
Set the following properties in usersync :
usergroupSync.source.impl.class = org.apache.ranger.unixusersync.process.FileSourceUserGroupBuilder
usergroupSync.filesource.file =C:\\tmp\userSource1.json
usergroupSync.filesource.text.delimiter = , Example file: Multiple Users
{
"user1001": [
"group0",
"group18",
"group6",
"group7",
"group26",
"group24",
"group19",
"group3",
"group5"
],
"user2001": [
"group0",
"group18",
"group6"
]
}
Created 10-13-2015 07:23 PM
Another approach:
Create a text file containing user/group details in the following format:
- one line for each user
- each line consists of multiple fields, separated by a comma
- the first field is the username and every field after that is a group name the user belongs to
- example line: user1,group1, group2,group3
Load the user/group information in the text file, say at /home/user/ranger-users.txt, with the following command line:
java -cp "/usr/hdp/current/ranger-usersync/dist/unixusersync-0.4.0.2.2.0.14-2.jar:/usr/hdp/current/ranger-usersync/lib/*:/etc/ranger/usersync/conf" com.xasecure.unixusersync.process.FileSourceUserGroupBuilder /home/user/ranger-users.txtUpdated for Ranger 0.50
java -Dlogdir=/var/log/ranger/usersync -cp "/usr/hdp/current/ranger-usersync/dist/*:/usr/hdp/current/ranger-usersync/lib/*:/usr/hdp/current/ranger-usersync/conf" org.apache.ranger.unixusersync.process.FileSourceUserGroupBuilder /tmp/UserGroupSyncFile.txt
Created 10-14-2015 06:38 AM
Wiki Documentation on this
https://cwiki.apache.org/confluence/display/RANGER/File+Source+User+Group+Sync+process
Created 12-01-2015 05:30 PM
Thanks for creating the wiki for this