A systems administrator is helping to secure a new web application. During the tests, the administrator obtains the following output to validate the application:
SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
ALPN, server accepted to use http/1.1
Server certificate:
subject: CN=*.newapp.comptia.org
start date: Jan 17 00:00:00 2024 GMT
expire date: Feb 16 23:59:59 2034 GMT
issuer: C=US; O=Comptia; OU=IT Security; CN=ca1.comptia.org
SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
Which of the following explains the validation results?
Answer : A
The correct answer is A. The certificate was not signed by a trusted authority, which was forcefully ignored during the tests. The key indicator in the output is the message: ''SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.'' This error means that the client system cannot validate the certificate chain because it does not recognize or trust the certificate authority (CA) that issued the server certificate.
In TLS/SSL validation, the client must verify that the server's certificate chains up to a trusted root CA present in the local trust store. If the issuer (in this case, ca1.comptia.org) is not included in the client's trusted certificate authorities, the verification fails. However, the phrase ''continuing anyway'' indicates that the validation failure was bypassed---likely due to a testing flag such as -k or --insecure in curl---allowing the connection despite the trust issue.
Option B is incorrect because the certificate validity dates show it is valid from 2024 to 2034, not expired.
Option C is incorrect because wildcard certificates (e.g., *.newapp.comptia.org) are commonly used and not inherently insecure when properly managed.
Option D is incorrect because the cipher suite shown (ECDHE-RSA-AES256-GCM-SHA384) is considered strong and modern, not outdated.
From a Linux+ security perspective, proper certificate validation is critical. Administrators should ensure that the issuing CA is trusted by installing the correct CA certificates rather than bypassing validation, which exposes systems to man-in-the-middle attacks and other security risks.
A Linux user runs the following command:
nohup ping comptia.com &
Which of the following commands should the user execute to attach the process to the current terminal?
Answer : D
In Linux system management, controlling processes and job execution is a fundamental skill covered extensively in the CompTIA Linux+ V8 objectives. The command shown combines two important concepts: nohup and background execution using &.
The nohup command is used to run a process immune to hangup signals, meaning the process continues running even after the user logs out or the terminal session ends. By default, nohup detaches the process from the controlling terminal and redirects standard output and standard error to a file named nohup.out. When the ampersand (&) is appended, the process is immediately placed into the background, allowing the shell prompt to return without waiting for the command to finish.
Linux provides job control mechanisms that allow users to manage background and foreground processes within a shell session. The fg command is specifically designed to bring a background job into the foreground and reattach it to the current terminal. Once a job is in the foreground, it can receive input from the terminal and display output directly, and it can also be interrupted using signals such as Ctrl+C.
The other answer choices do not fulfill this requirement. The renice command is used to change the scheduling priority of a running process but does not affect terminal attachment. The jobs command only lists background and stopped jobs associated with the current shell and does not modify their execution state. The exec command replaces the current shell process with a new process, which is unrelated to resuming or attaching background jobs.
According to Linux+ V8 documentation and job control best practices, the correct command to attach a background process to the current terminal is fg. Therefore, option D is the correct answer.
An administrator wants to search a file named myFile and look for all occurrences of strings containing at least five characters, where characters two and five are i, but character three is not b. Which of the following commands should the administrator execute to get the intended result?
Answer : D
Pattern matching using regular expressions is a key troubleshooting and text-processing skill covered in CompTIA Linux+ V8. The grep command, combined with regular expressions, allows administrators to search for complex string patterns within files.
The requirement specifies:
The string must contain at least five characters
Character 2 must be i
Character 3 must not be b
Character 5 must be i
To meet these conditions, the correct regular expression structure is:
any character (position 1)
i literal i (position 2)
[^b] any character except b (position 3)
any character (position 4)
i literal i (position 5)
This results in the expression:
i[^b].i
Option D, grep .i[^b].i myFile, correctly implements this logic. It ensures positional matching and excludes unwanted characters using a negated character class ([^b]), which is explicitly covered in Linux+ V8 regular expression objectives.
The other options contain invalid or malformed regular expressions and do not meet the positional or exclusion requirements. Linux+ V8 emphasizes understanding anchors, character classes, and position-based matching when troubleshooting log files or configuration data.
Therefore, the correct answer is D.
Which of the following can be implemented with PAM to detect and block dictionary attacks?
Answer : A
Pluggable Authentication Modules (PAM) provide a flexible, centralized mechanism for managing authentication across various services in a Linux system. According to the CompTIA Linux+ V8 security domain, protecting against 'dictionary attacks' and 'brute-force' attempts is a critical hardening step. A dictionary attack involves an automated script attempting thousands of common passwords against a user account.
To mitigate this, administrators use pam_tally2 (or the newer pam_faillock on some systems). The pam_tally2 module is specifically designed to keep track of failed login attempts for each user. It can be configured in the PAM stack (such as /etc/pam.d/common-auth or /etc/pam.d/password-auth) to lock an account after a specified number of consecutive failed attempts (e.g., deny=5). Once the threshold is reached, the user is blocked from further attempts for a set period or until an administrator manually resets the counter. This effectively stops automated dictionary attacks from continuing indefinitely.
The other options serve different purposes. pam_limits (Option B) is used to set resource limits (like CPU time or number of open files) for users once they are already logged in. pam_unix (Option C) is the standard module for traditional /etc/passwd and /etc/shadow authentication. pam_ldap (Option D) allows the system to authenticate against a remote LDAP directory.
While these modules are part of the PAM ecosystem, only pam_tally2 is designed for tracking and acting upon failed login counts to block attacks.
A Linux administrator receives reports about MySQL service availability issues. The administrator observes the following information:
uptime -p shows the system has been up for only 2 minutes
journalctl shows messages indicating:
mysqld invoked oom-killer
mysqld cpuset=/ mems_allowed=0
Which of the following explains why the server was offline?
Answer : A
This scenario clearly indicates a memory exhaustion condition, which falls under the Troubleshooting domain of the CompTIA Linux+ V8 objectives. The most critical clue is the log entry stating that mysqld invoked oom-killer.
The OOM (Out-Of-Memory) killer is a Linux kernel mechanism that activates when the system runs critically low on available memory and cannot satisfy memory allocation requests. When this happens, the kernel selects a process---typically one consuming a large amount of memory---and forcibly terminates it to protect overall system stability. In this case, the MySQL daemon (mysqld) was identified as the process responsible for triggering the OOM condition.
The journalctl output explicitly confirms this behavior. Linux+ V8 documentation emphasizes that when the OOM killer is invoked, it is almost always due to physical memory exhaustion or insufficient swap space, not user intervention or application bugs alone. The additional log line showing mems_allowed=0 further supports the conclusion that the process could not allocate memory from available memory nodes.
The fact that uptime -p reports only 2 minutes of uptime strongly suggests that the system was either rebooted automatically or manually following the memory exhaustion event. Systems may reboot as part of recovery procedures after severe resource exhaustion, especially in production environments.
The other options can be ruled out. There is no indication of a user-initiated kill signal, filesystem corruption, or network connectivity issues. Network outages would not generate OOM killer messages, and filesystem errors would appear as I/O or disk-related errors in the logs.
Linux+ V8 best practices recommend addressing OOM issues by increasing system memory, tuning MySQL memory parameters, configuring swap space, or adjusting OOM scoring.
Therefore, the correct explanation is A. The process exhausted server memory.
On a Kubernetes cluster, which of the following resources should be created in order to expose a port so it is publicly accessible on the internet?
Answer : C
Container orchestration concepts are part of the Automation and Orchestration domain in Linux+ V8. In Kubernetes, workloads run inside Pods, but Pods are not directly accessible from outside the cluster.
To expose an application externally, a Service resource must be created. Services provide a stable network endpoint and can be configured as NodePort, LoadBalancer, or ClusterIP. Public exposure is typically achieved using NodePort or LoadBalancer types.
Option C, Service, is correct. Deployments manage Pods, but they do not handle networking exposure. Pods represent running containers but lack external accessibility by default. ''Network'' is not a valid Kubernetes resource type.
Linux+ V8 documentation highlights Services as the mechanism for exposing containerized applications. Therefore, the correct answer is C.
A Linux administrator notices that an application is having trouble connecting to an external database. Which of the following commands should the administrator use to validate the connection to the remote port exposed by a database server?
Answer : B
The correct answer is B. nc -v db.comptia.org 3306 because the nc (netcat) command is commonly used to test connectivity to a specific host and port. In this scenario, the administrator needs to verify whether the database service (commonly running on port 3306 for MySQL) is reachable from the system. The -v (verbose) flag provides detailed output about the connection attempt, including whether the connection was successful or refused.
Using nc in this way allows administrators to quickly determine if the issue is related to network connectivity, firewall restrictions, or the service not listening on the expected port. If the connection succeeds, it confirms that the port is open and reachable. If it fails, further troubleshooting can focus on firewall rules, routing, or service availability.
Option A (dig MX db.comptia.org:3306) is incorrect because dig is used for DNS queries, specifically to retrieve DNS records such as MX (mail exchange) records. It does not test port connectivity.
Option C (arp -an | grep db.comptia.org | grep 3306) is incorrect because arp displays the ARP table (IP-to-MAC address mappings) and does not provide information about TCP/UDP port connectivity.
Option D (ss -plant | grep 3306) is incorrect because ss displays local socket statistics and listening ports on the current system. It does not test connectivity to a remote host.
From a Linux+ troubleshooting perspective, tools like nc, telnet, and curl are essential for validating service availability and diagnosing connectivity issues. Netcat is particularly versatile and widely used for quick port checks in network troubleshooting workflows.