cancel
Showing results for 
Search instead for 
Did you mean: 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results for 
Search instead for 
Did you mean: 

Prevent users from running shell commands

bvraravind
New Contributor II

Hi, is there any way to prevent users from running shell commands in Databricks notebooks? for example, "%%bash" 

I read that REVOKE EXECUTE ON SHELL command can be used. but i am unable to make it to work. Thanks in advance for any help.

1 REPLY 1

Alberto_Umana
Databricks Employee
Databricks Employee

Hi @bvraravind,

You can use this spark setting 

"spark_conf.spark.databricks.repl.allowedLanguages": { "type": "fixed", "value": "python,sql"

Over a cluster policy to prevent access to shell commands.

https://docs.databricks.com/en/archive/compute/cluster-ui-preview.html

 

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now