Skip to Main Content
Linux Application Development, Second Edition
book

Linux Application Development, Second Edition

by Michael K. Johnson, Erik W. Troan
November 2004
Intermediate to advanced content levelIntermediate to advanced
736 pages
14h 4m
English
Addison-Wesley Professional
Content preview from Linux Application Development, Second Edition

Chapter 28. User Identification and Authentication

Linux’s security model uses numbers to identify users and groups, but people prefer names. The names are stored, along with other important information, in two system databases.

ID-to-Name Translation

When you type ls -l to list the contents of the current directory, the third and fourth columns give the user ID and group ID that owns each file. It looks like this:

drwxrwxr-x   5 christid christid     1024 Aug 15 02:30 christid
drwxr-xr-x  73 johnsonm root         4096 Jan 18 12:48 johnsonm
drwxr-xr-x  25 kim      root         2048 Jan 12 21:13 kim
drwxrwsr-x   2 tytso    tytso        1024 Jan 30  1996 tytso

But the kernel does not store the string christid anywhere; the ls program is translating from kernel-supplied numbers to names. It ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux System Programming, 2nd Edition

Linux System Programming, 2nd Edition

Robert Love

Publisher Resources

ISBN: 0321219147Purchase book