diff --git a/toolboxes/Containerfile.bluefin-cli b/toolboxes/Containerfile.bluefin-cli index e3bd4df2c55..3b517991abd 100644 --- a/toolboxes/Containerfile.bluefin-cli +++ b/toolboxes/Containerfile.bluefin-cli @@ -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 diff --git a/toolboxes/files.bluefin-cli/etc/pam.d/sudo b/toolboxes/files.bluefin-cli/etc/pam.d/sudo new file mode 100644 index 00000000000..7af73990b51 --- /dev/null +++ b/toolboxes/files.bluefin-cli/etc/pam.d/sudo @@ -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 \ No newline at end of file diff --git a/toolboxes/files.bluefin-cli/etc/pam.d/sudo-i b/toolboxes/files.bluefin-cli/etc/pam.d/sudo-i new file mode 100644 index 00000000000..7af73990b51 --- /dev/null +++ b/toolboxes/files.bluefin-cli/etc/pam.d/sudo-i @@ -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 \ No newline at end of file diff --git a/toolboxes/files.bluefin-cli/etc/sudoers b/toolboxes/files.bluefin-cli/etc/sudoers new file mode 100644 index 00000000000..f144fac70b6 --- /dev/null +++ b/toolboxes/files.bluefin-cli/etc/sudoers @@ -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