chagood před 2 roky
rodič
revize
393f5bc46d
2 změnil soubory, kde provedl 15 přidání a 5 odebrání
  1. 13 3
      DomainJoin/UbuntuJoinDomain.sh
  2. 2 2
      DomainJoin/config.sh

+ 13 - 3
DomainJoin/UbuntuJoinDomain.sh

@@ -72,20 +72,25 @@ sudo realm deny --all
 sudo realm permit -g "Domain Admins"
 sudo realm permit -g "Access - Admin - All Servers"
 sudo realm permit -g "Access - Admin - $HOST"
+sudo realm permit -g "Access - Admin - All Linux Servers"
+sudo realm permit -g "AnsibleAdmins"
 
 # Set up sudoers file
 echo "%Domain\ Admins     ALL=(ALL:ALL)   ALL" | sudo tee /etc/sudoers.d/LocalAdmins > /dev/null
 echo "%Access\ -\ Admin\ -\ All\ Servers     ALL=(ALL)   ALL" | sudo tee -a /etc/sudoers.d/LocalAdmins > /dev/null
+echo "%Access\ -\ Admin\ -\ All\ Linux\ Servers     ALL=(ALL)   ALL" | sudo tee -a /etc/sudoers.d/LocalAdmins > /dev/null
 echo "%Access\ -\ Admin\ -\ $HOST     ALL=(ALL)   ALL" | sudo tee -a /etc/sudoers.d/LocalAdmins > /dev/null
+echo "%AnisbleAdmins     ALL=(ALL)   ALL" | sudo tee -a /etc/sudoers.d/LocalAdmins > /dev/null
+echo "Ansible  ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/LocalAdmins > /dev/null
 
 # copy file from SCP server to local system
-sudo scp -r anonymous@ptiwa001:ninja-agent.deb ~/
+sudo scp -r anonymous@ptiwa001:ninja-agent.deb /home/coadmin/
 
 # install package using dpkg
 sudo dpkg -i ninja-agent.deb
 
 # copy file from SCP server to local system
-sudo scp -r anonymous@ptiwa001:falcon-sensor_6.46.0-14306.deb ~/
+sudo scp -r anonymous@ptiwa001:falcon-sensor_6.46.0-14306.deb /home/coadmin/
 
 # install package using dpkg
 sudo dpkg -i falcon-sensor_6.46.0-14306.deb
@@ -96,10 +101,15 @@ sudo /opt/CrowdStrike/falconctl -s --cid=D0511099B3FF494D8B87F48C4AB90201-56
 # Remove packages that are not required
 sudo apt autoremove -y
 
-# Start Services
+# Configure syslog server
+echo 'remote host is: dcpi-siem 10.200.24.51:514' | sudo tee -a /etc/rsyslog.conf
+echo '*.* @@10.200.24.51:514' | sudo tee -a /etc/rsyslog.conf
+
+# Start/Restart Services
 sudo systemctl restart sssd
 sudo systemctl start ninjarmm-agent.service
 sudo systemctl start falcon-sensor
+sudo systemctl restart rsyslog
 
 # check the status of the services
 sudo systemctl | grep -E 'falcon-sensor|ninjarmm-agent|sssd.service'

+ 2 - 2
DomainJoin/config.sh

@@ -2,7 +2,7 @@
 
 # Enter Admin username and set the domain name and new hostname
 ADMIN_USER="adm-"
-#***NO LONGER NEEDED***ADMIN_PASSWORD="admin_password"
+# ***NO LONGER NEEDED***ADMIN_PASSWORD="admin_password"
 
 # Hostname with FDQN
 NEW_HOSTNAME="newhostname.peo.local"
@@ -10,7 +10,7 @@ NEW_HOSTNAME="newhostname.peo.local"
 # Short name
 HOST="hostname"
 DOMAIN="peo.local"
-#***Notworking at the moment***DOMAIN_DESC="My domain description"
+# ***Notworking at the moment***DOMAIN_DESC="My domain description"
 
 # Enter the OU where the machine will reside in the domain
 OU="Paste destination OU"