User Management of Raspberry Pi needs to be processed on the command line terminal. The default user name is Pi and the password is raspberry. You can add a user and modify the password of each user.
1. Change your password (change your password)
After you log on as a PI user, you can use the passwd command to change your password.
Enter passwd in the command line and press Enter. The command line prompt will prompt you to enter the current password for verification. After the verification is passed, you will be asked to enter a new password. Press enter to enter the new password again. Note that when you enter the password, the command line will not display any characters. Once you have completed the confirmation and there is no error, the command line prints the successful information (passwd: Password updated successfully), and the new password will take effect immediately.
If the user you are using has sudo permissions, you can use the user name and passwd command of another user to modify their password. For example, sudo passwd Bob allows you to set Bob's password and other optional values (such as name) of the user ). You can simply press enter to skip these options.
2. Remove a use's password (delete user password)
You can run the sudo passwd Bob-D command to delete user Bob's password.
3. Create a new user (create a new user)
You can use the adduser command to create other users on your Raspberry Pi device.
Enter sudo adduser Bob, and you will be prompted to enter the new user Bob password. You can also press enter to leave a blank to indicate that no password is set.
3.1 home folder (home folder)
When you create a new user, the new user will create his/her home folder in the/home/directory. The Home folder of the PI user is located in/home/PI /.
3.2 skel
A new user is created above. Files in the/etc/skel/directory will also be copied to the user's home folder. You can add or modify a file similar to/etc/skel/according to your preferences. bashrc uses ". the modified version will be applied to the newly created user.
4. sudoers (SUDO user)
The default PI user on Raspberry Pi is a sudoer (SUDO user ). This type of user can have the root permission to execute the command by entering sudo before entering the command on the command line, or completely switch to the root user through sudo Su.
To add a user to the sudoer user group, use a sudo user to enter the sudo logs do command to open the configuration file and find "root all = (ALL: All) under" # User Privilege specification "in the file) all ". Copy this line and replace the root with the corresponding user name. To use the root permission for password verification, change it to nopasswd: All. The following example gives Bob the password-free permission to access sudo:
# User privilege specificationroot ALL=(ALL:ALL) ALLbob ALL = NOPASSWD: ALL
Save and exit to complete the modification. Be careful because these operations may accidentally remove your own sudo permissions.
Note that you can use the following command to modify the editor used by the mongodo command (the default editor is nano ):
update-alternatives --set editor /usr/bin/vim.tiny
The above command changes the editor to vim.
5. delete a user)
You can use the userdel command to delete a user from your system. You can add the-r tag to delete their home folders at the same time:
sudo userdel -r bob
Address: http://www.raspberrypi.org/documentation/linux/usage/users.md
Raspberry Pi user management