21 lines
428 B
Bash
Executable File
21 lines
428 B
Bash
Executable File
#!/bin/bash
|
|
#!/bin/bash
|
|
sudo userdel caddy
|
|
sudo groupadd caddy
|
|
sudo groupmod --gid 937 caddy
|
|
sudo useradd --system \
|
|
-m \
|
|
--uid 937 \
|
|
--gid caddy \
|
|
--create-home \
|
|
--home-dir /opt/caddy \
|
|
--shell /bin/bash \
|
|
--comment "Caddy web server" \
|
|
caddy
|
|
sudo passwd caddy
|
|
sudo usermod -a -G caddy sysadmin
|
|
source /opt/caddy/scripts/own
|
|
sudo chmod g+rw -R /opt/caddy
|
|
cat /etc/passwd | grep caddy
|
|
cat /etc/passwd | grep sysadmin
|