Read a sample: 1. Linux Security and the Exam Context
A Linux computer can serve one person at a desk, several developers sharing a server, or an application running in the background. In each case, the system needs ways to distinguish identities, control access to resources, and communicate with other systems. These ordinary operating-system tasks are also security tasks.
Consider a shared computer with a folder for a project team. Team members need to read and update certain files, while other users should not automatically have the same access. An administrator may need broader authority to maintain the system. A network service might need to accept connections without giving every connecting user control of the machine. Linux provides mechanisms for handling these situations, but the mechanisms are useful only when someone can interpret and apply them.
This chapter introduces the ideas that connect those mechanisms. The goal is to begin asking the right questions: Who is acting? What resource is involved? What access is allowed? How might the system be reached?
This is an independent, security-focused review for candidates studying Linux Essentials exam 010-160. It concentrates on accounts, permissions, and basic network awareness: topics that help explain how a Linux system separates users, protects resources, and exposes services.
The chapters build from identity to access. You will examine users, account types, groups, and account information files; then work through file ownership and permissions. Later chapters introduce local network configuration, ports, and services before bringing the ideas together in practical scenarios.
This focus is narrower than a complete Linux Essentials course. Consult the current official exam objectives to check the full range of topics you need to study; requirements can change. This unofficial book does not reproduce exam questions. Its original practice questions test concepts and reasoning rather than predict the wording or difficulty of a particular exam.
Linux security is not a single setting that makes a system safe. It involves decisions about identities, privileges, files, software, and connections. Even a small task, such as creating a shared directory, can raise several questions:
- Which users need access?
- Should they be able to read files, change them, or both?
- Should everyone on the system have that access?
- Who can change the directory’s ownership or permissions?
- Is the directory used only locally, or is it made available through a network service?
You may not know how to answer all these questions yet. That is expected. The point is to see how the topics fit together.
A useful principle throughout this book is least privilege: give an account or process the access it needs for its task, without granting unnecessary additional access. Least privilege is a goal rather than a magic switch. It requires knowing what a task needs, choosing appropriate settings, and checking that the result matches your intention.
For example, granting every local user write access to a shared file may make collaboration easy, but it may also let people outside the project change the file. A group-based arrangement can often express the intended access more precisely. Groups do not solve every security problem, but they provide one useful way to organize access.
Linux is designed to support multiple user identities. Those users do not have to sit at the same keyboard, and they do not all have to be people actively logged in. A system can have accounts used by individuals as well as accounts associated with services or system tasks.
The operating system uses identity information when deciding whether an action is permitted. If a user tries to open a file, the system can consider the file’s owner, its associated group, and its permission settings. The answer depends on the identity making the request and the access rules that apply.
A user name is a human-friendly label for an account. Linux also uses a numeric user ID, commonly called a UID, to represent a user identity. Similarly, groups have names and numeric group IDs, or GIDs. A group brings users together for access-control purposes. Names are convenient to read, while numeric IDs matter to the system’s representation of identity.
A user’s activity generally takes place through processes. A process is a running instance of a program, and it operates with an associated security context. When you run a command in a shell, the resulting process usually acts with your account’s ordinary privileges unless some mechanism changes the relevant privileges. Access checks therefore apply not only to a person typing at a keyboard: programs also request access to files and other resources.
Two related terms are easy to confuse:
- Identification is the claim of an identity, such as entering a user name.
- Authentication is the process of checking evidence that supports that claim, such as a password or another configured credential.
Entering the name morgan tells a system which account you are claiming to use. It does not, by itself, prove that you are authorized to use that account.
After authentication, a user may start a session, an environment in which they can interact with the system. Depending on the configuration, that interaction might be local or remote, graphical or text based. A session is not the same thing as an account: an account describes an identity, while a session is a period of activity using an identity.
An ordinary user account is generally intended for routine work. It can access resources allowed to that user, but it is not meant to have…