Questions

Forum Navigation
Please to create posts and topics.

Usermod: user CurrentName is currently used by process (Linux)

I am trying to change my username, as per advice here however after running the following command:

CurrentName@HostName ~ $ sudo usermod -l TheNameIWantToChange -d /home/TheNameIWantToChange -m CurrentName

Terminal responds with:

CurrentName@HostName ~ $ usermod: user CurrentName is currently used by process 2491

And the username stays the same. Does anybody know how I could fix this and change my username after all?

If you can't kill the process without it restarting, combine the command kill and usermod, for example (specifying the correct process ID or PID number):

kill -9 23162 && sudo usermod -l TheNameIWantToChange -d /home/TheNameIWantToChange -m CurrentName

Kind regards.