On Mon, Mar 5, 2018 at 7:38 PM, Ranjan Maitra <maitra(a)email.com> wrote:
I am on a single-account F27 system with an user id 1000. I want to
change this user id. From what I understand, I should do the following:
sudo usermod -u 54321 <username>
However, when I do this, I get:
usermod: user <username> is currently used by process 866
I guess that this has to do with the fact that I am logged in (to do
this). How do I get around this point? There is no root on the system
but I do have sudo access.
Separately, I want all my files and directory owned by 1000 to move to
this user id (so that I can have access)? Is this automatic or do I
have to run chown -R <username> etc?
Create a different sudo-able account and run "sudo usermod ..." from it.
From "man usermod":
You must make certain that the named user is not executing any processes
when this command is being executed if the user's numerical user ID, the
user's name, or the user's home directory is being changed. usermod
checks this on Linux. On other platforms it only uses utmp to check if
the user is logged in.