Skip to content

Commit

Permalink
maint: let installer ensure /etc/sudoers.d directory exists
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Jun 8, 2023
1 parent 7974981 commit d4c6da5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions integration-tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ RUN find /etc/systemd/system \
-not -name '*systemd-user-sessions*' \
-exec rm \{} \;

RUN mkdir -p /etc/sudoers.d

RUN systemctl set-default multi-user.target

STOPSIGNAL SIGRTMIN+3
Expand Down
1 change: 1 addition & 0 deletions tljh/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ def ensure_usergroups():
user.ensure_group("jupyterhub-users")

logger.info("Granting passwordless sudo to JupyterHub admins...")
os.makedirs("/etc/sudoers.d/", exist_ok=True)
with open("/etc/sudoers.d/jupyterhub-admins", "w") as f:
# JupyterHub admins should have full passwordless sudo access
f.write("%jupyterhub-admins ALL = (ALL) NOPASSWD: ALL\n")
Expand Down

0 comments on commit d4c6da5

Please sign in to comment.