Help!
Posted by Waste_Fish_4060@reddit | linuxadmin | View on Reddit | 3 comments
I need some help reviewing my labs that I created using AI and the RHCSA objectives. Please let me know if I need to update my labs. Any feedback you can provide would be greatly appreciated.
Objective: Commands, redirection, text processing, docs (Strengthen with more pipes + find/locate)
-
Create a directory called rhcsa_lab and cd into it.
-
Create 5 files and write content into each using echo (include multi-line content with heredoc).
-
Use: > to overwrite, >> to append, 2> and 2>&1 for errors, tee for simultaneous output.
-
Use grep with regex to find specific words/phrases in files (including -i, -v, -r).
-
Use awk to print: first column, second column, specific fields with conditions (e.g., only lines where column 3 > 100).
-
Use cut to extract characters/fields from each line; combine with tr for cleaning.
-
Pipe commands together: cat file | grep word | sort | uniq | wc -l — and more complex chains (e.g., with awk/sed).
-
View logs: cat /var/log/messages | less; also practice journalctl equivalents.
-
Save first 10 lines and last 20 lines into separate files (head/tail).
-
Use man pages and info: man ls, man grep, info coreutils.
-
Find documentation: cd /usr/share/doc; also use locate/find for files. ★ New: Create a script that processes a log file using grep/awk/cut/sort/uniq and outputs a summary report.
Objective: Permissions + links (Add ACLs and diagnosis depth)
-
Create file “planet” with text.
-
Create: hard link in /tmp, soft link in /tmp; break one and diagnose.
-
Change permissions: remove read from all, add write to group only; use numeric and symbolic modes.
-
Change ownership: user → your user, group → another group; recursive on directories.
-
Diagnose: Why can’t a user read/write a file? Fix it (include umask effects). ★ New: Set default ACLs on a directory for collaboration; test with another user.
Objective: User management (Add password policies and sudoers)
-
Create group “viltrumites”.
-
Create users: OmniMan, Invincible, AtomEve.
-
Assign: primary group, secondary group.
-
Set passwords; force password aging (chage).
-
Add one user to wheel group; configure sudoers for finer control if needed.
-
Test sudo access.
-
Switch users using: su - username.
-
Verify: id username, groups username. ★ New: Create a user with a custom shell and expire the account after 30 days.
Objective: dnf + repos (Critical RHEL 10 addition: Flatpak)
-
Check configured repositories (dnf repolist).
-
Install a package (httpd); remove it.
-
Search for packages; install from local rpm file.
-
Update system: dnf update -y. ★ New (Flatpak – must-add for RHEL 10): Install flatpak package; add Flathub repo; install/remove 2–3 Flatpak apps (e.g., Firefox, GIMP); list installed Flatpaks; install as user vs system-wide.
Objective: Services + processes (Add systemd depth)
-
Start and stop httpd; enable at boot.
-
Check service status; mask/unmask a service.
-
Find running processes: ps aux, top, htop if available.
-
Kill a process (graceful vs force).
-
View logs: journalctl; show logs for a service (journalctl -u httpd). ★ New: Create and manage a simple systemd timer unit (alternative to cron for modern emphasis).
Objective: MOST IMPORTANT RHCSA SECTION – Storage (Make it bulletproof)
-
Add new disk (VirtualBox/VMware – create 10–20 GB disk).
-
Create partition using fdisk (and practice parted for GPT).
-
Create physical volume: pvcreate.
-
Create volume group: vgcreate.
-
Create logical volume: lvcreate (various sizes).
-
Format: mkfs.xfs (also practice ext4).
-
Mount it: mount; make persistent in /etc/fstab using UUID (not device name).
-
Extend logical volume; resize filesystem (xfs_growfs) — non-destructively.
★ New/Enhanced: Break the mount (wrong fstab entry), troubleshoot, fix, and verify after reboot. Create a set-GID directory for collaboration on the new volume. Practice reducing LV safely if possible.
Objective: Networking + hostname
-
Show interfaces: ip a; nmcli.
-
Configure IP using nmcli (static and DHCP).
-
Set hostname persistently.
-
Configure DNS (resolv.conf or nmcli).
-
Restart network; test: ping google.com, curl. ★ New: Configure a bond or team (basic); add IPv6 address.
Objective: firewalld (Make it deeper and integrated)
-
Start firewalld; enable at boot.
-
Allow http service; add rich rule or port.
-
Reload firewall; verify rules (firewall-cmd –list-all).
-
Block a port; test from another system if possible. ★ New: Combine with service: configure httpd, open port in firewalld, verify access, then use SELinux context if needed.
Objective: SELinux basics (Expand to common exam scenarios)
-
Check mode: getenforce; setenforce (enforcing ↔ permissive).
-
View context: ls -Z; ps -eZ.
-
Restore context: restorecon -Rv.
-
Change boolean: getsebool -a; setsebool -P. ★ New/Enhanced: Create a file with wrong context, diagnose why httpd can’t serve it, fix with restorecon or semanage fcontext. Troubleshoot a port label issue (e.g., httpd on non-standard port).
Objective: tar, gzip (Add compression options)
-
Create archive: tar -cvf; with gzip/bzip2/xz.
-
Extract archive: tar -xvf.
-
Compress/uncompress: gzip, gunzip, bzip2, xz. ★ New: Create incremental backup with tar; exclude files.
Objective: cron + at (Modernize with systemd timers)
-
Create cron job: crontab -e; schedule every minute/hour.
-
Create one-time job: at now + 2 minutes.
-
Verify jobs. ★ New: Create a systemd timer that runs a script daily; compare with cron.
Objective: Remote access
-
SSH into another system (set up a second VM if possible).
-
Copy file using: scp, rsync.
-
Configure key-based authentication (ssh-keygen, ssh-copy-id). ★ New: Restrict SSH with firewalld + SELinux; test key auth failure scenarios.
Objective: Boot & targets (Add GRUB depth)
-
Reboot system; shut down gracefully.
-
Switch targets: systemctl isolate multi-user.target / graphical.target.
-
Set default target.
-
Basic GRUB understanding: edit kernel parameters at boot (e.g., single user mode), regenerate grub.cfg if needed. ★ New: Interrupt boot, enter rescue/emergency mode, reset root password (common exam scenario), then restore normal boot.
Objective: Create simple shell scripts (Make this one of your strongest areas)
-
Create a basic script with shebang (#!/bin/bash), make it executable (chmod +x), and run it.
-
Write a script that accepts command-line arguments ($1, $2, $@) and echoes them back (e.g., “Your parents names are $1 and $2”).
-
Use conditional logic:
• if/then/else or [ ] / test to check if a file exists, is empty, or a directory (build on your “empty” file script).
• case statement for a menu (expand your existing case script for top, iostat, free, dmesg, etc.).
-
Use loops:
• for loop to process a list of files or users (e.g., create multiple users from a file or rename files).
• while loop to read input line-by-line (e.g., read from a file or user input until done).
-
Process output of commands inside the script:
• Capture command output with $( ) or backticks.
• Redirect script output/errors (>, >>, 2>, tee).
• Example: Script that runs df -h, parses free space with awk/cut, and alerts if below a threshold.
-
Combine with other objectives:
• Script to automate user creation (read names from a file, create users with passwords, add to groups).
• Script to check system info (uptime, disk usage, logged-in users via who or last) and output a report.
• Script that installs a package (httpd) if not present, configures it, opens firewall port, and enables at boot.
-
Error handling basics: Check exit codes ($?), add simple logging.
-
Scheduling: Make a script that can be run via cron or at (e.g., daily backup or log summary). ★ Enhanced/Exam-style tasks:
• Write a script that takes a directory as argument ($1), lists files modified in last 24h, sorts by size, and outputs top 5.
• Create a script to bulk-process your “seinfeld-characters” style file: use loops + awk/cut/grep to generate filtered reports.
• Script with if/loop that checks disk usage (df), and if /home is >80% full, emails a warning (or just echoes it).
• Make scripts idempotent (safe to run multiple times without breaking things).
2Peti@reddit
He needs someone to work out the tasks for him and assess whether they are feasible. Well, probably. Because he can't do the tasks himself, that's why he wants it done by others.
Waste_Fish_4060@reddit (OP)
Thanks for your input even though I can complete these tasks
billdietrich1@reddit
Please use better, more informative, titles (subject-lines) on your posts. Give specifics right in the title. Thanks.