I've done this many times but always from root.

With no root account, I would:
1) create a 2nd user 'test', set a password, and make 'test' a sudo user
2) logout and login as 'test'
3) let's say the user to change is 'bob' with id 1000
  grep bob /etc/passwd
  should yield:
    bob:x:1000:1000:Bob:/home/bob:/bin/bash
4) edit /etc/passwd and change the 1st number (the uid) for 'bob' from 1000 to 54321 and save
5) run:
  sudo find / -xdev -uid 1000 -exec chown bob {} \;
  -xdev says stay on this filesystem; don't descend into /proc or /sys or /cdrom and so on.
  This could take awhile.
6) logout from 'test' and login as 'bob'

HTH,
Bill

On 3/5/2018 7:38 PM, Ranjan Maitra wrote:
Hi,

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?

Many thanks and best wishes,
Ranjan