laradji / zabbix

Zabbix chef cookbook
Apache License 2.0
91 stars 124 forks source link

RHEL 5 does not support "manage home" usermod option. #145

Closed ftclausen closed 10 years ago

ftclausen commented 10 years ago

In my testing it seems that Red Hat 5 and below does not support the "manage home" usermod option - when Chef runs with that option enabled the run fails due to usermod complaining. This is despite the help text in usermod implying that you can run "-d" and "-m" together; I have not been able to get it to work on older RHEL machines.

This PR detects RHEL 5 and disables that option. It should not have an adverse impact on the agent and in my testing it still seems to work fine. If more distros do not support this option then the code may have to be refactored into a case statement.

guilhem commented 10 years ago

Hi @ftclausen

Thank you for this PR.

But I don't see any other bug like this on mailing-list or ticket (if you have one, can you paste it?). RHEL is quite common, someone has already had to experience this kind of problem :/

What is your chef version?

ftclausen commented 10 years ago

Good point - I will investigate further and see if I can narrow it down in more detail.

ftclausen commented 10 years ago

We are migrating away from RHEL 5 so this is not an issue any more - was probably something local anyway.

laradji commented 10 years ago

okay @ftclausen