Modify the default PI account of raspberry pie
· Raspberry pie · 0 comment · 1,551 Views

Modify the default PI account of raspberry pie

· Raspberry pie · 0 comment · 1,551 Views

The default login account of raspberry pie is pi. In order to unify the security and usage habits, the steps to modify the default PI account are as follows:

First, you need to enable the root account:
sudo passwd root
You will be asked to enter the password twice to set it

After setting the root password, exit the current PI user (I will not quit, restart decisively)
sudo reboot

Log in as root and unlock root:
sudo passwd --unlock root

First modify user:
usermod -l yourname pi

Modify the group:
groupmod -n yourname pi

Change the home directory:
mv /home/pi /home/yourname

Set the home directory as follows:
usermod -d /home/yourname yourname

OK, now you can log in with your new account. The data is completely the original PI.
Finally, for security reasons, disable root.

sudo passwd -l root

PS: new account default password or raspberry

Add a new comment