mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-22 15:40:25 +00:00
14 lines
401 B
Bash
14 lines
401 B
Bash
|
# Generate a random password
|
||
|
random_password="$(openssl rand -base64 32)"
|
||
|
email="email1@phyrepanel.com"
|
||
|
|
||
|
# Create the new phyreweb user
|
||
|
/usr/sbin/useradd "phyreweb" -c "$email" --no-create-home
|
||
|
|
||
|
# do not allow login into phyreweb user
|
||
|
echo phyreweb:$random_password | sudo chpasswd -e
|
||
|
|
||
|
mkdir -p /etc/sudoers.d
|
||
|
cp -f /usr/local/phyre/web/sudo/phyreweb /etc/sudoers.d/
|
||
|
chmod 440 /etc/sudoers.d/phyreweb
|