Closed slugh23 closed 7 months ago
That functionality already exists through the userconf-pi
package.
You can run sudo rename-user
to enable the mechanism
Edit: I should add that this is only supported on first boot. There's no reason it shouldn't work afterwards, but given that people do all kinds of unpredictable things on their system, we only support a clean image.
Would it be possible to add an option to change the username on the next boot? Just for user 1000. Perhaps it could be modelled after what happens in
firstrun.sh
from the imager software? Yeah... it might not be a widely used feature but I've seen other people ask the same question. There are a number of ways to do it but most instructions I've seen require enabling and disabling root login. I think it might be cleaner to do it the same way the imager does (on the next boot with a reboot).