If you are a Raspberry Pi user, and want to get user accounts information, then this article will be helpful for you.
Find User Account Information on Raspberry Pi
The user account information on Raspberry Pi can be accessed through different commands, which are shown below:
1: Use cat Command
The “/etc/password” file on Linux system includes the information of all accounts on the system including the system and normal users. The systems users are the built-in users accounts which are active for performing different activity on the system, such as updating packages, running background process and more.
To find the list all available accounts on the device, they can use the below-given command:
You are going to notice a lot of these account that you didn’t create appears after running of the command. That is just because, when you install some program, they create a user account on the device, so that they can run these programs on the device.
To figure out the real account that you use to login into the Raspberry Pi device, are those whose directory start with /home/pi. Below screenshot will highlight the listed user accounts that usually use to login.
Note: Those accounts ending with /bin/bash are the normal users account that are created on Raspberry Pi system.
You can also use the command in the following way to retrieve only the information of normal users on Raspberry Pi system.
2: lslogins Command
You can also use the lslogins command to find the normal users account information on Raspberry Pi system.
3: getent Command
You can also use the getent command in the following way to find the user accounts on Raspberry Pi system:
The same command can also use with a specific user account information in the following way:
Conclusion
Multiple user accounts are associated with your Raspberry Pi system and to get the information about these accounts, you will see three different commands in the above-mentioned guidelines. These commands output the list of user’s accounts on the Raspberry Pi terminal.