Support Questions

Find answers, ask questions, and share your expertise

How can I run the shell interpreter in Zeppelin as current user?

avatar
Super Collaborator

Hi,

Docs says:

"Shell interpreter uses Apache Commons Exec to execute external processes. In Zeppelin notebook, you can use %sh in the beginning of a paragraph to invoke system shell and run commands. Note : Currently each command runs as the user Zeppelin server is running as."

Is there any way we can execute the shell interpreter as the current Zeppelin user? Like introducing a special shell for Apache Commons Exec, passing a $USER parameter etc?

/Best regards, Mats

3 REPLIES 3

avatar

This needs 2 steps

  1. In the Zeppelin shell interpreter config, enable impersonation
  2. Ensure end user has an OS account on the node where Zeppelin is running.

Thanks

avatar
Super Collaborator

Hi @vshukla,

How do I enable impersonation for %sh?

I can't find it in the Zeppelin GUI or in the docs?

/Best regards, Mats

avatar
Super Collaborator

It is in the interpreter setting page, make sure you are using zeppelin of HDP, community version of zeppelin doesn't have this feature.