Day 3 Summary
This summary covers the third day's topics, including user account management, controlling system services, building virtual machines, and basic network configuration.
Session 7: MANAGING USER ACCOUNTS
This session covers the principles and tools for managing user and group accounts, which is a fundamental task for any system administrator.
User Private Group (UPG) Scheme
Red Hat uses a User Private Group scheme where each new user is automatically assigned to a unique group with the same name. This enhances security for file sharing and collaboration.
Key Administration Files
/etc/passwd: Contains user account information (username, UID, GID, home directory, shell)./etc/shadow: Stores secure user account information, including encrypted passwords and password aging policies./etc/group: Defines all user groups on the system.
User and Group Management Commands
| Command | Description |
|---|---|
useradd <user> | Creates a new user account. |
usermod <options> <user> | Modifies an existing user's properties (e.g., shell, groups). |
userdel -r <user> | Deletes a user and their home directory. |
groupadd <group> | Creates a new group. |
passwd <user> | Sets or updates a user's password. |
chsh -s <shell> <user> | Changes a user's default login shell. |
Session 8: USING SYSTEMD AND CONTROLLING SERVICES
This session focuses on systemd, the modern init system in RHEL used for managing system services, processes, and startup procedures.
The systemd Daemon
systemd is the first process started by the kernel (PID 1) and is responsible for initializing the system. It manages resources as "units," which can be services, sockets, mount points, or devices.
Controlling Services with `systemctl`
The systemctl command is the primary tool for interacting with systemd to manage services.
| Command | Description |
|---|---|
systemctl status <service> | View the detailed status of a service. |
systemctl start <service> | Starts a service immediately. |
systemctl stop <service> | Stops a service immediately. |
systemctl restart <service> | Stops and then starts a service. |
systemctl enable <service> | Configures a service to start automatically on boot. |
systemctl disable <service> | Prevents a service from starting on boot. |
systemctl is-enabled <service> | Checks if a service is configured to start on boot. |
Session 9: BUILDING A VIRTUAL MACHINE
This session introduces virtualization on RHEL using KVM (Kernel-based Virtual Machine), allowing you to run multiple operating systems on a single physical host.
Virtualization Concepts
KVM is a Type-1 hypervisor built directly into the Linux kernel, providing an efficient and robust platform for creating and managing virtual machines (VMs).
Management Tools
Virtual machines can be created and managed using both graphical and command-line tools.
| Tool | Description |
|---|---|
virt-manager | A graphical user interface for creating, managing, and viewing virtual machines. |
virsh | A command-line utility for managing VMs and the hypervisor (start, stop, list, etc.). |
virt-install | A command-line tool for provisioning new virtual machines. |
Session 10: BASIC CLIENT NETWORKING
This session covers the fundamental tasks for configuring network connectivity on a RHEL system, from setting the hostname to securing remote connections.
Hostname and IP Configuration
Network settings are managed by the NetworkManager service. The nmcli (command-line) and nmtui (text-based UI) tools are used for configuration.
Key Networking Commands
| Command | Description |
|---|---|
hostnamectl set-hostname <name> | Sets the system's hostname persistently. |
nmcli device status | Lists network interfaces and their status. |
ip addr show | Displays IP addresses assigned to all interfaces. |
chronyc sources | Checks the status of NTP time sources. |
ssh user@host | Connects to a remote system securely via SSH. |
scp <source> user@host:<dest> | Securely copies files between systems. |
tcpdump -i <interface> | Captures and analyzes network packets on a specific interface. |