Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # To log in as root user first we have to enable it, to do so type the following command whilst logged in as the default pi user:
- sudo passwd root
- # Disable autologin
- raspi-config
- reboot
- # And then logout back in as the user 'root' using the password you just created. Now we can rename the the default pi user name. The following method renames the user 'pi' to 'newname', replace this with whatever you want. Type the command:
- usermod -l newname pi
- # Now the user name has been changed the user's home directory name should also be changed to reflect the new login name:
- usermod -m -d /home/newname newname
- # Now logout and login back in as newname. You can change the default password from raspberry to something more secure by typing following command and entering a new password when prompted:
- passwd
- # If you wish you can disable the root user account again but first double check newname still has 'sudo' privileges. Check the following update command works:
- sudo apt-get update
- # If it works then you can disable the root account by locking the password:
- sudo passwd -l root
Add Comment
Please, Sign In to add comment