Created 07-31-2018 09:40 AM
Hello All,
We have synced AD users in Zeppelin using shiro.ini file. User is able to login using entire domain name eg: 'bhushan-kandalkar@test.com'
All notebook have owners set to 'bhushan-kandalkar@test.com'
Now, we have synced AD users in Zeppelin using SaMAcoountName. Hence User is able to login using SaMAcoountName only eg: 'bhushan-kandalkar'
But problem is user 'bhushan-kandalkar' is not able to view notebooks created by 'bhushan-kandalkar@test.com' though its an same user.
How should I change owners of all notebooks from 'bhushan-kandalkar@test.com' to 'bhushan-kandalkar'?
Please suggest.
Thanks,
Bhushan
Created 07-31-2018 03:04 PM
To recover and and change notebook permissions manually you should do the following:
1. Login to zeppelin server host and switch to zeppelin user. If kerberized, kinit as zeppelin principal using zeppelin keytab
2. Make a backup of the following hdfs file
hdfs dfs -cp /user/zeppelin/conf/notebook-authorization.json /user/zeppelin/conf/notebook-authorization.json.orig
3. Get the file from hdfs to local file system
hdfs dfs -get /user/zeppelin/conf/notebook-authorization.json /tmp/notebook-authorization.json
4. Edit the file and replate all occurences of the username
sed -i -e 's/bhushan-kandalkar@test.com/bhushan-kandalkar/g' /tmp/notebook-authorization.json
5. Upload the file to hdfs
hdfs dfs -put -f /tmp/notebook-authorization.json /user/zeppelin/conf/
6. Restart zeppelin server using ambari
Let me know if that works for you.
HTH
*** If you found this answer addressed your question, please take a moment to login and click the "accept" link on the answer.
Created 07-31-2018 03:04 PM
To recover and and change notebook permissions manually you should do the following:
1. Login to zeppelin server host and switch to zeppelin user. If kerberized, kinit as zeppelin principal using zeppelin keytab
2. Make a backup of the following hdfs file
hdfs dfs -cp /user/zeppelin/conf/notebook-authorization.json /user/zeppelin/conf/notebook-authorization.json.orig
3. Get the file from hdfs to local file system
hdfs dfs -get /user/zeppelin/conf/notebook-authorization.json /tmp/notebook-authorization.json
4. Edit the file and replate all occurences of the username
sed -i -e 's/bhushan-kandalkar@test.com/bhushan-kandalkar/g' /tmp/notebook-authorization.json
5. Upload the file to hdfs
hdfs dfs -put -f /tmp/notebook-authorization.json /user/zeppelin/conf/
6. Restart zeppelin server using ambari
Let me know if that works for you.
HTH
*** If you found this answer addressed your question, please take a moment to login and click the "accept" link on the answer.
Created 07-31-2018 05:15 PM
Thanks @Felix Albani
I already did that. But note permission for every notebook is still showing 'bhushan-kandalkar@test.com' as owner, reader and writer.
Also, when I tried to change owner name to 'bhushan-kandalkar' its giving permission denied error.
Please suggest.
Created 07-31-2018 07:00 PM
Could you be more precise as to what step of the ones I provided above is giving you the permission denied error?
Thanks!
Created 08-01-2018 12:49 PM
I performed all these steps. I can see that user 'bhushan-kandalkar' is able to view notebooks created by 'bhushan-kandalkar@test.com' user. That's good news.
But in Zeppelin Notebook UI, I am still getting 'bhushan-kandalkar@test.com' user. Attached screenshot notebook-permission.png. I am not getting ''bhushan-kandalkar' user.
Also, when I share notebook to other user, that notebook is removed from the user who has shared that notebook. That should not happen.
Please suggest.
Created 08-01-2018 08:41 PM
Can you login to Zeppelin as 'bhushan-kandalkar' instead of 'bhushan-kandalkar@test.com'? You may need to set "activeDirectoryRealm.principalSuffix = @test.com" if you are using "org.apache.zeppelin.realm.ActiveDirectoryGroupRealm".
With this set, you should be able to login as 'bhushan-kandalkar' and same would appear in notebook permission.
Hope this helps.
Created 07-31-2018 08:25 PM
Please let us know the value of "zeppelin.notebook.storage" property in Zeppelin. If you can attach your zeppelin-site.xml from Zeppelin node ("after scrubbing your env. specific details"), that will be even better.
What Felix is suggesting here, may actually work if done correctly.
Created 08-02-2018 07:09 AM
I am logging in using bhushan-kandalkar user but in Zeppelin Notebook UI, I am still getting 'bhushan-kandalkar@test.com' user for every notebook permission.