I am trying to rename default user 'pi' to something else, and I am failing miserably.
Raspbian is based on Debian, so I assumed that it behaves as Debian, am I wrong?
What I tried?
I did normal route, as logging as root and using usermod - it does not work. I keep getting errors that user pi still runs processes of various PIDs. I tried to kill all processes related to the user by using killall -u pi
and it also did not work. I used then pkill -9 -u pi
without a success. After each of these commands, when I run usermod -l newname pi
, the system still reports running processes related to the 'pi' user. Why? What am I doing wrong? Yes, 'pi' is logged out, and I am logged in as a root. I know that I need to change few other things too, but I cannot go even through login change due to ongoing processes I cannot kill.
Edit: After some comments, I realized that my question looks like I ask how to change a username. I rather ask why my attempts to kill processes related to user pi failed. I will do my best to be more precise next time. Thank you all for hints!
id pi
say after you have changed the name?ctrl-alt-f[1-6]
in order until you see a plain login console. Do this after booting the system and having never logged in on the GUI. If you have autologin for the pi user enabled, obviously that is something you should change.ps -u pi
.