Guest User

Untitled

a guest
Dec 14th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. # 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:
  2. sudo passwd root
  3. # Disable autologin
  4. raspi-config
  5. reboot
  6. # 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:
  7. usermod -l newname pi
  8. # Now the user name has been changed the user's home directory name should also be changed to reflect the new login name:
  9. usermod -m -d /home/newname newname
  10. # 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:
  11. passwd
  12. # 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:
  13. sudo apt-get update
  14. # If it works then you can disable the root account by locking the password:
  15. sudo passwd -l root 
Add Comment
Please, Sign In to add comment