after trying hard to search for RPM best practices guides and finding virtually none, to my surprise, I resort to the community -
I need to ensure that some users and groups exist after the installation, and that the users are members of the groups. Are there a recommended procedure(s) for this?
In the existing rpm spec I see that the required users&groups are removed at the beginning of the %pre script prior to adding them with
useradd. I am told that this is a common practice. Why is this? Is it better then testing for user existence with
Some of our clients may want to manage their users themselves, so they would create the users before running our rpm. So to sum up all the above, it seems that the best approach is to test for user existence and to create it if does not exist. Any comments on that? Thanks.
EDIT: RHEL 5.7