2020-05-12 14:51:19 -07:00
|
|
|
#!/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
|
2020-07-01 07:52:41 -07:00
|
|
|
sudo usermod -a -G caddy $USER
|
|
|
|
sudo chown -R caddy:caddy /opt/caddy
|
2020-05-12 14:51:19 -07:00
|
|
|
sudo chmod g+rw -R /opt/caddy
|
|
|
|
cat /etc/passwd | grep caddy
|
|
|
|
cat /etc/passwd | grep sysadmin
|