Skip to content
Snippets Groups Projects
Commit f65942ef authored by Jan David Mol's avatar Jan David Mol
Browse files

Task #10983: Propagate /etc/{group,passwd} from the host instead of modifying...

Task #10983: Propagate /etc/{group,passwd} from the host instead of modifying the one in the container, removing a few quirks
parent 9591439e
No related branches found
No related tags found
No related merge requests found
...@@ -14,10 +14,6 @@ if [ -z "${HOME}" ]; then ...@@ -14,10 +14,6 @@ if [ -z "${HOME}" ]; then
mkdir -p $HOME && cd $HOME mkdir -p $HOME && cd $HOME
fi fi
# Add user to system
fgrep -q ":x:${UID}:" /etc/passwd || echo "${USER}:x:${UID}:${UID}::${HOME}:/bin/bash" >> /etc/passwd
fgrep -q ":x:${UID}:" /etc/group || echo "${USER}:x:${UID}:" >> /etc/group
# Set the environment # Set the environment
[ -e /opt/bashrc ] && source /opt/bashrc [ -e /opt/bashrc ] && source /opt/bashrc
......
...@@ -44,8 +44,7 @@ RUN apt-get update && \ ...@@ -44,8 +44,7 @@ RUN apt-get update && \
# open security holes (allow smooth user switching, allow sudo) # open security holes (allow smooth user switching, allow sudo)
# #
RUN echo 'ALL ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \ RUN echo 'ALL ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
sed -i 's/requiretty/!requiretty/g' /etc/sudoers && \ sed -i 's/requiretty/!requiretty/g' /etc/sudoers
chmod a+rw /etc/group /etc/passwd
# #
# setup install dir # setup install dir
......
...@@ -11,10 +11,6 @@ if [ -z "${HOME}" ]; then ...@@ -11,10 +11,6 @@ if [ -z "${HOME}" ]; then
mkdir -p $HOME && cd $HOME mkdir -p $HOME && cd $HOME
fi fi
# Add user to system
fgrep -q ":x:${UID}:" /etc/passwd || echo "${USER}:x:${UID}:${UID}::${HOME}:/bin/bash" >> /etc/passwd
fgrep -q ":x:${UID}:" /etc/group || echo "${USER}:x:${UID}:" >> /etc/group
# Set the environment # Set the environment
[ -e /opt/bashrc ] && source /opt/bashrc [ -e /opt/bashrc ] && source /opt/bashrc
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment