wazuh / wazuh-cloudformation

Wazuh - Amazon AWS Cloudformation
https://wazuh.com
39 stars 22 forks source link

Debian script does not create the home folder for the specified user #22

Closed jm404 closed 4 years ago

jm404 commented 4 years ago

Hi team,

The wazuh_cf_agent_debian.sh executes the useradd instead of adduser.

https://github.com/wazuh/wazuh-cloudformation/blob/fc1e593a1e8653652ca366893824297a1a5e300b/wazuh/agents/wazuh_cf_agent_debian.sh#L27

Others scripts for agents use the adduser binary

https://github.com/wazuh/wazuh-cloudformation/blob/fc1e593a1e8653652ca366893824297a1a5e300b/wazuh/agents/wazuh_agent_centos.sh#L26

It's important to note that the useradd binary does not create the home folder for the user by default.

This causes troubles when using ssh to log into the Debian agent and also with Ansible

Best regards,

Jose