saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Install Salt from the Salt package repositories here:
https://docs.saltproject.io/salt/install-guide/en/latest/
Apache License 2.0
14.2k stars 5.48k forks source link

Make username configurable in the rpm SPEC file to avoid conflicts with existing salt user #66944

Open upendar245 opened 1 month ago

upendar245 commented 1 month ago

Description of Issue/Enhancement

Currently, the SaltStack SPEC file hardcodes the username salt for the service user. This can cause conflicts for users who already have an existing salt user account used for other purposes. It would be beneficial to make the username configurable during installation or provide a mechanism to override the default user.

Steps to Reproduce

  1. Install SaltStack RPM on a system that already has a salt user created for a different application or purpose.
  2. Observe that the RPM preinstall script fails or overwrites the existing salt user settings.

Suggested Solution

  1. Modify the SPEC file to accept an environment variable or a build parameter that allows specifying a custom username.
  2. Update the preinstall, postinstall, and preuninstall scriptlets to use this configurable username.
  3. Provide documentation on how to use the new configuration options.

This enhancement would provide much-needed flexibility and prevent potential conflicts with existing system users.

Additional Context

Making the username configurable is a standard practice to avoid conflicts in environments where usernames might overlap across different applications. Implementing this change will make SaltStack more adaptable to various deployment environments.

welcome[bot] commented 1 month ago

Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey. Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. If you have additional questions, email us at saltproject@vmware.com. We’re glad you’ve joined our community and look forward to doing awesome things with you!