![]() ![]() Here are a few tips to help you with the users listing. You just saw three ways to view users in Linux. This is helpful when you are not the admin on a Linux system and don’t have sudo access. You can use compgen command with -c option to list all the commands available to you. The output would be like this: compgen -u If you just want to list all the usernames without any additional information, you can use the compgen command with -u option. This conf includes passwd, so that’s why it will display very similar but if you use LDAP for authentication it will include that as well. This command will give you a similar output as “less /etc/passwd” however, this one actually queries the GNU Name Service Switch functionality configuration file (located at /etc/nf). These users are also referred as pseudo-users. This means that these users cannot login to the system. You’ll also notice that some of the users have ‘nologin’ at the end of their line. This gives you a hint that the user with UID >=1000 is a normal user and users with UID <1000 are system users. Generally, a normal user has UID greater or equal to 1000. Now if you want to distinguish the normal users from the system users, you can refer to the User identifier (UID) number. The list shows a lot more users than you expected because it lists all the system users too. Why so many users? Which ones are ‘real’?
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |