It depends on the rest of your configuration, and also how your Kubernetes cluster is configured. For example, if you’ve built your own Docker image you may not have the scripts from
In addition your cluster may block containers from running as root.
Can you:
Show us your full config with secrets redacted
Turn on debug logging and show us the singleuser server logs
Note you shouldn’t need --allow-root since you’re not running the notebook as root, only the container which should drop to the unprivileged user after enabling sudo.
I just ran into a similar issue, except I am using a custom notebook image. In the Jupyter docker-stacks Dockerfiles, they seem to deny access to the the root user via this command.
We created a new image on top of it and removed this from the /etc/pam.d/su file by adding:
RUN sed -i "s/auth requisite pam_deny.so//g" /etc/pam.d/su
to the end of our Dockerfile and then creating the new image. Now we can login as root. I am not sure if this is necessary or if there are other ways to enable root access.
Hello,
If you are seeing this on the future note that for some configurations jupyter hub uses allowPrivilegeEscalation to block on Kubernetes escalating users as sudo. It worked to me when I set allowPrivilegeEscalation: true. Right now I’m facing the problem with jovyan password. If any news I will be back!