Skip to content

Installer fails to correctly install when ossec users are in LDAP #1278

@mjbroekman

Description

@mjbroekman

The installer looks for users and groups only in the local passwd and group file on Unix systems. If the ossec user and group are in LDAP, it fails to detect them and then the install dies when it tries to groupadd and useradd.

I had to hack the adduser.sh script to add getent checks to prevent it from adding the user and group that already exist.

54:    if [ `getent group ossec | wc -l` -lt 1 -a ! grep "^${GROUP}" /etc/group > /dev/null 2>&1 ]; then
70:        if [ `getent passwd ossec | wc -l` -lt 1 -a ! grep "^${U}" /etc/passwd > /dev/null 2>&1 ]; then

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions