Support Questions
Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.

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

Expert Contributor


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


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.


Expert Contributor

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

Expert Contributor

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