System Admin Module
System Admin Module
1. Introduction
System and network administration are closely related and often work together to support
organizational IT infrastructure. Modern environments integrate servers, networks, virtualization,
and cloud technologies, requiring administrators to have both system and networking skills. This
module introduces students to the basic concepts, roles, tools, and responsibilities involved in
system and network administration, providing a foundation for understanding how computer
systems and networks are managed in real-world environments.
The primary objective of system and network administration is to ensure that computer systems
and networks operate reliably, securely, and efficiently. Administrators aim to provide continuous
availability of services such as file sharing, communication, and internet access while minimizing
system downtime. Another key goal is to protect organizational data by implementing security
measures, managing user access, and ensuring proper backup and recovery procedures. Overall,
system and network administration seeks to support users and organizational operations through
stable and well-managed IT infrastructure.
Despite these objectives, system and network administrators face several challenges. One major
challenge is security threats, including malware, unauthorized access, and network attacks, which
constantly evolve and require continuous monitoring and updates. System failures and downtime
also pose significant challenges, as hardware faults, software bugs, or configuration errors can
disrupt services. Additionally, administrators must manage resource limitations, such as limited
budgets, aging hardware, and increasing user demands, while keeping systems up to date with
rapidly changing technologies.
To address these challenges, administrators follow established common practices in system and
network management. These include regular system updates and patch management to fix
vulnerabilities, implementing strong authentication and access control policies, and performing
routine backups to prevent data loss. Monitoring system performance and network traffic helps
detect issues early, while proper documentation ensures consistent configuration and easier
troubleshooting. By following best practices, system and network administrators can maintain
secure, efficient, and scalable computing environments.
An Operating System (OS) is system software that acts as an interface between computer hardware
and users. It manages hardware resources such as the processor, memory, storage, and input/output
devices, and provides services that allow application programs to run efficiently. In system and
network administration, understanding operating systems is essential because administrators
install, configure, manage, and secure OSs on servers, desktops, and networked devices.
Operating systems play a central role in multi-user and networked environments. They support
user management, file systems, process control, networking services, and security mechanisms.
Different operating systems are designed to meet different needs, such as personal computing,
enterprise servers, real-time processing, and mobile devices. System and network administrators
must be familiar with multiple operating systems to manage diverse computing environments
effectively.
Figure 1.1. Shows how users can interact hardware through operating system
Major Functions of an Operating System
A batch operating system groups similar jobs and executes them in batches without user interaction
during execution. Users submit jobs (programs and data) to the system, and the operating system
processes them sequentially. This type of OS is efficient for large, repetitive tasks but does not
support real-time interaction.
Example: Early IBM mainframe systems used batch operating systems to process payroll, billing,
and statistical calculations.
A time-sharing operating system allows multiple users to interact with the system simultaneously.
The CPU time is divided into small time slices, and each user or process gets a turn, creating the
illusion of parallel execution. This improves system responsiveness and resource utilization.
Example: Window, UNIX is a classic example of a time-sharing operating system used in
universities and research institutions.
A real-time operating system is designed to process data and respond to events within strict time
constraints. Correctness depends not only on the result but also on the time at which the result is
produced. RTOSs are widely used in embedded and safety-critical systems.
A distributed operating system manages a group of independent computers and makes them appear
as a single system to users. Tasks and resources are distributed across multiple machines to
improve performance and reliability.
Example: Amoeba is a distributed operating system developed for research and academic use.
A network operating system provides services to computers connected over a network. It allows
file sharing, printer sharing, user authentication, and centralized management while each computer
maintains its own local OS.
Example: Windows Server is widely used to manage users and resources in organizational
networks.
A mobile operating system is designed specifically for smartphones and tablets, supporting touch-
based interaction, wireless connectivity, and power management.
Example: Android, based on the Linux kernel, is the most widely used mobile operating system
in the world.
System and network administrators commonly work with the following OSs:
UNIX-like systems include operating systems such as Linux, macOS, and BSD. These systems
follow the traditional UNIX design philosophy, emphasizing stability, security, multi-user
capabilities, and powerful command-line tools. They are commonly used in servers, cloud
platforms, research environments, and networking infrastructure due to their flexibility and
performance.
Windows systems, developed by Microsoft, are designed with a strong focus on ease of use and
graphical interfaces. Windows operating systems are widely used in desktop environments and
enterprise networks, particularly where centralized management and integration with Microsoft
services are required. Windows systems are known for their user-friendly interface and strong
support for commercial software.
UNIX-like Systems
Windows Systems
Table 1.1.
Windows and Linux are two widely used operating systems, but they differ significantly in design
philosophy, licensing, security, and system administration practices. Understanding these
differences is essential for system and network administrators when selecting and managing
operating systems in different environments.
Windows is a proprietary operating system developed by Microsoft and is widely used in desktop
and enterprise environments. It emphasizes ease of use through a graphical user interface and
provides strong integration with Microsoft services such as Active Directory. Linux, on the other
hand, is an open-source, UNIX-like operating system known for its stability, security, and
flexibility. It is commonly used in servers, cloud platforms, and networking systems.
Table 1.2.
Feature Windows Linux
Developer Microsoft Open-source community
License Proprietary (paid) Open source (free)
Source Code Closed Open
Interface GUI-focused CLI-focused + GUI
File System Drive letters (C:\) Single-root (/)
Security Good, but virus-prone Strong, fewer viruses
Customization Limited Highly customizable
Software Installation Executable files (.exe) Package managers
Stability High Very high
Server Usage Common Very common
Linux is an open-source, UNIX-like operating system that is distributed in many different forms
known as Linux distributions (distros). A Linux distribution consists of the Linux kernel along
with system libraries, utilities, package management tools, and user interfaces. Different
distributions are designed to meet different needs, such as desktop usage, server administration,
security testing, or educational purposes. Understanding Linux distributions and their user
interfaces is essential for system and network administrators who work in diverse computing
environments.
Linux also supports multiple user interfaces, allowing users and administrators to interact with the
system through graphical or command-line environments. This flexibility makes Linux suitable
for both beginner users and advanced administrators.
A Linux distribution is a complete operating system built around the Linux kernel, packaged
with additional software and tools.
Common Linux Distributions
2. Debian: Known for stability and reliability. Commonly used in servers. Large software
repository
3. Red Hat Enterprise Linux (RHEL): Enterprise-grade Linux distribution. Commercial support
and security updates. Widely used in corporate environments.
5. Fedora: Community-driven and cutting-edge. Used for development and learning new
technologies
6. Kali Linux: Security-focused distribution. Used for penetration testing and cybersecurity
training
The CLI allows users to interact with the system by typing commands in a terminal.
Features:
Example Command: ls -l
The GUI allows users to interact with Linux using windows, icons, menus, and mouse.
Linux operations refer to the common tasks and activities performed by users and system
administrators to manage, control, and maintain a Linux operating system. These operations
include working with files and directories, managing users, controlling processes, monitoring
system performance, and handling software installation. A strong understanding of Linux
operations is essential for effective system and network administration, especially in server and
multi-user environments.
Linux operations are primarily performed using the Command Line Interface (CLI), which
provides powerful tools for efficient system control. Although graphical tools exist, administrators
prefer command-line operations because they are faster, scriptable, and suitable for remote
management.
Linux follows a single-rooted, hierarchical file system structure, where all files and directories are
organized under one root directory represented by /. This design is inherited from UNIX and
provides a consistent, logical, and efficient way to organize system files, user data, and
applications. Unlike operating systems that use separate drive letters, Linux integrates all storage
devices into one unified directory tree, making file access simple and seamless.
To ensure consistency across different Linux distributions, the directory structure follows the
Filesystem Hierarchy Standard (FHS). The FHS defines the purpose and location of system files
and directories so that users and administrators can easily understand where files are stored. This
standard is essential for system administration because it supports portability, compatibility, and
efficient system management.
Figure 1.2. Linux file hierarchy
The root directory is the top level of the Linux file system. All other directories and files exist
under this directory, either directly or indirectly.
Contains essential system administration commands, mainly used by the root user.
Examples:
/etc/passwd
/etc/fstab
/etc/hostname
Example: /home/student1
Examples: /dev/sda
Subdirectories:
/usr/bin – User commands
/usr/lib – Libraries
/usr/share – Shared data
Example: /media/usb
This command attaches a storage device to the directory tree without breaking the hierarchy.
Linux organizes all files and directories under a single-rooted hierarchy, meaning that there is one
top-level directory called the root (/). Unlike some operating systems that assign separate drive
letters (like C: or D: in Windows), Linux treats all storage devices, partitions, and network
resources as part of a single unified directory tree. This approach simplifies navigation and
management, as users and applications can access all resources under one continuous hierarchy.
Single-Rooted Hierarchy
All directories and files, regardless of the storage device or partition, are mounted under a single
root /.
Example: A USB drive mounted at /mnt/usb becomes part of the file system hierarchy and is
accessed like any other directory.
Linux supports seamless integration of different file systems. This means that files stored on
various devices and partitions appear in the same directory tree, regardless of the underlying file
system type (e.g., ext4, XFS, NTFS, FAT32). Users do not need to worry about file system
differences when accessing files.
Linux file systems are extensible, allowing administrators to increase storage capacity or add
new partitions without breaking the existing directory structure.
In Linux, mounting is the process of attaching an additional file system (such as a hard disk
partition, USB drive, CD/DVD, or network storage) to the existing directory hierarchy. Because
Linux uses a single-rooted file system, new storage devices are not accessed using drive letters;
instead, they are mounted at specific directories called mount points. Once mounted, the additional
file system becomes accessible as part of the main directory tree.
Mounting additional file systems allows administrators to expand storage capacity, organize data,
and integrate external or remote storage seamlessly. This capability is essential in servers, multi-
user systems, and networked environments.
Mount Points
/mnt/data
Types of file systems that can be mounted: Linux supports mounting various file systems,
including:
mkdir /mnt/data
ls /mnt/data
To mount a file system automatically at boot time, entries are added to the /etc/fstab file.
Example entry:
[Link] File system Object Oriented Design and File system Standard
Linux and other UNIX-like operating systems are designed around the principle that everything is
treated as an object (file) within the file system. This object-oriented view simplifies system
interaction by providing a uniform interface to access files, devices, and system resources.
Combined with standardized file system structures, this design makes Linux systems consistent,
scalable, and easy to administer across different environments.
In Linux, the file system follows an object-oriented design philosophy, where different system
resources are represented as file objects. Each object has attributes (such as name, permissions,
ownership, and type) and supports common operations (read, write, execute). This approach allows
administrators and applications to interact with diverse system components using the same set of
commands and tools.
Examples:
This design enables powerful features such as piping, redirection, and scripting.
To maintain consistency across UNIX and Linux systems, file system standards define how files
and directories are organized and accessed. The most important standard in Linux is the Filesystem
Hierarchy Standard (FHS).
/ – Root directory
/bin – Essential user commands
/sbin – System administration commands
/etc – Configuration files
/home – User home directories
/var – Variable data
/usr – User system programs and libraries
Unix and UNIX-like operating systems use a strong permission-based security model to control
access to files and directories. File and directory permissions determine who can read, write, or
execute a file or access a directory. This model is essential in multi-user environments to protect
data, ensure system security, and prevent unauthorized access.
Each file and directory in Unix/Linux has an owner, a group, and a set of permission rules. These
permissions define what actions different users are allowed to perform on system resources.
Permission Categories
Permission Types
Example:
-rwxr-xr--
- → Regular file
rwx → Owner permissions
r-x → Group permissions
r-- → Others permissions
Permission Value
r 4
w 2
x 1
Common examples:
Symbolic method:
Numeric method:
Commands:
Example:
The shell is a command-line interface that allows users and system administrators to interact with
the Linux operating system by typing commands. Shell commands are essential for system and
network administration because they provide fast, powerful, and scriptable control over the system.
Mastering essential shell commands enables administrators to manage files, directories, users,
processes, and system resources efficiently.
Among the most frequently used shell commands are those related to file manipulation and
directory navigation, which form the foundation of everyday Linux usage.
These commands help users move through the Linux file system and identify their current
location.
pwd
ls
ls -l # Long listing format
ls -a # Show hidden files
ls -lh # Human-readable file sizes
3. cd – Change Directory
cd /home
cd student
cd ..
cd ~ # Home directory
cd / # Root directory
These commands are used to create, copy, move, rename, and delete files and directories.
Linux treats almost everything as a file, including process information, which allows
administrators to manage system activities using file-oriented commands and interfaces such as
the /proc virtual file system.
Viewing Processes
ps – Process Status
ps
ps aux
top – Real-Time Process Monitoring
top
Controlling Processes
C. Threads in Linux
A thread is a lightweight unit of execution within a process. Threads share memory and
resources but execute independently.
Linux uses a 1:1 threading model, where each thread is managed by the kernel.
To View Threads:
ps -T -p PID or top -H
The Linux shell is more than a simple command interpreter; it provides advanced features that
allow system administrators to work efficiently, automate tasks, and manage complex system
operations. Advanced shell features include input/output redirection, pipes, command substitution,
environment variables, shell expansion, job control, aliases, and shell scripting basics. Mastery of
these features greatly improves productivity and is essential for effective system and network
administration.
Redirection allows users to control where command output goes and where input comes from.
Output Redirection
ls > [Link]
ls >> [Link]
B. Pipes (|)
C. Command Substitution
Command substitution allows the output of a command to be used as input to another command.
date
echo "Today is $(date)"
E. Environment Variables
View Variables
env
echo $HOME
Set Variables
export PATH=$PATH:/opt/app/bin
F. Aliases
To remove: unalias ll
G. Job Control
command &
jobs
fg %1
bg %1
H. Shell History
history
!! # Run last command
!25 # Run command number 25
Example
#!/bin/bash
echo "System uptime:"
uptime
Make executable:
chmod +x [Link]
./[Link]
Why advanced shell features matter?
2. Introduction
This chapter introduces the core concepts and practices involved in user and group management,
authentication and authorization, and system security administration. It explains how operating
systems identify users, control access to files and resources, and enforce security policies. Special
emphasis is placed on understanding how permissions and privileges are assigned and managed to
ensure that users can access only what they are authorized to use.
The chapter also explores access control models, with particular focus on Discretionary Access
Control (DAC) and Role-Based Access Control (RBAC). DAC allows resource owners to decide
who can access their files and directories, while RBAC assigns permissions based on
organizational roles rather than individual users. Understanding these models helps administrators
design secure, scalable, and manageable systems that align with real-world organizational
structures.
By the end of this chapter, students will gain practical knowledge of how accounts and access
controls are implemented in modern operating systems, particularly in Linux and Unix-like
systems. This knowledge prepares learners to securely manage multi-user environments, enforce
security policies, and apply best practices in system and network administration.
Account and security administration involves the creation, management, and protection of user
accounts and groups to ensure secure and controlled access to system resources. In multi-user
operating systems such as Linux and Unix-like systems, each user is uniquely identified and
assigned specific privileges that determine what actions they can perform. Proper account
administration helps prevent unauthorized access, limits damage caused by compromised
accounts, and supports accountability through user identification and activity tracking.
System administrators are responsible for defining user roles, assigning appropriate permissions,
enforcing password policies, and managing group memberships. Effective account and security
administration ensures that users have only the access they need to perform their tasks, following
the principle of least privilege.
2.1.1 User and Group Concepts, and User Private Group Scheme
A user is an individual or service account that can log in to the system and execute commands.
Username
User ID (UID) – a unique numeric identifier
Home directory – e.g., /home/student
Login shell – e.g., /bin/bash
Types of Users
1. Root user
o UID = 0
o Full administrative privileges
o Can access and modify any resource
2. Regular users
o Used by humans
o Limited privileges for safety
3. System users
o Used by services and daemons
o Usually no login shell
Group name
Group ID (GID)
Group members
Types of Groups
File Purpose
/etc/passwd User account details
/etc/shadow Encrypted passwords
/etc/group Group information
/etc/gshadow Group passwords
The User Private Group (UPG) scheme is a security model where each user is assigned a unique
private group that has the same name as the user.
ls -l
-rw-r--r-- 1 alice alice 2048 [Link]
User Management
useradd username
passwd username
usermod -aG group username
userdel username
Group Management
groupadd groupname
groupdel groupname
groups username
When a new user account is created, the system assigns a user name, a unique user ID (UID), a
home directory, a login shell, and a primary group (usually using the User Private Group scheme).
For example, when an administrator creates a user named student1, Linux automatically creates
/home/student1 as the home directory and assigns a private group called student1. This
setup allows the user to work independently without interfering with other users’ files.
useradd student1
passwd student1
Modifying user accounts is equally important, as user roles and responsibilities often change over
time. Administrators may need to update a user’s login shell, home directory, account expiration
date, or group membership. For instance, if a user is promoted to a developer role, the administrator
can add them to a developers group without changing their primary group. This approach
maintains security while granting additional access.
User administration also includes account locking and unlocking, which is commonly used when
a user is temporarily inactive or under investigation. Locking an account prevents login without
deleting user data, making it a safer administrative action than account removal.
userdel student1
userdel -r student1 # Remove account and home directory
Creating a group is straightforward and allows multiple users to share access to files and
directories. For example, a projectA group can be created for a team working on the same project.
groupadd projectA
Users can then be added to this group as secondary members, enabling collaboration while
preserving their private files under the User Private Group scheme.
Administrators may also need to modify or remove groups when projects end or organizational
structures change. Deleting unused groups helps maintain a clean and secure system configuration.
groupdel projectA
In summary, user and group administration ensures that system access is organized, secure, and
adaptable to changing needs. By carefully creating, modifying, and removing users and groups,
administrators enforce security policies, support collaboration, and maintain system integrity.
These practices are essential for effective account and security administration in both small
systems and large enterprise environments.
2.1.3 Password Aging and Default User Files
Password aging is an important security mechanism used to control how long a user can continue
using the same password before being required to change it. In multi-user operating systems such
as Linux, password aging helps reduce the risk of unauthorized access caused by weak, stolen, or
long-term passwords. By enforcing password expiration policies, system administrators ensure
that users regularly update their credentials, thereby improving overall system security.
Linux implements password aging through a set of rules that define the maximum password age,
minimum password age, warning period before expiration, and account expiration date. These
rules are applied on a per-user basis and are stored securely in the /etc/shadow file. For
example, an administrator can require a user to change their password every 90 days and receive
a warning 7 days before expiration.
chage -M 90 -W 7 student1
In addition to enforcing maximum age, administrators can also prevent users from changing
passwords too frequently by setting a minimum age. This prevents users from cycling through
passwords to reuse an old one.
chage -m 7 student1
The password aging information for a user can be viewed using the chage command, which
provides a clear summary of expiration policies.
chage -l student1
Default password aging policies for new users are defined in the /etc/[Link] file. This
file specifies system-wide settings such as default password expiration time, minimum password
length, and warning periods. By configuring this file, administrators ensure that all newly created
accounts follow consistent security policies without needing manual adjustments for each user.
Default user files play a crucial role in defining the initial environment for newly created user
accounts. When a new user is added, Linux automatically copies configuration files from the
/etc/skel directory into the user’s home directory. These files, known as skeleton files, provide
default settings for the user’s shell and environment.
Common default user files include .bashrc, .bash_profile, and .profile, which control
shell behavior, environment variables, command aliases, and startup scripts. For example,
.bashrc may define useful aliases such as ll for ls -l, while .profile may set
environment variables like PATH.
ls /etc/skel
If an administrator wants all new users to have a specific alias or environment variable, they can
add it to the appropriate file in /etc/skel. Every user created afterward will automatically
receive these settings.
By carefully managing password aging policies and default user files, system administrators create
a secure and standardized user environment. Password aging strengthens authentication security,
while default user files ensure consistency and usability across user accounts. Together, these
mechanisms form an essential part of effective account and security administration.
Managing files and folder permissions is a critical aspect of account and security administration
in multi-user operating systems. In environments where multiple users share the same system, it
is essential to regulate who can read, modify, or execute files and directories. Proper permission
management ensures data confidentiality, prevents accidental or malicious modifications, and
maintains system stability.
Linux and Unix-like operating systems implement a robust permission model based on ownership
and access rights. Every file and directory is associated with an owner, a group, and a set of
permissions that define access for the owner, group members, and all other users. This model
allows system administrators to enforce security policies while still enabling collaboration among
users and groups.
Effective file and folder permission management involves several administrative tasks, including
assigning correct ownership, defining appropriate permission levels, and applying access controls
that align with organizational requirements. Administrators must balance security and usability by
granting sufficient access for users to perform their duties while minimizing unnecessary
privileges. Misconfigured permissions can lead to data exposure, unauthorized access, or system
misuse.
In addition to basic permission control, administrators must consider advanced aspects such as
shared directories, group collaboration, and resource limitations. Permission management often
works together with access control models such as Discretionary Access Control (DAC), where
resource owners control access, Role-Based Access Control (RBAC) and others, where
permissions are assigned based on roles. Understanding these concepts allows administrators to
design secure and scalable permission structures.
This section provides the foundation for understanding how file and directory permissions are
managed in Linux systems. The following subsections will focus on managing file ownership,
controlling access to files and directories, and managing disk quotas, all of which are essential
skills for effective system and network administration.
File ownership is a fundamental concept in Linux and Unix-like operating systems and plays a key
role in controlling access to files and directories. Every file and folder in the system is owned by
a user and associated with a group. Ownership determines who has authority over a file and how
permissions are applied. Proper management of file ownership helps system administrators enforce
security policies, support collaboration, and prevent unauthorized access to sensitive data.
In Linux, the user owner is typically the creator of the file, while the group owner is usually the
user’s primary group at the time of file creation, often following the User Private Group (UPG)
scheme. Ownership information can be viewed using the ls -l command, which displays the
file owner and group alongside permission settings.
ls -l [Link]
Example output:
In this example, student1 is both the file owner and the group owner.
System administrators often need to change file ownership when files are transferred between
users, shared among teams, or managed by system services. Linux provides the chown (change
owner) command to modify the user owner of a file or directory. This command is typically
restricted to the root user or users with administrative privileges to prevent misuse.
This command changes the ownership of [Link] so that student2 becomes the new
owner.
In addition to changing the user owner, administrators may also need to change the group
ownership of files to enable controlled sharing. This is done using the chgrp command or by
specifying both user and group with chown. Group ownership is particularly important in
collaborative environments where multiple users need access to shared resources.
Directories often require ownership changes when managing shared folders. When ownership of
a directory is changed, administrators may want to apply the change recursively to all files and
subdirectories within it. This is especially useful when transferring ownership of an entire project
directory.
Managing file ownership also supports security best practices such as the principle of least
privilege. By assigning correct ownership, administrators ensure that only authorized users can
modify critical files, while others may have read-only or no access. System files are typically
owned by root, preventing regular users from altering essential system configurations.
In summary, managing file ownership is a core administrative responsibility that directly affects
system security and collaboration. Through proper use of ownership commands such as chown
and chgrp, administrators can control responsibility, protect data, and maintain an organized and
secure file system.
Controlling access to files and directories is one of the most important responsibilities of a system
administrator in a multi-user operating system. File access control determines who can read,
modify, or execute a file, and under what conditions. Proper access control protects sensitive data,
prevents unauthorized modification, and ensures that users can only access resources required for
their roles. Linux and Unix-like systems support multiple access control mechanisms, each
designed to address different security and administrative needs.
The most basic and widely used access control mechanism is Discretionary Access Control (DAC).
Under DAC, the owner of a file has the discretion to decide who can access it. Linux implements
DAC using the familiar read (r), write (w), and execute (x) permission bits for the owner, group,
and others. Administrators and file owners use the chmod command to control these permissions.
For example, a file owner may allow only themselves to modify a file while permitting others to
read it.
In this example, the owner has read and write access, while group members and others have read-
only access. DAC is simple and flexible, but it relies heavily on user decisions, which can
sometimes lead to weak security if permissions are set incorrectly.
To enhance security beyond DAC, Linux also supports Mandatory Access Control (MAC). In
MAC, access decisions are enforced by the system according to predefined security policies, and
users cannot override these rules, even if they own the file.
MAC uses a centrally managed model to provide the highest level of security. A non-discretionary
system, MAC reserves control over access policies to a centralized security administration. MAC
works by applying security labels to resources and individuals. These security labels consist of
two elements: Classification and clearance
MAC relies on a classification system (restricted, secret, top-secret, etc.) that describes a resource’s
sensitivity.
Another important access control approach is Role-Based Access Control (RBAC). Instead of
assigning permissions directly to individual users, RBAC assigns permissions to roles, and users
are then assigned to those roles. This model simplifies administration in large organizations where
many users perform similar functions. In Linux, RBAC is often implemented through tools like
sudo, where users are granted permission to perform specific administrative tasks based on their
role.
In this case, a user does not have full root access but is allowed to perform specific administrative
commands. RBAC improves security by reducing the need to share the root account and by
limiting administrative privileges to well-defined roles.
In addition to these models, Linux provides Access Control Lists (ACLs), which offer more fine-
grained control than traditional DAC permissions. ACLs allow administrators to assign
permissions to specific users or groups beyond the owner and primary group. This is especially
useful in collaborative environments where multiple users need different levels of access to the
same file or directory.
In practice, modern Linux systems often use multiple access control mechanisms together. DAC
provides basic permission control, ACLs handle fine-grained sharing, RBAC manages
administrative privileges, and MAC enforces strict system-wide security policies. By
understanding and properly configuring these mechanisms, system administrators can design
secure, flexible, and scalable file access controls that meet both organizational and security
requirements.
Disk quotas are a resource management mechanism used by system administrators to control how
much disk space and how many files individual users or groups can consume on a file system. In
multi-user environments, unrestricted disk usage by a single user can lead to storage exhaustion,
degraded system performance, and service disruptions. Disk quotas help prevent such problems
by enforcing fair and predictable usage of storage resources.
Linux supports both user quotas and group quotas, allowing administrators to limit disk usage
based on organizational policies. User quotas restrict the amount of disk space and number of files
a specific user can consume, while group quotas apply limits collectively to all members of a
group. Quotas are enforced at the file system level and are commonly used on shared directories
such as /home, /var, or project storage areas.
Before quotas can be used, they must be enabled on the target file system. This is done by
modifying the /etc/fstab file to include quota options such as usrquota and grpquota.
Once enabled, the system must remount the file system and initialize quota tracking files. This
setup ensures that disk usage is continuously monitored and controlled.
/dev/sda1 /home ext4 defaults,usrquota,grpquota 0 2
After enabling quotas, administrators assign limits using the edquota command. Disk quotas
typically include soft limits and hard limits. A soft limit allows temporary usage beyond the
defined threshold, while a hard limit represents an absolute maximum that cannot be exceeded.
This two-level approach provides flexibility while still enforcing strict resource control.
edquota student1
For example, a system administrator may allow a user to temporarily exceed 5 GB of storage (soft
limit) but strictly prevent usage beyond 6 GB (hard limit). Users are usually warned when they
approach or exceed their soft limits, encouraging responsible resource usage.
Administrators can monitor quota usage using reporting tools such as quota and repquota.
These commands provide detailed information about current disk usage and quota limits for users
and groups, helping administrators identify potential storage issues before they become critical.
quota -u student1
repquota /home
Disk quotas are especially important in academic institutions, shared servers, and enterprise
environments where many users store data on the same system. They promote fairness, improve
system reliability, and reduce administrative overhead by preventing uncontrolled disk
consumption.
In summary, managing disk quotas is an essential part of file system and security administration.
By enforcing storage limits at the user and group levels, system administrators ensure efficient
resource utilization, maintain system stability, and support long-term scalability in multi-user
environments.
Chapter 3: File Systems and Management of Data Storages
3. Introduction
File systems and data storage management form the backbone of modern computing systems, as
they determine how data is organized, stored, accessed, and protected. For system and network
administrators, understanding file system structures and storage technologies is essential to ensure
system reliability, performance, scalability, and data integrity. Effective storage management
allows administrators to allocate disk space efficiently, safeguard critical data, and maintain
uninterrupted system operations.
This chapter introduces the fundamental concepts and administrative tasks involved in managing
disk storage and file systems in Linux and Unix-like operating systems. It covers how physical
storage devices are partitioned, formatted, mounted, and maintained, as well as how storage
resources are monitored and controlled. Special attention is given to understanding how operating
systems interact with storage hardware and how administrators can configure storage to meet user
and application requirements.
The chapter also addresses the importance of managing system memory through swap space,
monitoring disk usage to prevent storage exhaustion, and enforcing storage policies using disk
quotas. These topics are particularly relevant in multi-user and server environments where
uncontrolled disk usage can impact system stability and performance.
In addition, the chapter introduces advanced storage management techniques such as Logical
Volume Management (LVM) and Redundant Array of Independent Disks (RAID). These
technologies provide flexibility, scalability, and fault tolerance beyond traditional disk
partitioning. By combining file system administration with LVM and RAID, administrators can
design robust and adaptable storage solutions capable of supporting modern enterprise and
institutional computing environments.
By the end of this chapter, students will gain a solid foundation in file system and storage
management concepts, preparing them to configure, monitor, and maintain reliable storage
infrastructures as part of effective system and network administration.
3.1 File system Administration
File system administration involves managing how data is stored, organized, accessed, and
maintained on storage devices. In Linux and Unix-like operating systems, the file system provides
a structured way to store files and directories while ensuring efficient access, security, and
reliability. System administrators are responsible for configuring file systems, monitoring their
health, and maintaining data integrity throughout the system’s lifecycle.
A file system acts as an interface between users, applications, and physical storage devices. It
defines how files are named, how metadata is stored, and how space is allocated on disks. Common
Linux file systems such as ext4, XFS, and Btrfs offer features like journaling, access control, and
support for large files and volumes. Choosing the appropriate file system is an important
administrative decision that depends on performance requirements, scalability needs, and
reliability considerations.
ext4 is the most widely used Linux file system and the successor of ext2/ext3.
Best Use
✔ Desktop systems
✔ Laptops
Best Use
✔ Database servers
Best Use
✔ Backup servers
Comparison Table
ext4 is a stable and general-purpose Linux file system with journaling; XFS is optimized for high
performance and very large files; Btrfs is a modern file system using copy-on-write with advanced
features like snapshots, checksums, and built-in RAID.
File system administration also includes tasks such as preparing storage devices for use, organizing
storage hierarchies, and ensuring that file systems are properly mounted and available when the
system starts. Administrators must configure mount points, manage configuration files such as
/etc/fstab, and ensure that file systems are accessible in a secure and predictable manner. Proper
mounting ensures that storage devices integrate seamlessly into the Linux single-rooted directory
hierarchy.
Maintaining file systems is another critical responsibility. This includes monitoring disk usage,
checking file system integrity, repairing errors, and preventing data loss. Tools such as file system
check utilities and disk monitoring commands help administrators detect issues early and take
corrective action before they affect users or services. Regular maintenance improves system
stability and extends the lifespan of storage hardware.
In multi-user and server environments, file system administration works closely with security and
resource management. Administrators must ensure that file ownership, permissions, and quotas
are correctly configured so that users can access their data without compromising system security
or exhausting shared resources. Well-managed file systems support efficient collaboration, protect
sensitive data, and contribute to overall system performance.
In summary, file system administration is a foundational skill for system and network
administrators. It combines technical knowledge of storage structures with practical management
tasks to ensure that data storage remains reliable, secure, and scalable. The following sections will
explore specific administrative tasks such as disk partitioning, file system creation and
maintenance, swap management, disk usage monitoring, and advanced storage technologies.
3.1.1 Partitioning Disks with fdisk and parted
Partitioning disks is one of the first and most important tasks in file system administration. Before
a storage device can be used to store data, it must be divided into partitions, which are logical
segments of the disk that the operating system can manage independently. Proper partitioning
allows administrators to organize data, improve system performance, and apply specific file
systems or mount points to different sections of the disk. Partitioning is also crucial for separating
system files from user data, swap space, or special-purpose volumes.
Linux provides several tools for disk partitioning, with fdisk and parted being the most commonly
used. fdisk is a text-based utility often designed for MBR (Master Boot Record) partitions, and it
allows administrators to create, delete, and modify primary and extended partitions. Despite being
older, fdisk is widely used because of its simplicity and reliability.
1. Using fdisk
sudo fdisk -l
After partitioning with fdisk, the new partitions appear as /dev/sdb1, /dev/sdb2, etc., and
are ready for formatting with a file system.
While fdisk works well for MBR disks, modern storage often uses GPT (GUID Partition Table),
which supports larger disks and more partitions. For GPT and advanced features, the parted utility
is recommended. Parted is more versatile, supports scripting, and can handle both MBR and GPT
disks.
2. Using parted
Parted allows precise specification of partition sizes in percentages, MB, GB, or sectors, making
it ideal for complex disk layouts. It also supports alignment options to optimize performance for
SSDs.
Partitioning decisions should consider the intended use of the disk. For example:
A system disk may have separate partitions for /, /home, and /var to improve
performance and simplify backups.
Swap space can be allocated on a separate partition for virtual memory.
Data disks may have partitions aligned for large files or database storage.
After partitioning, partitions must be formatted with an appropriate file system and mounted to
make them usable. Administrators must also update /etc/fstab to ensure partitions are
automatically mounted at boot.
In summary, disk partitioning is a foundational step in file system administration. Tools like fdisk
and parted provide administrators with the ability to divide disks logically, optimize storage usage,
and prepare the system for further configuration such as file system creation, swap allocation, and
advanced storage management.
Once disks are partitioned, the next step in file system administration is to create, mount, and
maintain file systems. A file system defines how data is organized, stored, and retrieved on a disk
or partition. Proper creation and management of file systems ensure data integrity, efficient storage
utilization, and reliable system performance.
Linux supports several file systems such as ext4, XFS, Btrfs, and FAT32. Administrators choose
a file system based on factors like performance, reliability, and specific use cases. The mkfs (make
file system) command is used to create a file system on a partition. For example, to create an ext4
file system on /dev/sdb1:
Other file system types can be created by specifying the type, for example:
Creating a file system formats the partition, which means any existing data on it will be erased.
Therefore, administrators must ensure that partitions are properly backed up before formatting.
After creating a file system, it must be mounted to make it accessible to the operating system.
Mounting connects the file system to a mount point, which is an empty directory in the system’s
directory hierarchy. The mount command allows temporary mounting, while permanent mounts
are configured in /etc/fstab to automatically mount at boot.
Example of mounting a partition manually:
Mount options can include read-only (ro), no-execute (noexec), or user-specific settings,
depending on security and performance requirements.
Maintaining file systems involves regular monitoring, checking integrity, and repairing errors to
ensure data reliability. File system corruption can occur due to hardware failures, power outages,
or improper shutdowns. Linux provides tools such as fsck (file system check) to inspect and repair
file systems.
For mounted file systems, administrators may schedule periodic checks using tune2fs for ext-
based file systems:
This command sets the file system to check automatically after 30 mounts, helping prevent
unnoticed corruption. Additionally, maintaining proper backups is critical for data recovery in case
of catastrophic failures.
1. Separate partitions for system, user data, and swap space improve performance and
security.
2. Regular integrity checks prevent data loss.
3. Mount options should be configured to optimize performance and security.
4. Monitoring disk usage ensures that file systems do not run out of space unexpectedly.
5. Choosing the appropriate file system type ensures optimal performance and reliability for
the intended workload.
In summary, creating, mounting, and maintaining file systems are core responsibilities of system
administrators. Proper management ensures that storage devices are usable, reliable, and secure.
Together with partitioning and later steps such as LVM and RAID configuration, these tasks
provide a solid foundation for efficient storage administration.
3.1.3 Swap
Swap space is an essential component of memory management in Linux and Unix-like operating
systems. It acts as an extension of physical RAM, allowing the system to move inactive pages
from memory to disk when RAM becomes scarce. By providing virtual memory, swap space
ensures that applications continue to run smoothly, even when the system is under heavy memory
load. Proper configuration of swap is critical for system performance, stability, and
responsiveness.
Linux supports two types of swap: swap partitions and swap files. A swap partition is a dedicated
section of a disk reserved exclusively for swapping, while a swap file resides within an existing
file system. Traditionally, swap partitions have been preferred for performance reasons, but
modern Linux systems allow flexible swap file usage, which simplifies administration and
resizing.
To create a swap partition, administrators first partition the disk using tools like fdisk or
parted, then format the partition with the mkswap command:
swapon -s
Monitoring disk usage is a vital task for system administrators to ensure that storage resources are
used efficiently and that file systems do not become full, which could lead to application failures
or system crashes. Linux provides powerful tools such as df and du to help administrators track
disk usage at both the file system and directory levels. Understanding how to use these commands
is essential for proactive storage management.
df -h
Example output:
From this output, administrators can quickly identify file systems approaching full capacity and
take corrective actions, such as cleaning up files or expanding storage.
df -Th
While df provides an overview of file systems, the du (disk usage) command allows
administrators to determine how much space specific directories or files are consuming. This
is useful for pinpointing large files or directories that may be consuming excessive storage.
du -h /home/student1
The -h option displays sizes in human-readable format. Administrators can combine options to
summarize usage:
du -sh /home/student1
Here, -s (summary) provides only the total disk usage for the directory, helping to quickly assess
storage consumption. To find the largest directories within a folder:
This command lists the top 10 largest files or directories, allowing administrators to target cleanup
or reorganization efforts efficiently.
Practical Applications
1. Prevent Disk Full Errors: Regularly monitoring usage with df prevents critical partitions
like / or /var from filling up.
2. Identify Storage Hogs: Using du, administrators can locate large files or directories and
manage storage allocation.
3. Capacity Planning: Monitoring trends in disk usage helps plan for future storage expansion.
4. System Auditing: Checking disk usage supports auditing and compliance requirements,
especially in multi- user environments.
In summary, df and du are indispensable tools for Linux file system administration. While df
provides a global view of file system usage, du enables fine-grained analysis of directories and
files. Together, they help administrators maintain optimal storage utilization, prevent unexpected
failures, and plan future expansions.
Disk quotas are an essential administrative tool used to control and limit how much disk space and
how many files a user or group can occupy on a file system. In multi-user environments,
unrestricted storage usage by a single user can lead to full partitions, degraded system performance,
and potential service interruptions. Configuring disk quotas allows administrators to enforce fair
usage policies, prevent system abuse, and maintain overall storage stability.
After editing /etc/fstab, the partition must be remounted for the changes to take effect:
Next, administrators initialize the quota system by creating quota database files ([Link]
and [Link]) at the root of the partition:
Disk quotas can be defined using soft limits and hard limits:
Soft limit: A threshold that users can temporarily exceed. When exceeded, the system
issues warnings but allows limited overuse for a grace period.
Hard limit: The absolute maximum that cannot be exceeded.
This command opens a text editor where the administrator can set:
Once quotas are configured, administrators monitor usage with the quota command:
quota -u student1
To view quotas for all users or groups, repquota provides a comprehensive report:
repquota /home
This command sets the soft and hard block limits and inode limits for a user without editing
edquota.
1. Enable quotas on all multi-user and shared partitions, especially /home and /var.
2. Use soft limits with a grace period to alert users before enforcing hard limits.
3. Regularly monitor disk usage with repquota to prevent storage exhaustion.
4. Combine quotas with proper permissions to ensure both storage and access control.
5. Adjust quotas based on user roles, project requirements, and historical usage patterns.
In summary, configuring disk quotas is a proactive measure for controlling storage usage in multi-
user Linux environments. By enforcing limits, monitoring usage, and applying soft and hard
thresholds, administrators maintain system stability, prevent abuse, and ensure fair resource
allocation for all users and groups.
3.2 Logical Volume Management (LVM) and RAID
Modern computer systems require storage solutions that are not only large but also flexible,
reliable, and scalable. Traditional disk partitioning techniques are limited because partition sizes
are fixed at creation time and are difficult to modify without downtime or data loss. To address
these limitations, Linux systems use Logical Volume Management (LVM) and Redundant Array
of Independent Disks (RAID) technologies. These technologies provide advanced methods for
managing disk storage by improving flexibility, performance, and fault tolerance.
Logical Volume Management (LVM) introduces an abstraction layer between physical disks and
file systems. Instead of working directly with physical partitions, administrators manage storage
through logical components such as physical volumes, volume groups, and logical volumes. This
abstraction allows storage to be resized, extended, or reorganized dynamically, often without
interrupting system operation. LVM is especially useful in environments where storage
requirements frequently change, such as servers, virtualization platforms, and enterprise systems.
RAID, on the other hand, focuses on data redundancy, performance improvement, and fault
tolerance by combining multiple physical disks into a single logical unit. Depending on the RAID
level used, data may be mirrored, striped, or distributed with parity information across disks. This
ensures that systems can continue operating even if one or more disks fail, thereby increasing data
availability and reliability. RAID is commonly implemented in servers and critical systems where
data loss or downtime is unacceptable.
Together, LVM and RAID form a powerful storage management solution. RAID provides the
foundation of reliable and high-performance disk storage, while LVM adds flexibility and ease of
management on top of it. Understanding both technologies is essential for system and network
administrators responsible for designing, managing, and maintaining modern Linux storage
infrastructures.
3.2.1 Implementing LVM, Creating Logical Volumes (LVs), Manipulating VGs & LVs
Logical Volume Management (LVM) provides a flexible and scalable approach to disk storage
management in Linux systems. Instead of relying on fixed disk partitions, LVM allows
administrators to manage storage dynamically by abstracting physical storage into logical
components. This flexibility enables storage expansion, reorganization, and optimization without
significant downtime, making LVM an essential technology in modern system and network
administration.
The LVM architecture is based on three core components: Physical Volumes (PVs), Volume
Groups (VGs), and Logical Volumes (LVs). Physical volumes are disks or disk partitions that have
been initialized for LVM use. Multiple physical volumes are combined into a volume group, which
acts as a centralized storage pool. Logical volumes are created from the free space within a volume
group and function like standard disk partitions that can be formatted with a file system and
mounted for use.
The first step in implementing LVM is preparing disks or partitions as physical volumes using the
pvcreate command. For example, to initialize two disks for LVM usage:
This command displays information such as size, free space, and the volume group association.
Once physical volumes are ready, they are combined into a volume group using the vgcreate
command. The volume group represents a pool of available storage:
Volume groups can be extended later by adding new physical volumes, enabling easy storage
expansion without affecting existing data.
Creating Logical Volumes
Logical volumes are created from the available space in a volume group. These volumes are
flexible and can be resized as needed. For example, to create a 30GB logical volume:
After creation, the logical volume is formatted with a file system and mounted:
One of the major advantages of LVM is its ability to modify storage dynamically. Logical volumes
can be extended to accommodate growing data needs:
These operations allow administrators to scale storage efficiently without system downtime.
Advantages of LVM
While basic LVM operations focus on creating and resizing logical volumes, advanced LVM
concepts provide powerful features for enterprise-level storage management. These features
improve reliability, simplify administration, and support complex storage scenarios such as
backups, live system expansion, and recovery. Understanding advanced LVM concepts is essential
for system administrators managing large or mission-critical Linux systems.
One important advanced feature of LVM is snapshots. An LVM snapshot captures the state of a
logical volume at a specific point in time. Snapshots are commonly used for backups and testing
because they allow administrators to create a consistent copy of a file system without interrupting
system operations. For example, before performing a backup, a snapshot can be created:
The snapshot can then be mounted and backed up while the original logical volume continues to
operate. After use, the snapshot can be safely removed.
Thin Provisioning
Another advanced LVM concept is thin provisioning, which allows logical volumes to appear
larger than the actual available physical storage. Space is allocated only when data is written,
improving storage efficiency. Thin provisioning is especially useful in virtualization environments
where many virtual machines require logical volumes but do not fully utilize their allocated space.
However, administrators must carefully monitor usage to avoid over-allocation, which could lead
to storage exhaustion.
LVM stores metadata about physical volumes, volume groups, and logical volumes, which is
crucial for recovery in case of disk failures. Administrators can back up this metadata using:
This feature significantly improves system recoverability and minimizes data loss.
The system-config-lvm tool provides a graphical interface for managing LVM, making
advanced operations more accessible, especially for administrators who prefer GUI-based
management. With this tool, administrators can visually create, extend, reduce, and delete physical
volumes, volume groups, and logical volumes. It also displays real-time information about disk
usage and logical volume relationships, reducing the risk of configuration errors.
Advanced LVM allows data migration between physical volumes without downtime using the
pvmove command:
This is useful when replacing disks or balancing storage across devices. Logical volumes can also
be resized while mounted, depending on the file system type, further enhancing system
availability.
RAID (Redundant Array of Independent Disks) is a storage technology that combines multiple
physical disk drives into a single logical storage unit to improve performance, fault tolerance,
and data availability. RAID works by distributing data across multiple disks using techniques
such as striping, mirroring, and parity. Depending on the RAID level used, the system can
achieve higher speed, data redundancy, or a balance of both.
Key RAID Concepts
1. Disk Striping
2. Disk Mirroring
3. Parity
RAID is commonly used in servers, data centers, and critical systems where reliability and
uptime are essential.
1. Multiple Disk Drives: RAID requires at least two disks, depending on the RAID level.
2. Identical or Similar Disks (Recommended): Using disks of the same size, speed, and
type ensures optimal performance and prevents wasted storage.
3. RAID Controller or Software Support: RAID can be implemented using:
o A hardware RAID controller, or
o Software RAID tools such as mdadm in Linux.
4. Appropriate RAID Level Selection: The RAID level must be chosen based on system
requirements such as performance, fault tolerance, and cost.
5. Backup System: RAID is not a replacement for backups; external backups are still
necessary.
RAID Levels
1. RAID 0 (Striping)
RAID 0 uses data striping to split data evenly across multiple disks without any redundancy.
This improves performance but provides no fault tolerance.
Advantages
Disadvantages
No fault tolerance
Failure of one disk results in total data loss
Not suitable for critical data
Use Case
Temporary data, gaming systems, high-speed processing where data loss is acceptable.
2. RAID 1 (Mirroring)
RAID 1 duplicates data by writing identical copies to two or more disks. Each disk contains a
complete copy of the data.
Advantages
Disadvantages
Use Case
RAID 5 uses block-level striping with distributed parity, allowing the system to recover data if
one disk fails.
Advantages
Disadvantages
Use Case
RAID 6 is similar to RAID 5 but uses two parity blocks, allowing the system to tolerate two
simultaneous disk failures.
Advantages
Disadvantages
Use Case
RAID 10 combines mirroring (RAID 1) and striping (RAID 0), offering both performance and
redundancy.
Excellent performance
High fault tolerance
Fast rebuild times
Disadvantages
High cost
Only 50% usable storage
Use Case
Summary of RAID
Key idea
Data and parity are spread across all disks, not stored on a single parity disk.
Advantages of RAID-5
Fault tolerance
o Can survive failure of one disk
Efficient storage
o Only equivalent of one disk is used for parity
Good read performance
o Data is read from multiple disks in parallel
Cost-effective
o Better storage utilization compared to RAID-1
Limitations of RAID-5
Common tool:
/dev/md0
lsblk
Example disks:
/dev/sdb
/dev/sdc
/dev/sdd
Explanation:
--level=5 → RAID-5
--raid-devices=3 → number of disks
/dev/md0 → RAID device name
cat /proc/mdstat
You’ll see:
Synchronization progress
RAID status
df -h
Update initramfs
sudo update-initramfs -u
Add to /etc/fstab
Shows:
RAID level
Disk status
Failed or active devices
Real-time monitoring
/dev/sdc
Check:
Monitor with:
cat /proc/mdstat
During rebuild:
Parity is recalculated
Data is reconstructed
System remains usable (but slower)
Important risk:
If another disk fails during rebuild → total data loss
File servers
Departmental storage
Backup servers
Read-heavy workloads
High-write databases
Mission-critical systems without backup
Very large disks (slow rebuild risk)
Chapter 4: Network Management
4. Introduction
Modern computer systems rarely operate in isolation. Almost all servers, workstations, and
services depend on computer networks to communicate, share resources, and deliver services
such as web access, email, file sharing, and remote administration. As networks grow in size and
complexity, improper configuration or poor management can lead to service outages, security
vulnerabilities, performance degradation, and data loss. Therefore, effective network management
is a critical responsibility of system and network administrators.
This chapter introduces the TCP/IP networking model, which forms the backbone of modern
networks, and explains how Linux systems are configured to participate in networks. It covers how
a Linux machine can function not only as a client but also as a router and service provider,
delivering essential network services such as web hosting, DNS resolution, email transfer, proxy
caching, and dynamic IP address assignment. These services are fundamental in enterprise
networks, educational institutions, and data centers.
Security and remote management are also central themes of this chapter. Remote administration
tools such as SSH, SCP, and Rsync allow administrators to manage systems securely over
networks, replacing insecure legacy tools like Telnet. Concepts such as public-key authentication,
password-less login, remote command execution, and port forwarding are introduced to highlight
secure and efficient administration practices.
Overall, this chapter equips students with the knowledge and practical skills required to design,
configure, manage, and troubleshoot Linux-based networks and network services. By the end of
this chapter, students will understand how Linux systems communicate over networks, how
essential services are deployed, and how administrators maintain secure, reliable, and efficient
networked environments.
Computer networks exist to enable systems to communicate and share resources. However,
communication between different hardware platforms, operating systems, and vendors would be
impossible without a standardized communication model. The Transmission Control
Protocol/Internet Protocol (TCP/IP) suite was developed to solve this problem by providing a
common set of rules that allow heterogeneous systems to exchange data reliably across local and
global networks. Today, TCP/IP is the foundation of the Internet and nearly all modern networks.
TCP/IP is not a single protocol but a collection of protocols, each responsible for a specific
networking function. It defines how data is addressed, transmitted, routed, received, and
verified between devices. In Linux system administration, understanding TCP/IP is essential
because all network configuration, services, and troubleshooting tasks are built on this model.
The TCP/IP model is typically represented as a four-layer architecture, where each layer
performs a distinct role in data communication.
1. Application Layer
This layer provides network services directly to user applications. Protocols such as HTTP,
HTTPS, FTP, SMTP, DNS, and SSH operate at this level. In Linux, services like Apache (web
server), BIND (DNS), and Postfix (mail server) interact with the network through this layer.
2. Transport Layer
The transport layer is responsible for end-to-end communication, reliability, and flow control.
The two primary protocols are:
Administrators must understand the difference because service performance and reliability depend
on the correct transport protocol.
3. Internet Layer
This layer handles logical addressing and routing of packets across networks. The core protocol
here is IP (Internet Protocol). It ensures that data packets reach the correct destination using IP
addresses. Supporting protocols include ICMP (used for error reporting and diagnostics) and ARP
(used to map IP addresses to MAC addresses).
This layer defines how data is transmitted over physical networks. It includes technologies such
as Ethernet, Wi-Fi. Linux network interface configuration and hardware interaction occur at this
layer.
IP Addressing
IP addressing uniquely identifies devices on a network. There are two main versions:
IP addresses are divided into network and host portions, enabling efficient routing.
Administrators must understand subnetting, CIDR notation, and private vs public IP addresses
to properly design and manage networks.
Ports and Sockets
TCP/IP uses port numbers to identify specific services on a system. For example:
HTTP → Port 80
HTTPS → Port 443
SSH → Port 22
A socket is a combination of an IP address and a port number. Linux services listen on sockets to
accept network connections. Understanding ports is critical for service configuration and firewall
management.
A network interface represents a connection point between the system and a network. Common
interface names include eth0, ens33, enp0s3 (wired Ethernet) and wlan0 or wlp2s0
(wireless). Linux systems may have multiple interfaces, each serving different network roles.
Each interface can be configured independently with its own IP address, subnet mask, and status
(up or down).
IP Address Configuration
ip route
Proper routing configuration is essential for Internet access and inter-network communication.
DNS Configuration
Domain Name System (DNS) translates human-readable domain names into IP addresses. Without
DNS, users must rely on numeric IP addresses, which is impractical.
Example:
nameserver [Link]
nameserver [Link]
Correct DNS configuration ensures reliable name resolution for applications and services.
For permanent network settings, Linux distributions use configuration files or network
management tools such as NetworkManager or netplan. These ensure that network settings are
automatically applied at system startup.
Persistent configuration is critical for servers, as losing network connectivity after a reboot can
result in service downtime.
Testing Network Connectivity
After configuration, administrators must verify connectivity using tools such as:
Testing ensures that the system is correctly integrated into the network.
Linux, being a powerful and flexible operating system, can be configured to act as a router,
allowing it to:
Understanding how to configure a Linux system as a router helps system administrators reduce
costs, increase control, and build scalable networks.
What is a Router?
IP range: [Link]/24
Default gateway: [Link] (Linux router)
Enabling IP Forwarding
Temporary Method
echo 1 > /proc/sys/net/ipv4/ip_forward
Permanent Method
Using iptables:
Allow forwarding:
Limitations
Generally, configuring a Linux box as a router enables a system to forward traffic between
networks, provide internet sharing, and enforce security policies. This approach is cost-effective
and powerful, making Linux routers suitable for small networks, labs, and educational
environments.
Organizations, institutions, and individuals often need to publish information and services over
a network or the Internet. Examples include university websites, online portals, documentation
servers, and internal intranet applications. Without a properly configured web server, users cannot
access these resources in a reliable and standardized way.
A web server is a combination of software and hardware that stores, processes, and delivers
web content to clients over a network using the Hypertext Transfer Protocol (HTTP) or HTTPS.
The main function of a web server is to respond to requests from client devices, such as web
browsers, by sending web pages, images, videos, or other resources. When a user enters a website
address (URL) in a browser, the browser sends a request to the web server, which then locates the
requested resource and sends it back to the client for display.
From a system administration perspective, a web server is a network service that runs
continuously in the background as a daemon process, listening on well-known ports port 80 for
HTTP and port 443 for HTTPS. It must be properly configured, secured, and maintained to
ensure availability, performance, and reliability of web-based services.
In a networked environment, a web server acts as a central point for information distribution.
It enables multiple users to access shared resources simultaneously from different locations. Web
servers are widely used in organizations to host websites, intranet portals, learning management
systems, e-commerce platforms, and application backends. Without a web server, it would not be
possible to deliver standardized web content across networks or the Internet.
Static and Dynamic Web Content
Static content, which includes fixed files such as HTML pages, images, and videos that
are delivered exactly as stored on disk.
Dynamic content, which is generated at request time using server-side technologies such
as PHP, Python, or databases.
The web server determines how requests are processed and whether the content should be directly
delivered or generated dynamically before being sent to the client.
The Apache HTTP Server, commonly known as Apache, is an open-source web server software
widely used on Linux systems. It is designed to be modular, flexible, and extensible, allowing
administrators to enable or disable features based on system requirements. Apache is capable of
serving both static and dynamic web content and supports multiple websites on a single server
using virtual hosting.
Apache acts as the middle layer between clients (users) and web content stored on the server.
On Debian/Ubuntu-based systems:
On RHEL/CentOS/Rocky Linux:
Debian/Ubuntu: /var/www/html
RHEL/CentOS: /var/www/html
Example:
Virtual Hosts
Example configuration:
<VirtualHost *:80>
ServerName [Link]
DocumentRoot /var/www/example
</VirtualHost>
This enables:
Firewall Configuration
Allow traffic:
Logs record:
Client IP addresses
Requested pages
Errors and warnings
In summary, a web server is a fundamental network service responsible for delivering web content
to users. Apache, as one of the most widely used web servers on Linux, plays a critical role in
enabling web-based communication and services. Proper configuration and management of
Apache ensure secure, efficient, and reliable access to web resources in both local and global
networks.
The Domain Name System (DNS) is a distributed and hierarchical naming system used in
computer networks to translate human-readable domain names (such as [Link])
into IP addresses (such as [Link]) that computers use to identify each other on a
network. DNS functions as the Internet’s directory service, allowing users to access network
resources without needing to remember numerical IP addresses. Without DNS, users would have
to rely entirely on IP addresses to locate servers, which is inefficient and error-prone.
From a system and network administration perspective, DNS is a core network service that
supports almost all Internet and intranet communications, including web browsing, email delivery,
file transfers, and authentication services.
When a client attempts to access a network resource using a domain name, the DNS server receives
the query and responds with the corresponding IP address. This process enables seamless
communication between clients and servers. DNS improves usability, scalability, and
manageability of networks by separating naming from addressing. In enterprise networks, DNS
is also essential for locating internal services such as web servers, mail servers, and directory
servers.
The Domain Name System (DNS) is designed as a hierarchical and distributed system to
efficiently manage and resolve domain names across local and global networks. This hierarchical
structure ensures scalability, reliability, and fault tolerance, allowing DNS to function even with
billions of devices connected to the Internet. Instead of storing all domain information in a single
location, DNS divides responsibility across multiple levels of servers, each with a specific role in
the name resolution process.
There are 13 logical root server systems worldwide, identified by letters A through M, and each
is replicated globally using anycast technology to improve performance and reliability. Root
servers are critical infrastructure components, and their distributed design ensures that DNS
continues to operate even if some servers become unavailable.
Top-Level Domain servers manage information for domains at the highest level below the root,
such as:
TLD servers do not store detailed records for individual domains. Instead, they maintain
references to authoritative DNS servers for domains registered under them. For example, when
resolving [Link], the .com TLD server directs the resolver to the authoritative
DNS server responsible for [Link].
This separation allows efficient management of millions of domains under each TLD.
Authoritative DNS servers store the actual DNS records for a specific domain. These servers
provide definitive answers to DNS queries and are considered the final authority for domain
information. They contain zone files with records such as A, AAAA, MX, CNAME, NS, and PTR.
Authoritative servers can be:
Recursive DNS servers, also known as DNS resolvers, act on behalf of client machines. When a
client requests name resolution, the recursive server takes responsibility for finding the answer by
querying root servers, TLD servers, and authoritative servers as needed.
Once a recursive server resolves a query, it caches the result for a specified time (defined by the
Time To Live, TTL). This caching significantly improves performance, reduces network traffic,
and minimizes load on higher- level DNS servers.
Most organizations configure their clients to use a local recursive DNS server provided by:
Understanding these roles is critical when designing and managing network infrastructures.
These records define how domain names are resolved and how services are located.
BIND DNS Server Overview
BIND (Berkeley Internet Name Domain) is the most widely used DNS server software on Linux
and UNIX-like systems. It provides full support for authoritative and recursive DNS services and
is highly configurable. BIND is commonly used in enterprise networks, ISPs, and academic
institutions due to its flexibility and reliability.
A properly configured DNS server ensures accurate and efficient name resolution within a
network.
Both are important for troubleshooting, security, and service validation in enterprise networks.
DNS servers are critical infrastructure components and must be secured to prevent attacks such as
DNS spoofing, cache poisoning, and denial-of-service attacks. Common security practices include
access control, disabling unnecessary recursion, and keeping DNS software updated.
DNS misconfiguration can lead to service outages, making DNS administration a vital skill.
Summary
1. Introduction to BIND
BIND (Berkeley Internet Name Domain) is the most widely used DNS server software on Linux
and UNIX systems. It allows a Linux box to function as:
An authoritative DNS server
A recursive DNS resolver
A caching DNS server
Or a combination of these roles
In this section, we focus on configuring BIND as an authoritative DNS server for a local domain.
2. Problem Statement
In an organization or lab network, users may need to access internal servers using domain names
instead of IP addresses. For example:
3. Basic Requirements
On Debian/Ubuntu:
On RHEL/CentOS/Rocky:
File Purpose
/etc/bind/[Link] Main configuration file
/etc/bind/[Link] Global DNS options
/etc/bind/[Link] Local zone definitions
/var/cache/bind/ Zone files location
Example configuration:
options {
directory "/var/cache/bind";
listen-on { any; };
};
Edit:
Add:
zone "[Link]" {
type master;
file "/etc/bind/[Link]";
};
Example:
$TTL 604800
@ IN SOA [Link]. [Link]. (
2026021201 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
@ IN NS [Link].
ns1 IN A [Link]
www IN A [Link]
mail IN A [Link]
Explanation:
Add to [Link]:
zone "[Link]" {
type master;
file "/etc/bind/db.192.168.1";
};
Example:
$TTL 604800
@ IN SOA [Link]. [Link]. (
2026021201
604800
86400
2419200
604800 )
@ IN NS [Link].
5 IN PTR [Link].
10 IN PTR [Link].
20 IN PTR [Link].
A Mail Transfer Agent (MTA) is a software application responsible for sending, receiving, and
routing electronic mail (email) messages between mail servers using the Simple Mail Transfer
Protocol (SMTP). The MTA acts as the core component of an email system, ensuring that
messages are delivered from the sender’s mail server to the recipient’s mail server across local
networks or the Internet.
An MTA does not usually interact directly with users. Instead, it works in the background,
transferring messages between servers. Email clients such as Thunderbird or Outlook
communicate with the MTA to send outgoing messages, while incoming mail is handed over to
local delivery systems.
In simple terms:
An MTA is the “post office” of the Internet that transports emails between servers.
Component Function
MUA (Mail User Agent) User email client
MTA (Mail Transfer Agent) Transfers mail between servers
MDA (Mail Delivery Agent) Delivers mail to local mailbox
DNS (MX record) Locates destination mail server
It is widely used on Linux servers as a replacement for Sendmail due to its simpler configuration
and modular design.
Postfix supports:
SMTP, Mail queuing, Spam filtering integration, TLS encryption, Virtual domains and
Relay configuration
Organizations require email services for communication. Without a properly configured MTA:
Therefore, system administrators must configure and manage Postfix to ensure reliable and
secure email transmission.
On Ubuntu/Debian:
Important parameters:
RHEL:
To improve security:
smtpd_tls_cert_file=/etc/ssl/certs/[Link]
smtpd_tls_key_file=/etc/ssl/private/[Link]
smtpd_use_tls=yes
Common problems:
Wrong hostname
DNS MX record missing
Firewall blocking port 25
Open relay misconfiguration
A proxy server is an intermediary server that sits between client devices and external network
resources (such as the Internet). Instead of clients directly connecting to websites, they send their
requests to the proxy server, which then forwards the request to the destination server and returns
the response back to the client.
In simple terms: A proxy server acts as a middleman between users and the Internet.
A proxy cache server is a proxy server that temporarily stores copies of frequently accessed
web content (such as webpages, images, and files). When another client requests the same
content, the proxy server delivers it directly from its cache instead of downloading it again from
the Internet.
This improves:
Network performance
Bandwidth efficiency
Response time
Centralized monitoring and control
Proxy servers are common in: Schools, Universities, Government offices, & corporate networks
Squid is an open-source proxy caching server that supports: HTTP, HTTPS, FTP, Access
control, Logging and monitoring and Bandwidth management
4.7.6 Problem
On Ubuntu/Debian:
On RHEL/CentOS:
/etc/squid/[Link]
Log files:
/var/log/squid/[Link]
Cache directory:
/var/spool/squid/
Allow access:
Example:
cache_mem 256 MB
maximum_object_size 100 MB
Check status:
RHEL:
Set:
tail -f /var/log/squid/[Link]
When client browses websites, you should see log entries showing:
Client IP
Requested URL
Status code
Cache result
To block a website:
Add to [Link]:
Restart Squid:
4.7.17 Limitations
4.8. Network Configuration (IP Networking and Linux Network Configura tion)
4.9. Network Services
4.9.1. Dynamic Host Control Protocol (DHCP)
The Dynamic Host Configuration Protocol (DHCP) is a network management protocol used to
automatically assign IP configuration parameters to devices on a network. These parameters
include the IP address, subnet mask, default gateway, DNS server, and other network settings
required for communication. DHCP operates on a client-server model, where a central DHCP
server dynamically distributes network configuration information to client devices as they join the
network.
In modern networks, DHCP is essential because manual configuration of IP addresses for every
device is inefficient, time-consuming, and prone to human error. Without DHCP, administrators
would have to assign static IP addresses individually, which becomes impractical in environments
with many users or frequently changing devices.
IP address
Subnet mask
Default gateway
DNS server
1. Discover – When a client connects to the network, it broadcasts a DHCP Discover message
to find available DHCP servers.
2. Offer – The DHCP server responds with a DHCP Offer message containing an available
IP address and configuration details.
3. Request – The client replies with a DHCP Request message indicating that it accepts the
offered address.
4. Acknowledge – The server sends a DHCP Acknowledgment (ACK), officially assigning
the IP address to the client.
This process happens automatically and typically within seconds after a device connects to the
network.
DHCP does not permanently assign IP addresses. Instead, it provides them for a limited time
known as a lease period. When the lease expires, the client must renew the address. This
mechanism allows efficient reuse of IP addresses, especially in environments where devices
frequently connect and disconnect.
For example:
Lease management helps conserve address space and maintain network efficiency.
For example, in a [Link]/24 network, the DHCP server may assign addresses from:
[Link] – [Link]
In Linux systems, DHCP services are commonly provided by the ISC DHCP server package.
In larger networks with multiple subnets, DHCP requests cannot cross routers because they are
broadcast messages. In such cases, a DHCP relay agent is configured on the router to forward
DHCP requests to the DHCP server in another network.
This enables centralized DHCP management across multiple subnets.
Advantages of DHCP
This indicates that DHCP failed, and the system assigned an Automatic Private IP Address
(APIPA). This usually means:
The most widely used protocol for this purpose is the Network Time Protocol (NTP).
Time synchronization is extremely important in networked systems because many services depend
on accurate time.
In a network environment:
If servers and clients have different system times, troubleshooting becomes difficult and security
mechanisms may break.
What is NTP?
NTP (Network Time Protocol) is a protocol that synchronizes computer clocks over a network.
NTP Architecture
VNC (Virtual Network Computing) is a remote desktop sharing system that allows users to
control another computer over a network.
Problem Statement
In many situations:
VNC uses:
VNC Architecture
The server sends screen updates. The client sends keyboard/mouse input.
Example output:
This means:
Display number: :1
Port: 5901
[Link]:5901 or [Link]:1
Securing VNC
Better practice:
Advantages of VNC
Disadvantages
Remote Procedure Call (RPC) is a communication protocol that enables a program running on one
computer to execute a procedure or function on another computer across a network as if it were a
local function call. The main objective of RPC is to simplify distributed computing by hiding the
complexities of network communication from the programmer. Instead of manually handling
sockets, data serialization, and transmission protocols, RPC provides an abstraction layer that
allows remote interactions to appear similar to local function calls.
In distributed systems, services such as file sharing, authentication, database access, and printing
often run on separate servers. Applications running on client machines must interact with these
services to perform their tasks. Without RPC, developers would need to write complex networking
code to manage communication between systems. RPC solves this problem by introducing a
standardized mechanism for remote service invocation. This increases modularity, improves
scalability, and supports centralized service management.
RPC operates using a client-server architecture. When a client application calls a remote
procedure, the call is intercepted by a client-side stub. The stub converts the procedure call and its
parameters into a standardized format through a process called marshalling. The request is then
transmitted over the network to the server. On the server side, a corresponding stub receives the
request, unmarshals the parameters, and invokes the requested procedure. After execution, the
result is marshalled and sent back to the client. From the programmer’s perspective, the entire
process appears transparent.
In Unix and Linux systems, RPC plays a foundational role in several important services. One
prominent example is the Network File System (NFS), which allows users to access files over a
network as if they were stored locally. Another example is Network Information Service (NIS),
which manages centralized authentication and configuration data. These services rely on RPC
mechanisms to communicate between client and server systems.
An essential component supporting RPC in Linux environments is the rpcbind service. The rpcbind
daemon acts as a directory service for RPC programs by mapping RPC program numbers to
network port numbers. When a client needs to access an RPC service, it first contacts rpcbind to
determine the correct port number for that service. Without rpcbind, clients would not be able to
locate RPC services dynamically.
Despite its advantages, RPC has certain limitations. Because it depends heavily on network
communication, failures such as timeouts, packet loss, or unreachable servers can interrupt service
execution. Additionally, RPC services must be properly secured, as exposing remote procedure
interfaces without authentication can introduce security vulnerabilities. Firewall configurations
must also allow the necessary ports for RPC communication, which may complicate network
design.
The INET Super Server is a service management mechanism designed to efficiently control
multiple network services on a Unix or Linux system. Instead of running separate daemon
processes for every network service continuously, the super server listens for incoming connection
requests and launches the required service only when a request is received. This design conserves
system resources and centralizes service control.
Historically, early Unix systems ran individual server processes for services such as Telnet, FTP,
TFTP, and Finger. Each of these services remained active in memory even when no clients were
connected. This approach consumed unnecessary system resources, especially on systems with
limited memory and processing power. The INET Super Server was developed to solve this
inefficiency.
The traditional implementation of the super server is inetd, while a more advanced and secure
version is xinetd. Both perform similar functions, but xinetd provides enhanced features such as
improved logging, access control, and connection management. In modern Linux distributions,
systemd has largely replaced inetd/xinetd for many services, but understanding the super server
concept remains important for foundational knowledge.
The INET Super Server operates by listening on multiple ports defined in its configuration files.
When a connection request arrives on a specific port, the super server identifies the corresponding
service and spawns a process to handle that request. Once the service completes its task, the process
terminates. This on-demand service activation significantly reduces memory usage compared to
running persistent daemons.
Configuration of the super server is typically centralized. A main configuration file defines global
settings, while individual service configuration files specify parameters such as protocol type, port
number, executable path, user privileges, and access restrictions. This centralized configuration
simplifies administration and enhances security.
One of the key strengths of xinetd is its built-in security features. Administrators can restrict access
to specific IP addresses or networks, limit the number of simultaneous connections, define service
availability times, and enable detailed logging. These controls make the super server particularly
useful in controlled network environments such as academic labs or internal enterprise networks.
However, the INET Super Server also has limitations. Because services are started on demand,
there may be a slight delay during the initial connection as the service process is launched.
Additionally, for high-traffic services such as web servers or mail servers, continuous daemon
processes are more efficient than super server activation. For this reason, high-performance
services typically run independently rather than under xinetd management.
1️. Introduction
TCP/IP troubleshooting refers to the systematic process of identifying, diagnosing, and resolving
network connectivity problems in systems that use the TCP/IP protocol suite. In Linux and other
operating systems, TCP/IP forms the foundation of all network communication. When users
cannot access the internet, connect to servers, resolve domain names, or communicate between
devices, the issue is typically related to misconfiguration or failure within the TCP/IP stack.
Troubleshooting is not random guessing. It follows a structured and logical approach based on
understanding how networking layers function. Effective troubleshooting requires knowledge of
IP addressing, subnetting, routing, DNS resolution, interface configuration, and transport-layer
behavior.
In networked environments, multiple components must work correctly at the same time:
Physical connection (cables, NIC, switch ports)
IP configuration (IP address, subnet mask, gateway)
DNS resolution
Routing tables
Firewall rules
Running network services
Now we analyze essential TCP/IP troubleshooting tools used in Linux and Windows systems.
1️. ping
ping is a diagnostic utility used to test network connectivity between two devices using ICMP
(Internet Control Message Protocol) echo request and echo reply messages.
Purpose
If successful:
If failed:
Destination unreachable
Request timed out
Interpretation
Successful ping to local IP → interface working.
Successful ping to gateway → local network working.
Failed ping to internet but gateway works → routing or ISP issue.
Ping works to IP but not domain → DNS problem.
Purpose
Example: ifconfig
Shows:
Interface name (eth0, ens33)
IP address
Netmask
MAC address
Status (UP or DOWN)
Troubleshooting Use
5️. netstat
Options:
t → TCP
u → UDP
l → Listening
n → Numeric output
Used to verify:
Is web server listening on port 80?
Is SSH listening on port 22?
Renew DHCP:
ipconfig /release
ipconfig /renew
Used when:
In Linux and Unix-based systems, the most important and widely used remote administration tool
is SSH (Secure Shell). SSH allows secure command-line access to remote systems. In addition,
SCP (Secure Copy Protocol) is used to securely transfer files between systems over SSH.
Remote administration is essential in:
Data centers
Cloud environments
University labs
Enterprise networks
Virtual machine management
Without secure remote access, managing distributed systems would be inefficient and insecure.
In early networking environments, administrators used Telnet for remote login. However, Telnet
transmits data, including usernames and passwords, in plain text. This creates major security risks
because attackers can capture credentials using packet sniffing tools.
Encrypted communication
Secure authentication
Data integrity
Protection against eavesdropping
SSH solves these problems by encrypting all communication between client and server.
SSH (Secure Shell) is a cryptographic network protocol used to securely access and manage
remote systems over an unsecured network.
TCP Port 22
It provides:
Encrypted remote login
Secure command execution
Secure file transfer
Port forwarding
Tunneling
Port number
PermitRootLogin
PasswordAuthentication
AllowUsers
PubkeyAuthentication
ssh username@server_ip
Example:
ssh admin@[Link]
If successful:
SCP is a command-line utility that allows secure file transfer between local and remote systems
using SSH.
It encrypts both:
File contents
Authentication data
scp user@[Link]:/home/user/[Link] .
Authentication Methods
Password-Based Authentication
Public key
Private key
Process:
Advantages:
More secure
Resistant to brute-force attacks
Enables automated login (scripts)
SSH can execute commands without interactive login: ssh user@[Link] "ls -l"
Automation
Remote scripting
System monitoring
Use cases:
Advantages of SSH
Strong encryption
Secure authentication
Protection against packet sniffing
Supports automation
Cross-platform (Linux, Windows, macOS)
Disadvantages
Password-based authentication is simple but vulnerable to brute-force attacks, phishing, and weak
password policies. To enhance security, SSH supports public key cryptography for authentication.
SSH supports several cryptographic algorithms. Historically, two major types were:
RSA (Rivest–Shamir–Adleman)
DSA (Digital Signature Algorithm)
RSA
Widely used.
Strong and flexible.
Supports large key sizes (2048-bit, 4096-bit).
Recommended in modern systems.
DSA
Older standard.
Limited key size (1024-bit).
Considered less secure compared to RSA
Password-less Login
Password-less login refers to logging into a remote system without typing a password. It is
achieved through key-based authentication.
Advantages:
Stronger security.
Protection from brute-force attacks.
Enables automated scripts.
Useful for system administrators managing many servers.
Backup automation
Configuration management
Continuous integration systems
Remote monitoring tools
However, private keys must be protected carefully. If the private key is stolen, attackers can gain
unauthorized access.
5. Introduction
5.1 DHCP, DNS, Telnet server; compare with other NOS setup of corresponding network
services
5.2 Open SSH: Secure Network Communication
5.3 FTP and Setting-up Mail Servers and Client
5.4 Network Information Service (NIS) and Sharing File systems (NFS)
In multi-user and multi-server network environments, administrators face two major challenges:
If each Linux machine maintains its own local user database and local storage independently:
Together, NIS and NFS enable centralized identity management and shared storage in Unix/Linux
networks.
Network Information Service (NIS) is a distributed client-server directory service protocol used to
centralize system configuration data such as:
User accounts
Passwords
Group information
Hostnames
Originally developed by Sun Microsystems, NIS was historically known as "Yellow Pages (YP)."
Without NIS:
o Each machine has its own /etc/passwd and /etc/group.
o Administrators must manually create and maintain users on each system.
o Password changes must be repeated everywhere.
Administrative overhead
Inconsistent configurations
Security risks
NIS centralizes account management so that all systems use one shared database.
NIS Server (Master Server): Stores centralized user and group databases.
NIS Slave Server (Optional): Backup copy for redundancy.
NIS Clients: Query the NIS server for user authentication and account information.
Instead of reading only local /etc/passwd, clients retrieve account data from the NIS server.
NIS Architecture
Advantages of NIS
Disadvantages of NIS
Network File System (NFS) is a distributed file system protocol that allows users to access files
and directories on a remote server as if they were local files.
With NFS:
Without NFS:
With NFS:
To the user, the remote directory appears as part of the local file system.
Example concept:
NFS Versions
Disadvantages of NFS
In traditional Unix environments, NIS and NFS are often used together:
Security Considerations
Because both NIS and older NFS versions lack strong encryption:
Administrators should:
Use internal trusted networks only.
Restrict export access by IP.
Use NFSv4 with stronger authentication.
Consider replacing NIS with LDAP in modern environments.
Summary
Network Information Service (NIS) centralizes user and group account management across
multiple Linux systems. Network File System (NFS) provides centralized file sharing that allows
remote directories to be mounted as local file systems. Together, they simplify administration in
multi-user Linux environments, although they are gradually being replaced by more secure and
scalable technologies in modern enterprise networks.
1) What is SAMBA?
Samba is an open-source software suite that allows Linux/Unix systems to share files and
printers with Windows systems.
It implements the SMB/CIFS protocol used by Windows for file and printer sharing.
3) SAMBA Components
Component Description
smbd Provides file and printer sharing services
nmbd Handles NetBIOS name service and browsing
winbindd Integrates Linux with Windows Active Directory
[Link] Main configuration file
Example:
[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = ubuntu
security = user
map to guest = bad user
dns proxy = no
[SharedDocs]
path = /srv/samba/shared
browsable = yes
writable = yes
guest ok = yes
read only = no
[Printers]
path = /var/spool/samba
printable = yes
browseable = yes
From Windows:
From Linux:
8) Sharing Printers
1. Connect printer to Linux server.
2. Configure printer in SAMBA ([Link] [Printers] section).
3. Windows clients can access using \\IP_ADDRESS\PrinterName.
6. Introduction
7. Introduction
8. Introduction