Issue #4328 has been updated by Thomas Sturm. Status changed from Closed to Re-opened
Hi Nigel, and I'm suffering under this bug right now ;) I can reproduce it with apache/www-data. I want to set the homedirectory and shell of user www-data and get the following error: err: /Stage[main]/apache/User[www-data]/home: change from /var/www to /var/www/domains failed: Could not set home on user[www-data]: Execution of '/usr/sbin/usermod -d /var/www/domains www-data' returned 8: usermod: user www-data is currently logged in I tried to stop apache before changing the user, but never found the magic combination of exec, subscribe, only-if and so on, to have apache stopped but NOT stopped every time puppet runs... ---------------------------------------- Bug #4328: modifying user fails if user is logged in https://projects.puppetlabs.com/issues/4328 Author: Klavs Klavsen Status: Re-opened Priority: Normal Assignee: Nigel Kersten Category: Target version: Affected Puppet version: 0.25.5 Keywords: Branch: Just noticed (on Ubuntu 10.04 - probably valid for more OS'es) - that puppet failed to change a users homedir (the nagios user in this case) - and usermod failed to do so, because the user was logged in (the nrpe service was running). To fix this, one way would be to have a "pre-exec" and "post-exec" hook - which in this case, would be to stop and start the relevant service. or perhaps some "obstruction" parameter - where one could define the Service["nrpe"] as an obstruction (which would mean puppet would stop it before and start it again after - if it was indeed stopped by puppet beforehand). -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
