It’s a good idea to create a new user and remove the default pi user. There are only four steps:

  1. Create the new user
  2. Set up the new user’s configuration
  3. Test the login (It needs to work!)
  4. Remove the pi user and /home/pi

Create a new user:

sudo useradd -m USERNAME -G sudo

Change the password:

sudo passwd USERNAME

You may want to enable this USERNAME to issue sudo commands without the password

sudo visudo

You may have to edit /etc/passwd to add /bin/bash to the new user. Remove the pi user and /home/pi:

sudo deluser -remove-home pi