lvicainne / puppet-opendkim

Puppet module for opendkim
https://forge.puppetlabs.com/lvicainne/opendkim
Other
5 stars 32 forks source link

Could not set uid on user[opendkim] #11

Closed nikosmeds closed 7 years ago

nikosmeds commented 7 years ago

Trying your opendkim module, running into an issue on both Ubuntu 14.04 and 16.04 Forcing the GID/UID to 5010 is resulting in errors during the Puppet run.

Aug  9 19:16:56 ip-10-10-39-152 puppet-user[1666 (/Stage[main]/Opendkim::Install/Package[opendkim]/ensure) created
Aug  9 19:16:56 ip-10-10-39-152 puppet-user[1666]: (/Stage[main]/Opendkim::Config/Group[opendkim]/gid) gid changed '117' to '5010'
Aug  9 19:16:56 ip-10-10-39-152 puppet-user[1666]: Could not set uid on user[opendkim]: Execution of '/usr/sbin/usermod -u 5010 opendkim' returned 8: usermod: user opendkim is currently used by process 9310
Aug  9 19:16:56 ip-10-10-39-152 puppet-user[1666]: (/Stage[main]/Opendkim::Config/User[opendkim]/uid) change from 113 to 5010 failed: Could not set uid on user[opendkim]: Execution of '/usr/sbin/usermod -u 5010 opendkim' returned 8: usermod: user opendkim is currently used by process 9310
nikosmeds commented 7 years ago

Curious - why is it necessary?

lvicainne commented 7 years ago

Hi ! Your problem cal be easily solved if you stop opendkim during the 1st run of this module (thus, the system will be allowed to proceed to tha change of the UID/GID)/ For my usage, it is required to share the same UID/GID for files when they are share between several servers accros NFS. I did a commit today in order to correct this behavioour for people who don't care GID and UID ! Feel free to submit some PR in order to improve this module ! :-) Rgds

nikosmeds commented 7 years ago

Interesting - thanks for the incredibly fast response!