An administrator needs to verify the user ID, home directory, and assigned shell for the user named "accounting." Which of the following commands should the administrator use to retrieve this information?
User account information is centrally stored in the system's account databases, and Linux+ V8 emphasizes the use of standard tools to query this data safely and consistently.
The getent passwd accounting command retrieves the user's entry from the passwd database, which may be sourced from local files or network services such as LDAP. This entry includes the username, user ID (UID), group ID (GID), home directory, and assigned login shell. Therefore, option A provides all the requested information in a single command.
Option B, id accounting, displays the UID and group memberships but does not show the home directory or assigned shell. Option C is incorrect because /etc/shadow contains password hashes and expiration data, not shell or home directory information. Option D, who accounting, only shows login sessions and does not provide account configuration details.
Linux+ V8 documentation highlights getent passwd as the preferred method for retrieving comprehensive user account information because it works across different authentication backends.
Thus, the correct answer is A.
Users cannot access an application that is running inside containers. The administrator wants to validate whether the containers are running. Which of the following commands should the administrator use?
Container troubleshooting is a key competency within the Automation, Orchestration, and Scripting domain of CompTIA Linux+ V8. When users report that an application running inside containers is not accessible, one of the first validation steps is to confirm whether the containers are currently running.
The docker ps command is specifically designed to list running containers on the system. By default, it displays container IDs, image names, command executed, uptime, port mappings, and container names. This allows administrators to quickly determine whether the application container is active and whether it is exposing the expected ports. This aligns directly with Linux+ V8 guidance on container lifecycle management and operational validation.
The other options are not suitable for this purpose. docker start is used to start one or more stopped containers but does not display container status. docker run creates and starts a new container, which is not appropriate when the goal is only to check the status of existing containers. docker images lists locally available container images but provides no information about running or stopped containers.
Linux+ V8 documentation emphasizes the importance of using the correct Docker subcommands when diagnosing containerized applications. Verifying container runtime state using docker ps is a foundational troubleshooting step before investigating networking, firewall rules, or application-level errors.
Therefore, the correct command to validate whether containers are running is docker ps, making Answer B correct.
A Linux administrator is testing a web application on a laboratory service and needs to temporarily allow DNS and HTTP/HTTPS traffic from the internal network. Which of the following commands will accomplish this task?
Comprehensive and Detailed Explanation From Exact Extract:
The correct way to temporarily allow specific services in a particular zone with firewalld is to use firewall-cmd --add-service=service --zone=zone. Multiple services can be specified in curly braces and separated by commas. The correct syntax is:
bash
CopyEdit
firewall-cmd --add-service={dns,http,https} --zone=internal
This command will allow DNS (port 53), HTTP (port 80), and HTTPS (port 443) through the firewall for the 'internal' zone temporarily (for the current runtime session).
Other options:
A . The command syntax is incorrect; firewalld is a service, not a command-line tool.
B . iptables does not use the --enable-service flag, nor does it have zones in this way.
D . systemctl mask disables services, and the rest of the command is invalid.
CompTIA Linux+ Study Guide: Exam XK0-006, Sybex, Chapter 9: 'Networking', Section: 'Managing Firewalls with firewalld'
CompTIA Linux+ XK0-006 Objectives, Domain 2.0: Networking
===========
A Linux administrator attempts to log in to a server over SSH as root and receives the following error message: Permission denied, please try again. The administrator is able to log in to the console of the server directly with root and confirms the password is correct. The administrator reviews the configuration of the SSH service and gets the following output:

Based on the above output, which of the following will most likely allow the administrator to log in over SSH to the server?
The SSH configuration option PermitRootLogin prohibit-password prevents the root user from logging in with password authentication. This setting means root cannot use a password to log in via SSH; only key-based authentication is permitted for root. The administrator can still log in as root locally, which is not affected by this SSH configuration. To allow SSH access as root, the administrator must use an SSH key instead of a password.
Other options:
A . MaxSessions controls the number of simultaneous SSH sessions but is not causing the login denial here.
B . PAM (Pluggable Authentication Modules) is disabled, but enabling it is not required for basic SSH authentication.
C . Changing the SSH port is unrelated to the authentication method issue.
CompTIA Linux+ Study Guide: Exam XK0-006, Sybex, Chapter 11: 'Securing Linux', Section: 'Securing SSH Access'
CompTIA Linux+ XK0-006 Objectives, Domain 3.0: Security
Which of the following utilities supports the automation of security compliance and vulnerability management?
Security compliance and vulnerability management are critical components of Linux system administration, and CompTIA Linux+ V8 places strong emphasis on automated security assessment tools. OpenSCAP is specifically designed to address these requirements.
OpenSCAP is an open-source framework that implements the Security Content Automation Protocol (SCAP), a set of standards used for automated vulnerability scanning, configuration compliance checking, and security auditing. It allows administrators to assess Linux systems against established security baselines such as CIS benchmarks, DISA STIGs, and organizational security policies. This makes OpenSCAP the most appropriate tool for automating both compliance and vulnerability management.
The other options serve different security-related purposes but do not fulfill the automation requirement. SELinux is a mandatory access control system that enforces security policies at runtime but does not perform compliance scanning or vulnerability assessments. Nmap is a network scanning and discovery tool used to identify open ports and services, not compliance automation. AIDE (Advanced Intrusion Detection Environment) is a file integrity monitoring tool that detects unauthorized file changes but does not evaluate overall system compliance.
Linux+ V8 documentation highlights OpenSCAP as a tool used to automate security audits, generate compliance reports, and integrate with configuration management workflows. Its ability to standardize security checks across multiple systems makes it essential in enterprise and regulated environments.
Therefore, the correct answer is D. OpenSCAP.
Currently there are no comments in this discussion, be the first to comment!