SCA_SLES15 MCQs
SCA_SLES15 TestPrep SCA_SLES15 Study Guide SCA_SLES15 Practice Test SCA_SLES15 Exam Questions
killexams.com
SCA in SUSE Linux Enterprise Server 15
https://killexams.com/pass4sure/exam-detail/SCA
_SLES15In a scenario where you are configuring remote access via RDP, which of the following security measures should you implement to protect the server from unauthorized access?
Use a strong password policy for RDP users
Allow all incoming connections on port 3389
Disable network-level authentication
Allow RDP access for all users
Answer: A
Explanation: Implementing a strong password policy for RDP users is crucial for protecting the server from unauthorized access, while other options increase security risks.
In a SUSE Linux Enterprise Server 15 environment, you are auditing a script that processes user input files. The script uses the cut command to extract specific fields from a CSV file located at /data/users.csv, which has the format: username,uid,home_dir,shell. The script snippet is:
cut -d',' -f1,3 /data/users.csv > /tmp/user_info.txt
You notice that some usernames contain commas, causing incorrect field extraction. How should you modify the command to robustly extract only the username and home directory fields, handling commas within fields correctly?
Use awk -F',' '{print $1 "," $3}' /data/users.csv > /tmp/user_info.txt
Preprocess the file with sed 's/,"[^"]*",/,/g' /data/users.csv | cut -d',' -f1,3 > /tmp/ user_info.txt
Replace cut with csvcut -c 1,3 /data/users.csv > /tmp/user_info.txt
Use cut -d',' --complement -f2,4 /data/users.csv > /tmp/user_info.txt
Answer: C
Explanation: The cut command assumes a simple delimiter and cannot handle commas within quoted fields, which is common in CSV files. The csvcut command, part of the
csvkit package, is designed for CSV parsing and correctly handles quoted fields with embedded commas. Using csvcut -c 1,3 extracts the first and third columns (username and home_dir) accurately. The awk approach suffers the same issue as cut. The sed preprocessing is complex and error-prone. The --complement doesn???t address quoted fields.
On a SUSE Linux Enterprise Server 15 SP5 system, you are investigating a disk space issue caused by large log files. The /etc/logrotate.conf is configured with weekly and rotate 4, but the /etc/logrotate.d/syslog specifies daily and rotate 7 for /var/log/messages. A recent spike in logging activity caused /var/log/messages to grow to 2GB before rotation. Which command would you run to manually trigger log rotation for /var/log/ messages and verify the rotation occurred?
logrotate -f /etc/logrotate.conf
systemctl restart logrotate
logrotate -v /etc/logrotate.d/syslog
logrotate -d /etc/logrotate.d/syslog
Answer: C
Explanation: The logrotate -v command runs logrotate in verbose mode, processing the specified configuration file (/etc/logrotate.d/syslog) and showing the actions taken, allowing verification of rotation for /var/log/messages. The -f option (A) forces rotation for all logs in /etc/logrotate.conf, which is unnecessary. Restarting logrotate (
does not trigger immediate rotation. The -d option (
runs in debug mode without performing rotation.
In a situation where you need to revert a logical volume "data_lv" back to its previous state after making changes, which command would you use if a snapshot named "data_snapshot" was created?
lvmerge data_snapshot
lvconvert --merge data_snapshot
lvremove data_snapshot
lvsnapshot --restore data_snapshot
Answer: B
Explanation: The lvconvert --merge command is used to merge a snapshot back to its original logical volume, effectively reverting it to its previous state.
You are tasked with creating a symbolic link to a file called original.txt in a different directory called backup. Which command would achieve this?
cp -s original.txt backup/
ln original.txt backup/
ln -s original.txt backup/
link original.txt backup/
Answer: C
Explanation: The ln -s command creates a symbolic link to original.txt in the backup directory, allowing access to the original file from the new location.
To test the network connectivity specifically to a remote host and ensure that the expected response time is within acceptable limits, which command would you most appropriately use?
ping -c 10
traceroute
nslookup
netstat -r
Answer: A
Explanation: The command ping -c 10 sends 10 ICMP echo requests to the specified host, allowing you to assess both connectivity and response times effectively.
In a high-availability setup, you must ensure that your LVM configuration survives a system crash. Which command should you run to ensure that your changes are saved to the metadata?
lvscan
lvmdiskscan
vgextend
vgcfgrestore
Answer: D
Explanation: The vgcfgrestore command restores the volume group from a backup of its metadata, ensuring configuration persistence after crashes.
You are managing a SUSE Linux Enterprise Server 15 SP6 system hosting a web application. The application logs are managed by rsyslog, and you need to ensure that all logs with a priority of ???warning??? or higher from the application (facility local0) are sent to a dedicated file /var/log/webapp.log, while other logs continue to /var/log/messages. Which configuration snippet should you add to /etc/rsyslog.conf to achieve this without disrupting existing logging?
local0.warning /var/log/webapp.log
*.* /var/log/messages
local0.>=warning /var/log/webapp.log
*.*;local0.none /var/log/messages
local0.* /var/log/webapp.log
*.* /var/log/messages
local0.warning /var/log/webapp.log stop
Answer: B
Explanation: To filter logs with facility local0 and priority warning or higher to /var/log/ webapp.log, use local0.>=warning. To prevent these logs from also going to /var/log/ messages, add ;local0.none to the . rule, excluding local0 logs from /var/log/messages. Option A does not exclude local0 logs from /var/log/messages, causing duplication. Option C captures all local0 priorities, not just warning or higher. Option D uses stop, which halts further processing, potentially breaking other logging rules.
What is the primary purpose of the /etc/lvm/lvm.conf file in a SUSE Linux environment?
It stores user-defined volume group names.
It defines the physical volumes available to the system.
It logs all LVM-related commands executed.
It contains configuration settings for LVM operations.
Answer: D
Explanation: The /etc/lvm/lvm.conf file is crucial as it contains configuration settings that affect how LVM behaves, including filters for physical volumes and other operational parameters.
In a SLE201v15 lab, you are configuring a SLES 15 SP4 system to use Btrfs with snapshots for system recovery. Given the command snapper create --type pre before a system update, which command restores the system to the pre-update state?
btrfs subvolume snapshot
snapper undochange
snapper --config root restore
snapper rollback
Answer: D
Explanation: The snapper rollback command restores the system to a previous snapshot, such as the pre-update state created with snapper create --type pre. undochange reverts specific changes, --config restore is not a valid option, and btrfs subvolume snapshot creates snapshots manually.
If a system administrator needs to install a group of related packages using Zypper, which command should be used?
zypper install --group package_group_name
zypper in package_group_name
zypper install --bundle package_group_name
zypper install --set-group package_group_name
Answer: B
Explanation: The command zypper in package_group_name installs all packages associated with the specified group by name.
In a systemd service unit, which of the following directives indicates that a service should only be started when the specified target is active and the service is not already running?
After=
Wants=
ConditionPathExists=
OnFailure=
Answer: B
Explanation: The "Wants=" directive creates a weak dependency, indicating that the specified target should be active for the service to start, without enforcing it strictly.
In a SUSE Linux Enterprise Server 15 environment, you are auditing file types and find a file /dev/null with a c in its ls -l output. What type of file is this, and what is its primary use?
Character device; discards data
Block device; stores data
Regular file; logs errors
Symbolic link; redirects data
Answer: A
Explanation: The /dev/null file is a character device, indicated by a c in ls -l. Its primary use is to discard data written to it, acting as a ???black hole??? for output redirection, and it returns an EOF when read. It is not a block device, regular file, or symbolic link.
In a multi-homed system, how does the kernel determine which routing table to use for outgoing packets when multiple default gateways are configured?
It selects the gateway with the lowest metric.
It uses the first defined gateway.
It randomly selects a gateway.
It prioritizes the gateway based on interface speed.
Answer: A
Explanation: The kernel uses the routing table entry with the lowest metric when determining the default gateway for outgoing packets, ensuring optimal routing.
You need to mount a filesystem at boot time with specific options for noexec and nodev. Which configuration file should be modified, and what would the line look like for the device /dev/sdb1?
/etc/mtab /dev/sdb1 /mnt/data ext4 defaults,noexec,nodev 0 2
/etc/fstab /dev/sdb1 /mnt/data ext4 defaults,noexec,nodev 0 2
/etc/fstab /mnt/data /dev/sdb1 ext4 defaults,noexec,nodev 0 2
/etc/mtab /mnt/data /dev/sdb1 ext4 defaults,noexec,nodev 0 2
Answer: B
Explanation: The /etc/fstab file is used to configure filesystems to be mounted automatically at boot. The specified line includes the device, mount point, filesystem type, and options such as noexec and nodev.
On a SUSE Linux Enterprise Server 15 SP6 system, you are tasked with ensuring that systemd-journald logs are forwarded to a remote rsyslog server at 192.168.1.200 over UDP port 514 for centralized monitoring. The journald configuration must remain persistent, and local journal logs should also be retained. Which configuration changes should you make to /etc/systemd/journald.conf and /etc/rsyslog.conf to achieve this?
journald.conf: ForwardToSyslog=yes Storage=persistent
rsyslog.conf:
*.* @192.168.1.200:514
journald.conf: ForwardToSyslog=no Storage=persistent rsyslog.conf:
*.* @192.168.1.200:514
journald.conf: ForwardToSyslog=yes Storage=volatile rsyslog.conf:
*.* @192.168.1.200:514
journald.conf: ForwardToSyslog=yes Storage=persistent rsyslog.conf:
*.* @@192.168.1.200:514
Answer: A
Explanation: Setting ForwardToSyslog=yes in journald.conf ensures journald forwards logs to rsyslog, and Storage=persistent retains local journal logs on disk. In rsyslog.conf,
. @192.168.1.200:514 sends all logs to the remote server over UDP (single @).
You are managing a SUSE Linux Enterprise Server 15 system where a critical application service (app.service) must be part of a custom systemd target (app-stack.target). The target should pull in app.service and db.service, ensuring they start after network- online.target. The target must be active in the multi-user.target runlevel. Which target unit file configuration is correct?
[Unit] Requires=app.service db.service, After=network.target, WantedBy=graphical.target
[Unit] Wants=app.service db.service, After=network-online.target, WantedBy=multi- user.target
[Unit] After=app.service db.service, Requires=network-online.target, PartOf=multi- user.target
[Unit] Wants=network-online.target, Requires=app.service db.service, WantedBy=default.target
Answer: B
Explanation: Wants=app.service db.service pulls in the services without failing if they fail. After=network-online.target ensures proper ordering. WantedBy=multi-user.target ties the target to the multi-user.target. Requires is too strict, After for services is incorrect, and graphical.target or default.target are not suitable.
While trying to terminate an unresponsive process, you notice that it is in a "stopped" state. What command would you use to resume its execution?
kill -CONT
fg
bg
resume
Answer: A
Explanation: The kill -CONT command sends the CONT signal to the specified process, resuming its execution from the stopped state.
If a system administrator wishes to check which files belong to a specific RPM package, what command should be executed?
rpm -qa | grep package_name
rpm -ql package_name
rpm -qf file_path
rpm -q --filesbypkg package_name
Answer: C
Explanation: The rpm -qf file_path command queries the RPM database to find which package a specific file belongs to.
A SUSE Linux Enterprise Server 15 system uses a Btrfs file system on /dev/sda1, mounted at /data, with subvolumes @/home and @/logs. The administrator needs to create a snapshot of the @/home subvolume for backup purposes and ensure it is read-
only. The snapshot should be stored at /data/@/home_snap. Which commands achieve this, and what is the correct syntax for verifying the snapshot???s properties?
btrfs subvolume snapshot -r /data/@/home /data/@/home_snap; btrfs subvolume show
/data/@/home_snap
btrfs snapshot create /data/@/home /data/@/home_snap; btrfs property set
/data/@/home_snap ro true; btrfs filesystem show /data
btrfs subvolume snapshot /data/home /data/home_snap; btrfs property set /data/ home_snap ro true; btrfs subvolume list /data
btrfs subvolume create /data/@/home_snap; btrfs snapshot /data/@/home
/data/@/home_snap; btrfs subvolume show /data/@/home_snap
Answer: A
Explanation: The btrfs subvolume snapshot -r command creates a read-only snapshot of the @/home subvolume at the specified path. The btrfs subvolume show command verifies the snapshot???s properties, including its read-only status. Other options use incorrect commands, paths, or do not ensure the snapshot is read-only. The btrfs subvolume list command shows subvolumes but not detailed properties.
You are developing a script that needs to run a command in the background and immediately return control to the terminal. Which of the following commands would you use in your script to accomplish this?
command > /dev/null
command &
command;
command & disown
Answer: B
Explanation: Appending & to the command allows it to run in the background, freeing up the terminal for other tasks while the command executes.
You want to create a snapshot of a subvolume named work in /mnt/data and send it to a remote Btrfs file system. Which command accomplishes this?
btrfs send /mnt/data/work | ssh user@remote 'btrfs receive /mnt/backup'
btrfs send -r /mnt/data/work | ssh user@remote 'btrfs receive /mnt/backup'
btrfs snapshot /mnt/data/work /mnt/data/work_snapshot; btrfs send /mnt/data/ work_snapshot | ssh user@remote 'btrfs receive /mnt/backup'
btrfs snapshot /mnt/data/work /mnt/data/work_snapshot; btrfs send /mnt/data/ work_snapshot
Answer: C
Explanation: To send a snapshot to a remote file system, you first create the snapshot and then use the btrfs send command piped through SSH to the remote system.
You are debugging a process with PID 45678 on a SUSE Linux Enterprise Server 15 system that is not responding to SIGTERM. You need to send a SIGABRT signal to generate a core dump for analysis. Which command sends this signal?
kill -INT 45678
kill -TERM 45678
kill -HUP 45678
kill -ABRT 45678
Answer: D
Explanation: The kill -ABRT 45678 command sends the SIGABRT signal to PID 45678, typically generating a core dump. Other signals do not serve this purpose.
KILLEXAMS.COM
Killexams.com is a leading online platform specializing in high-quality certification exam preparation. Offering a robust suite of tools, including MCQs, practice tests, and advanced test engines, Killexams.com empowers candidates to excel in their certification exams. Discover the key features that make Killexams.com the go-to choice for exam success.
Killexams.com provides exam questions that are experienced in test centers. These questions are updated regularly to ensure they are up-to-date and relevant to the latest exam syllabus. By studying these questions, candidates can familiarize themselves with the content and format of the real exam.
Killexams.com offers exam MCQs in PDF format. These questions contain a comprehensive
collection of questions and answers that cover the exam topics. By using these MCQs, candidate can enhance their knowledge and improve their chances of success in the certification exam.
Killexams.com provides practice test through their desktop test engine and online test engine. These practice tests simulate the real exam environment and help candidates assess their readiness for the actual exam. The practice test cover a wide range of questions and enable candidates to identify their strengths and weaknesses.
Killexams.com offers a success guarantee with the exam MCQs. Killexams claim that by using this materials, candidates will pass their exams on the first attempt or they will get refund for the purchase price. This guarantee provides assurance and confidence to individuals preparing for certification exam.
Killexams.com regularly updates its question bank of MCQs to ensure that they are current and reflect the latest changes in the exam syllabus. This helps candidates stay up-to-date with the exam content and increases their chances of success.