So I'm trying to change user502's directory using
usermod -d /home/user502home user502
When I enter than into the shell (I'm on root user) I get "usermod: user502 is currently used by process 4220" and I know the user isn't logged in or anything, I just made the user.
How do I fix this?
You must kill currently used process first. But this process probably is your SSH connection. So, in this case you need to run this commands on nohup.
sudo su
nohup kill 4220; sleep 2; usermod -d /home/user502home user502 &
After you can connect to SSH again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With