Coder Social home page Coder Social logo

Comments (4)

davidjiglesias avatar davidjiglesias commented on June 13, 2024 1

After talking with @santiago-bassett and @rauldpm we decided to follow solution number 1 proposed here #2776 (comment). However, apart from that, it is important to check in the starting stage that the environment possesses the necessary dependencies to successfully complete the installation.

from wazuh-packages.

rauldpm avatar rauldpm commented on June 13, 2024

Research

  • Main error
16/01/2024 10:36:49 INFO: Initializing Wazuh indexer cluster security settings.
./wazuh-install.sh: line 1648: sudo: command not found
Will create 'wazuh' index template
 SUCC: 'wazuh' template created or updated
Will create 'ism_history_indices' index template
 SUCC: 'ism_history_indices' template created or updated
Will disable replicas for 'plugins.index_state_management.history' indices
 SUCC: cluster's settings saved
Will create index templates to configure the alias
 SUCC: 'wazuh-alerts' template created or updated
 SUCC: 'wazuh-archives' template created or updated
Will create the 'rollover_policy' policy
  ERROR: could not check if the policy 'rollover_policy' exists => 503
ERROR: Indexer ISM initialization failed. Check /tmp/wazuh-indexer/ism-init.log for more information.
  • Apparently, the VM used does not have the sudo package installed, maybe it should be added as a WUS dependency
  • Also, the following behavior should be addressed:
    • The process should stop if an error occurs

from wazuh-packages.

teddytpc1 avatar teddytpc1 commented on June 13, 2024

Possible solutions

To resolve this issue we have two options when sudo is not installed:

  1. Show a warning/error indicating that sudo is not installed and is a required dependency to install Wazuh.
  2. Install sudo to perform the installation and uninstall it at the end of the script execution.

from wazuh-packages.

davidcr01 avatar davidcr01 commented on June 13, 2024

Update Report

Development

The following code was added to the common_checkRoot function:

common_logger -d "Checking sudo package."
    if ! command -v sudo; then 
        common_logger -e "The sudo package is not installed and necessary for the installation."
        exit 1;
    fi

Instead of checking if the sudo package is installed with the YUM/APT packages manager, it is done with the sudo command.

Testing

In a Debian11 system with sudo uninstalled, the WIA works as expected:

root@debian11sudo:/home/vagrant# sudo
bash: /usr/bin/sudo: No such file or directory

root@debian11sudo:/home/vagrant# bash wazuh-install.sh -a -i -v
29/01/2024 16:40:00 DEBUG: Checking root permissions.
29/01/2024 16:40:00 DEBUG: Checking sudo package.
29/01/2024 16:40:00 ERROR: The sudo package is not installed and necessary for the installation.

from wazuh-packages.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.