-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcustom-linux.sh
More file actions
34 lines (30 loc) · 1.15 KB
/
custom-linux.sh
File metadata and controls
34 lines (30 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# maintainer : "Bilal Kalem"
# maintainer email : "bkalem@ios.dz"
# Licence " CC BY-NC-SA "
echo "###############################"
echo "[Task 1] installation packagage complementaire"
echo "###############################"
sudo yum install git vim nano wget bash-completion -y
echo "###############################"
echo "[Task 2] resolution DNS local /etc/hosts"
echo "###############################"
cat >> /etc/hosts <<EOF
172.15.20.10 master master.formini.local
172.15.20.20 ansible ansible.formini.local
172.15.20.101 worker1 worker1.formini.local
172.15.20.102 worker2 worker2.formini.local
172.15.20.103 worker3 worker3.formini.local
EOF
echo "###############################"
echo "[Task 3] enable SSH Password Authentication"
echo "###############################"
sudo sed -i 's/^PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config
echo "###############################"
echo "[Task 4] reload SSHd"
echo "###############################"
sudo systemctl reload sshd
echo "###############################"
echo "[Task 5] Password root = formini"
echo "###############################"
echo "formini" | passwd --stdin root