Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mjbroekman opened this issue Oct 9, 2017 · 1 comment
Closed

Comments

@mjbroekman
Copy link

mjbroekman commented Oct 9, 2017

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
ddpbsd added a commit to ddpbsd/ossec-hids that referenced this issue Oct 10, 2017
This should hopefully help in the case of users being in ldap instead
of on the system. The original checks in issue ossec#1278 didn't quite work
for me, so broke them out a bit more.
@ddpbsd
Copy link
Member

ddpbsd commented Oct 10, 2017

I need to run this through some tests, but it might work:
ddpbsd@9a6add8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants