diff options
author | Areli, Fuss (af732p) <af732p@att.com> | 2018-03-25 14:22:44 +0300 |
---|---|---|
committer | Areli, Fuss (af732p) <af732p@att.com> | 2018-03-25 14:22:44 +0300 |
commit | 87faf9c68d39064da64f026ac864fd4fb01b812b (patch) | |
tree | 7bd570e6d8e176a27ff4ab3739a3566b5d90dd0b | |
parent | 40b078662abcaa87909487847d116cc7bb21b481 (diff) |
Replace Jetty user id
Replace Jetty user id to enable using it
in multiple projects
Change-Id: Id4c97cfb3e669cb8c2df5428b67a8294ec329583
Issue-ID: SDC-1162
Signed-off-by: Areli, Fuss (af732p) <af732p@att.com>
-rw-r--r-- | base_sdc-jetty/Dockerfile | 4 | ||||
-rwxr-xr-x | base_sdc-jetty/set_jetty_user.sh | 20 |
2 files changed, 24 insertions, 0 deletions
diff --git a/base_sdc-jetty/Dockerfile b/base_sdc-jetty/Dockerfile index d4283be..a907169 100644 --- a/base_sdc-jetty/Dockerfile +++ b/base_sdc-jetty/Dockerfile @@ -30,5 +30,9 @@ RUN set -ex && \ RUN pip install pycurl +COPY set_user.sh /tmp/set_user.sh + +RUN sh -x /tmp/set_user.sh && rm -f /tmp/set_user.sh + USER jetty diff --git a/base_sdc-jetty/set_jetty_user.sh b/base_sdc-jetty/set_jetty_user.sh new file mode 100755 index 0000000..6233c07 --- /dev/null +++ b/base_sdc-jetty/set_jetty_user.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# Create user + +USER="jetty" +GROUP="jetty" +UID="352070" +GID="35953" + +# Remove user: +deluser ${USER} + +delgroup ${GROUP} + +echo "${USER}:x:${UID}:${GID}::/home/${USER}:Linux User,,,:/home/jetty:/bin/false" >> /etc/passwd + +echo "${GROUP}:x:${GID}:${USER}" >> /etc/group + +echo "${USER}:!:17501:0:99999:7:::" >> /etc/shadow + +mkdir /home/${USER} && chown ${USER}:${GROUP} /home/${USER}
\ No newline at end of file |