mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Setup Script - Add MYSQL and fleet password generation
This commit is contained in:
@@ -394,6 +394,13 @@ filter_nics() {
|
|||||||
FNICS=$(ip link | grep -vw $MNIC | awk -F: '$0 !~ "lo|vir|veth|br|docker|wl|^[^0-9]"{print $2 " \"" "Interface" "\"" " OFF"}')
|
FNICS=$(ip link | grep -vw $MNIC | awk -F: '$0 !~ "lo|vir|veth|br|docker|wl|^[^0-9]"{print $2 " \"" "Interface" "\"" " OFF"}')
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
generate_passwords(){
|
||||||
|
# Generate Random Passwords for Things
|
||||||
|
MYSQLPASS=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 20 | head -n 1)
|
||||||
|
FLEETPASS=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 20 | head -n 1)
|
||||||
|
}
|
||||||
|
|
||||||
get_filesystem_nsm(){
|
get_filesystem_nsm(){
|
||||||
FSNSM=$(df /nsm | awk '$3 ~ /[0-9]+/ { print $2 * 1000 }')
|
FSNSM=$(df /nsm | awk '$3 ~ /[0-9]+/ { print $2 * 1000 }')
|
||||||
}
|
}
|
||||||
@@ -507,6 +514,8 @@ master_pillar() {
|
|||||||
echo " es_port: $NODE_ES_PORT" >> /opt/so/saltstack/pillar/masters/$HOSTNAME.sls
|
echo " es_port: $NODE_ES_PORT" >> /opt/so/saltstack/pillar/masters/$HOSTNAME.sls
|
||||||
echo " log_size_limit: $LOG_SIZE_LIMIT" >> /opt/so/saltstack/pillar/masters/$HOSTNAME.sls
|
echo " log_size_limit: $LOG_SIZE_LIMIT" >> /opt/so/saltstack/pillar/masters/$HOSTNAME.sls
|
||||||
echo " cur_close_days: $CURCLOSEDAYS" >> /opt/so/saltstack/pillar/masters/$HOSTNAME.sls
|
echo " cur_close_days: $CURCLOSEDAYS" >> /opt/so/saltstack/pillar/masters/$HOSTNAME.sls
|
||||||
|
echo " mysqlpass: $MYSQLPASS" >> /opt/so/saltstack/pillar/masters/$HOSTNAME.sls
|
||||||
|
echo " fleetpass: $FLEETPASS" >> /opt/so/saltstack/pillar/masters/$HOSTNAME.sls
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1395,6 +1404,7 @@ if (whiptail_you_sure); then
|
|||||||
|
|
||||||
# Last Chance to back out
|
# Last Chance to back out
|
||||||
whiptail_make_changes
|
whiptail_make_changes
|
||||||
|
generate_passwords
|
||||||
clear_master
|
clear_master
|
||||||
mkdir -p /nsm
|
mkdir -p /nsm
|
||||||
get_filesystem_root
|
get_filesystem_root
|
||||||
@@ -1549,6 +1559,7 @@ if (whiptail_you_sure); then
|
|||||||
BROVERSION=ZEEK
|
BROVERSION=ZEEK
|
||||||
CURCLOSEDAYS=30
|
CURCLOSEDAYS=30
|
||||||
whiptail_make_changes
|
whiptail_make_changes
|
||||||
|
generate_passwords
|
||||||
clear_master
|
clear_master
|
||||||
mkdir -p /nsm
|
mkdir -p /nsm
|
||||||
get_filesystem_root
|
get_filesystem_root
|
||||||
|
|||||||
Reference in New Issue
Block a user