Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure mamba works with sudo #40

Open
dhirschfeld opened this issue Jun 30, 2022 · 1 comment
Open

Ensure mamba works with sudo #40

dhirschfeld opened this issue Jun 30, 2022 · 1 comment

Comments

@dhirschfeld
Copy link
Member

Need to add:

echo 'source /etc/profile.d/conda.sh' >> /root/.bashrc
@dhirschfeld
Copy link
Member Author

Doesn't seem .bashrc is sourced 🤔

We can instead add the condabin dir to the secure path:

secure_path=$(sudo sed -nr 's|^(Defaults\s+secure_path=".*):?"\s*$|\1:/opt/mambaforge/envs/base/condabin"|p' /etc/sudoers)
echo $secure_path >> /etc/sudoers.d/secure_path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant