[Pkg-shadow-devel] usermod: E_USER_BUSY: Why is this even here?

Nicolas François nicolas.francois at centraliens.net
Mon Aug 5 00:36:19 UTC 2013


Hello,

On Thu, May 02, 2013 at 10:15:59PM -0700, clayne at anodized.com wrote:
> I can't understand the logic in why changing a user's home directory has anything to do with them either being logged in or having running processes. What's the logic behind this check? The comment explains the "what" but fails to explain the "why."
> 
> Changing a user's home directory shouldn't affect processes with a CWD set to the old home directory or other directories. So how is it a problem?
> 
> http://anonscm.debian.org/viewvc/pkg-shadow/upstream/trunk/src/usermod.c?r1=2935&r2=2936&

If the admin expects that the change of home directory takes effect after
the command is executed, then this will not be the case (e.g. existing
processes may still use their $HOME env variable.

There is also the case the home directory is really moved (in the
filesystem) which could be troublesome for the existing processes.


If needed, I could add a --force option to ignore such conditions.
Please raise a bug if needed, otherwise I will forget it.


Best Regards,
-- 
Nekral



More information about the Pkg-shadow-devel mailing list