Stone, Avi (as206k) | 9b2ceb3 | 2018-04-12 16:36:39 +0300 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # Create user |
| 3 | |
| 4 | USER="jetty" |
| 5 | GROUP="jetty" |
| 6 | UID="352070" |
| 7 | GID="35953" |
| 8 | |
| 9 | # Remove user: |
| 10 | deluser ${USER} |
| 11 | |
Areli, Fuss (af732p) | 6b10d05 | 2018-05-28 14:39:39 +0300 | [diff] [blame] | 12 | ##delgroup ${GROUP} |
Stone, Avi (as206k) | 9b2ceb3 | 2018-04-12 16:36:39 +0300 | [diff] [blame] | 13 | |
| 14 | echo "${USER}:x:${UID}:${GID}::/home/${USER}:Linux User,,,:/home/jetty:/bin/false" >> /etc/passwd |
| 15 | |
| 16 | echo "${GROUP}:x:${GID}:${USER}" >> /etc/group |
| 17 | |
| 18 | echo "${USER}:!:17501:0:99999:7:::" >> /etc/shadow |
| 19 | |
Areli, Fuss (af732p) | 6b10d05 | 2018-05-28 14:39:39 +0300 | [diff] [blame] | 20 | mkdir /home/${USER} && chown ${USER}:${GROUP} /home/${USER} |