How to change user home directory when in use by /usr/lib/systemd/systemd --user
2
votes
2
answers
1291
views
After copying all contents of a user home directory I'm trying to change the home directory to the new location. But systemd prevents me from doing this.
# sudo usermod -d /data/home/user/ user
usermod: user user is currently used by process 10050
# sudo ps -fp 10050
UID PID PPID C STIME TTY TIME CMD
user 10050 1 0 Nov23 ? 00:00:03 /usr/lib/systemd/systemd --user
How can I achieve this ?
I'd like to avoid stopping services or rebooting the server just to move a home directory
The user is not logged on, I checked using sudo who
cat /etc/redhat-release
Red Hat Enterprise Linux release 8.5 (Ootpa)
Asked by carl verbiest
(471 rep)
Dec 5, 2022, 11:10 AM
Last activity: Apr 24, 2023, 12:21 PM
Last activity: Apr 24, 2023, 12:21 PM