Granting users admin permissions on their container
See original GitHub issueHow do you give users permission to install packages on their server?
Specifically I am trying to connect to mssql, as part of this I need to install freetds
Here are the two paths I go down:
$ apt-get install freetds
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
So I try it with sudo
$ sudo apt-get install freetds
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
[sudo] password for jovyan:
and I don’t know the password for jovyan.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:11 (4 by maintainers)
Top Results From Across the Web
How to give a domain user admin permissions to their laptop
In the right pane, double click Administrators. In the Select Users dialog, click Advanced. Click Find Now.
Read more >Grant Container-Group Administrator Privileges to a User
Container-group administrator privileges can be granted to another user at any time. Context. Each container group can have its own set of administrators....
Read more >How to Grant User Access to Google Tag Manager
To grant access to your Google Tag Manager container, select User Management under the container admin options. Click the blue + button in...
Read more >Granting And Modifying Co-Admin Permissions - Box Support
To grant a user co-admin permissions: · Log in to your account and navigate to the Admin Console. · In the lefthand navigation,...
Read more >Access control with IAM | Container Registry documentation
Verify that you have permissions to manage users. You must have permissions in one of the following roles: Project IAM Admin (roles/resourcemanager.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
At the CLI, you need to add
--user root
. For example, @nazeels command would become:For example, @nazeels
docker run -ti --rm --user root -p 8888:8888 -e GRANT_SUDO=yes jupyter/datascience-notebook:2c80cf3537ca start-notebook.sh
The container needs to start as
root
in order to add the otherwise unprivilegedjovyan
user the sudoers file. Once it does that, it the startup script becomes thejovyan
user before launching the notebook server. (https://github.com/jupyter/docker-stacks/tree/master/datascience-notebook#docker-options in the-e GRANT_SUDO=yes
bullet)@minrk I’m not sure how to tell JupyterHub to launch the image as the
root
user to start (or if that’s even possible via config) other than to do what @kjschiroo suggested and build a custom image that always defaults to running asroot
.The way that I got around this was creating a new container image with a docker file like this:
Then I would set
c.DockerSpawner.container_image
to the name of the new container.I think this introduces security concerns in some situations. In my case I was using it with only trusted users and within a private networks so the risks were acceptable.