2023-11-24 23:32:47 +00:00
|
|
|
# Generate a random password
|
2023-11-25 21:41:07 +00:00
|
|
|
random_password="$(openssl rand -base64 32)"
|
|
|
|
email="email1@phyrepanel.com"
|
2023-11-24 23:32:47 +00:00
|
|
|
|
2023-11-25 19:56:22 +00:00
|
|
|
# Create the new phyreweb user
|
2023-11-25 20:50:33 +00:00
|
|
|
/usr/sbin/useradd "phyreweb" -c "$email" --no-create-home
|
|
|
|
|
2023-11-25 19:56:22 +00:00
|
|
|
# do not allow login into phyreweb user
|
|
|
|
echo phyreweb:$random_password | sudo chpasswd -e
|
2023-11-24 23:32:47 +00:00
|
|
|
|
|
|
|
mkdir -p /etc/sudoers.d
|
2023-11-25 19:56:22 +00:00
|
|
|
cp -f /usr/local/phyre/web/sudo/phyreweb /etc/sudoers.d/
|
|
|
|
chmod 440 /etc/sudoers.d/phyreweb
|