Am 18.09.2017 um 02:18 schrieb Michael Biebl: > It's not as simple as that. You might still have running processes with > that uid in which case usermod complains and exists. > So to successfully run usermod you'd have to kill a processes running > under that uid.
Fwiw, I ran into this issue when an upstream of mine switched runtimedir from /var/run to /run and my postinst so far has created a system user with --home /var/run/foo which I now wanted to change to --home /run/foo. As the package starts a (socket activated) daemon, this needs some dedicated code to disable socket activation, then stop the daemon, then change the home directory via usermod, then re-enable socket activation. Or I just don't try to anticipate all possible corner cases and simply use the new home directory only on new installations. Not sure what's better. -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
signature.asc
Description: OpenPGP digital signature