I've written a small patch to add the new user, 'chukwa', when the rpm is installed. It will remove the user when the rpm is uninstalled.
Per feedback from Eric Yang on chukwa-users, the useradd call has been modified as follows:
- Long form of some useradd switches used for readability.
- -r switch added, so that the chukwa user's uid will be in the system range, that is, below 500.
- The command does not return an error if the rpm is being upgraded.
Changes that I haven't made, and the reason:
- -u 210. Does Chukwa need to select a specific uid? How should we handle that uid being already in use?
- --shell /bin/bash. Does Chukwa need a Bash shell? I would expect system accounts to not have valid shells.
- -M Not necessary. If -r is used, useradd will not create a home directory, regardless of login.defs, unless -m is given.
- -g hadoop. Does Chukwa need to be group hadoop? The user hadoop won't exist on most agent nodes, I would expect. On collectors, maybe.
Given the triviality of the patch, a prolonged argument isn't in anyone's interests, so if you think these should just be done, I will happily do so.