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

feat: bluefin-cli enable sudo/chown linuxbrew #763

Merged
merged 1 commit into from
Dec 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions toolboxes/Containerfile.bluefin-cli
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ RUN grep -v '^#' /toolbox-packages | xargs apk add

RUN rm /toolbox-packages

# Make Sudo Work (Assumes UID = 1000)
COPY ./toolboxes/files.bluefin-cli/etc/sudoers /etc/sudoers
COPY ./toolboxes/files.bluefin-cli/etc/pam.d /etc/pam.d

# Have Linuxbrew owned by UID = 1000
RUN chown -R 1000 /home/linuxbrew/.linuxbrew /home/linuxbrew/.linuxbrew/bin

# Change root shell to BASH

RUN sed -i -e '/^root/s/\/bin\/ash/\/bin\/bash/' /etc/passwd
7 changes: 7 additions & 0 deletions toolboxes/files.bluefin-cli/etc/pam.d/sudo
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#%PAM-1.0

auth required pam_env.so
auth sufficient pam_unix.so
account required pam_unix.so
session required pam_limits.so
session required pam_unix.so
7 changes: 7 additions & 0 deletions toolboxes/files.bluefin-cli/etc/pam.d/sudo-i
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#%PAM-1.0

auth required pam_env.so
auth sufficient pam_unix.so
account required pam_unix.so
session required pam_limits.so
session required pam_unix.so
3 changes: 3 additions & 0 deletions toolboxes/files.bluefin-cli/etc/sudoers
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
root ALL = (ALL:ALL) NOPASSWD:ALL
# Make UID 1000 able to use sudo without a password
#1000 ALL = (root) NOPASSWD:ALL