Remove hook + auto start
This commit is contained in:
12
bootstrap.sh
12
bootstrap.sh
@@ -161,16 +161,4 @@ sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin prohibit-password/' /etc/ssh/ssh
|
|||||||
sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config
|
sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config
|
||||||
|
|
||||||
systemctl restart sshd
|
systemctl restart sshd
|
||||||
|
|
||||||
# Désactivation du hook
|
|
||||||
rm -f /root/.bash_firstlogin
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
chmod +x /etc/profile.d/first-login.sh
|
|
||||||
|
|
||||||
|
|
||||||
FLAG="/root/.firstlogin_done"
|
|
||||||
if [ ! -f "$FLAG" ]; then
|
|
||||||
/etc/profile.d/first-login.sh
|
|
||||||
touch "$FLAG"
|
|
||||||
fi
|
|
||||||
|
|||||||
Reference in New Issue
Block a user