mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-27 03:13:15 +01:00
Setup - Only add Wazuh repo
This commit is contained in:
@@ -77,16 +77,17 @@ add_socore_user_notmaster() {
|
||||
|
||||
add_wazuh_users() {
|
||||
|
||||
if [ $OS == 'centos' ]; then
|
||||
local ADDUSER=adduser
|
||||
else
|
||||
local ADDUSER=useradd
|
||||
fi
|
||||
# REMARKING FOR NOW -- ADDING VIA init.sls
|
||||
#if [ $OS == 'centos' ]; then
|
||||
# local ADDUSER=adduser
|
||||
#else
|
||||
# local ADDUSER=useradd
|
||||
#fi
|
||||
|
||||
groupadd --gid 945 ossec
|
||||
$ADDUSER --uid 943 --gid 945 --home-dir /opt/so/wazuh --no-create-home ossecm
|
||||
$ADDUSER --uid 944 --gid 945 --home-dir /opt/so/wazuh --no-create-home ossecr
|
||||
$ADDUSER --uid 945 --gid 945 --home-dir /opt/so/wazuh --no-create-home ossec
|
||||
#groupadd --gid 945 ossec
|
||||
#$ADDUSER --uid 943 --gid 945 --home-dir /opt/so/wazuh --no-create-home ossecm
|
||||
#$ADDUSER --uid 944 --gid 945 --home-dir /opt/so/wazuh --no-create-home ossecr
|
||||
#$ADDUSER --uid 945 --gid 945 --home-dir /opt/so/wazuh --no-create-home ossec
|
||||
|
||||
}
|
||||
|
||||
@@ -891,7 +892,7 @@ update_sudoers() {
|
||||
|
||||
}
|
||||
|
||||
wazuh_agent_install() {
|
||||
wazuh_repo_install() {
|
||||
|
||||
if [ $OS == 'centos' ]; then
|
||||
# Add repo
|
||||
@@ -904,22 +905,11 @@ name=Wazuh repository
|
||||
baseurl=https://packages.wazuh.com/3.x/yum/
|
||||
protect=1
|
||||
EOF
|
||||
# Install agent
|
||||
yum install -y wazuh-agent
|
||||
# Prevent automatic upates
|
||||
sed -i "s/^enabled=1/enabled=0/" /etc/yum.repos.d/wazuh.repo
|
||||
else
|
||||
# Get key
|
||||
curl -s https://packages.wazuh.com/key/GPG-KEY-WAZUH | apt-key add -
|
||||
# Add repo
|
||||
echo "deb https://packages.wazuh.com/3.x/apt/ stable main" | tee /etc/apt/sources.list.d/wazuh.list
|
||||
apt-get update -y
|
||||
# Install
|
||||
apt-get install -y wazuh-agent
|
||||
# Prevent automatic updates
|
||||
sed -i "s/^deb/#deb/" /etc/apt/sources.list.d/wazuh.list
|
||||
# Set package state to "hold"
|
||||
echo "wazuh-agent hold" | sudo dpkg --set-selections
|
||||
fi
|
||||
|
||||
}
|
||||
@@ -1470,11 +1460,11 @@ if (whiptail_you_sure); then
|
||||
echo ""
|
||||
add_socore_user_master
|
||||
|
||||
echo "** Adding Wazuh users **"
|
||||
add_wazuh_users
|
||||
#echo "** Adding Wazuh users **"
|
||||
#add_wazuh_users
|
||||
|
||||
echo "** Installing Wazuh agent **"
|
||||
wazuh_agent_install
|
||||
echo "** Installing Wazuh repo **"
|
||||
wazuh_repo_install
|
||||
|
||||
# Install salt and dependencies
|
||||
echo " ** Installing Salt and Dependencies **"
|
||||
@@ -1562,8 +1552,8 @@ if (whiptail_you_sure); then
|
||||
mkdir -p /nsm
|
||||
get_filesystem_root
|
||||
get_filesystem_nsm
|
||||
add_wazuh_users
|
||||
wazuh_agent_install
|
||||
#add_wazuh_users
|
||||
wazuh_repo_install
|
||||
copy_ssh_key
|
||||
set_initial_firewall_policy
|
||||
create_bond
|
||||
@@ -1628,8 +1618,8 @@ if (whiptail_you_sure); then
|
||||
echo "**** Please set a password for socore. You will use this password when setting up other Nodes/Sensors"
|
||||
echo ""
|
||||
add_socore_user_master
|
||||
add_wazuh_users
|
||||
wazuh_agent_install
|
||||
#add_wazuh_users
|
||||
wazuh_repo_install
|
||||
create_bond
|
||||
saltify
|
||||
docker_install
|
||||
@@ -1691,8 +1681,8 @@ if (whiptail_you_sure); then
|
||||
mkdir -p /nsm
|
||||
get_filesystem_root
|
||||
get_filesystem_nsm
|
||||
add_wazuh_users
|
||||
wazuh_agent_install
|
||||
#add_wazuh_users
|
||||
wazuh_repo_install
|
||||
copy_ssh_key
|
||||
set_initial_firewall_policy
|
||||
saltify
|
||||
|
||||
Reference in New Issue
Block a user