Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I simply wanted to change the location of the home directory, so I followed these instructions: usermod -d /path_to_new_dir a_user

However, Ubuntu 12.04 responds: usermod: user a_user is currently logged in

So I checked sudo w, sudo who, and sudo lsof -u a_user, but see nothing from a_user.

Nonetheless, I still try to kill the user: sudo skill -KILL -u a_user and sudo pkill -u a_user, but no luck. Ubuntu still responds: usermod: user a_user is currently logged in.

Any ideas on what to try next?

share|improve this question
To log out a user see: askubuntu.com/questions/15795/…. To move home see: askubuntu.com/questions/21321/move-home-folder-to-second-drive. Use pkill -u rather than skill to kick a user. Why no live system? –  Takkat Aug 22 '13 at 7:04
Updated question - I had tried pkill, too. Re moving, I'd like to use the command line usermod as it's designed. It's a server, so not looking for a GUI solution like the referenced question, nor do I want to mount/create new partitions. Also I'm not sure what you mean by "Why no live system?" You mean boot from a live cd/usb stick to do this simple operation? I'm looking to understand what's going on in this apparently simple task. I'm not looking to bypass with a laborious procedure and not gain any further understanding. –  Keith Bentrup Aug 22 '13 at 7:55
The whole thing looked like server thanks for clarifying :) –  Takkat Aug 22 '13 at 8:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.