summaryrefslogtreecommitdiffstats
path: root/docker/set_user.sh
blob: 6233c07727e1eb822485445eea219828ceb68735 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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}