How to look at users of Linux

How to look at users of Linux

Linux - the modern high-growth operating system. It differs in high stability and safety. Linux has flexible control settings for users and ample opportunities of management from the console.

It is required to you

  • The computer with the Linux operating system.

Instruction

1. All accounts of users in linux are stored in the text file / etc/passwd. Every line of the file contains information on one of accounts. It contains 7 fields separated by a colon: 1. Login2. Not used field in which in old systems the password hash was stored. 3. User ID (uid).4. The identifier of the main group for the account (gid).5. Personal information on the user, for example, real name and contact phone numbers.6. Arrangement of the home directory.7. Command cover.

2. By default file/etc/passwd is available for reading to any user. You can browse records in it via the text editor, by means of console utilities or the graphic interface.

3. To look at users of Linux directly from this file, just display its contents in the console a command: cat/etc/passwdvy you will see the list of all users registered in a system.

4. Accounts of users differ on types: 1. Root user, uid=0.2. System accounts. 3, Regular users. For systems on the basis of Red Hat they have uid since 500 and more, and in systems on the basis of Debian since 1000.

5. In file/etc/passwd the accounts are not sorted by type therefore if you want to receive the list only of regular users of Linux, use filters. For example, by means of such grep command it is possible to receive the list only of regular users for debian of systems, having filtered them by uid: cat/etc/passwd | grep - e "" ^ [^:] *: [^:] *: [0-9] {4, } ""Or, having added the cut command to the pipeline, to receive only their logins and house directories: cat/etc/passwd | grep - e" "^ [^:] *: [^:] *: [0-9] {4, }"" | cut - d: - f1.6

6. Except the file and console utilities, you can receive the list of users, using graphic programs. For example, the cover of KDE contains the module of the Management of Users and Groups setup.

7. In the top window of the module the list of accounts is displayed. Having clicked any of them, you receive its description in the lower part of a window. The module by default displays only regular users and root, but having selected the corresponding checkbox under the list, you will see also system users.

Author: «MirrorInfo» Dream Team


Print