I'm using Linux Mint 22.1 Cinnamon and I'm trying to change my username from my deadname. I attempted the command "sudo usermod -l newname oldname", but I ran into an issue where it says "usermod: user oldname is currently used by process 1182." It seems like I might need to kill systemd to do this, but I've heard that it's not a good idea. Any suggestions on how to proceed?
3 Answers
One option is to create a new user with sudo rights and start using that account. Make sure it’s working properly before you try changing anything with the old user. I learned the hard way that having a backup user ready can save you from a lot of trouble!
Have you thought about booting into recovery mode? It should give you a root shell without starting any of the user sessions, which could help avoid the problem you're facing. If that doesn't work, using a live USB and `chroot` could be another way to change your username.
You could try accessing the root shell using the command `sudo -i` and then attempt the name change from there. It might bypass the issue with systemd being in use.
I still got the same error message when I tried that.