On 11/03/15 02:49, Roberto De Oliveira wrote:
I have a weird behavior on my system, I'm trying to change a home directory with "usermod -d newhome foo" but the system denies because "usermod: user foo is currently used by process XXXX", when I look for PID XXXX I see "/lib/systemd/systemd --user". Does anyone knows why this is happening? How I fix it?
That process is a session instance of systemd, which (in general) indicates that the user in question is logged in to the system. usermod would appear to be (quite rightly, IMO!) refusing to change a user's home directory while that user is logged in.
I would expect that you can resolve this by closing all of that user's login sessions before changing their home directory.