O'Reilly logo

Linux Application Development, Second Edition by Erik W. Troan, Michael K. Johnson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required