0% found this document useful (0 votes)
500 views

Sample Rhcsa Questions

This document contains sample questions and answers related to Linux system administration certification exams. It includes questions about scripting, file permissions, networking, SSH, and web server configuration. Sample answers show how to write scripts to check parameters and print outputs, use the find command to search for files, configure FTP servers, enable SELinux and IP forwarding, restrict SSH access, and set up virtual hosts on an Apache web server. The questions cover a range of Linux administration topics and the answers provide code examples and configuration steps to complete the tasks.

Uploaded by

SantoshSangroula
Copyright
© © All Rights Reserved
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
500 views

Sample Rhcsa Questions

This document contains sample questions and answers related to Linux system administration certification exams. It includes questions about scripting, file permissions, networking, SSH, and web server configuration. Sample answers show how to write scripts to check parameters and print outputs, use the find command to search for files, configure FTP servers, enable SELinux and IP forwarding, restrict SSH access, and set up virtual hosts on an Apache web server. The questions cover a range of Linux administration topics and the answers provide code examples and configuration steps to complete the tasks.

Uploaded by

SantoshSangroula
Copyright
© © All Rights Reserved
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 2

irst - take a look at this book - it is really good: http://www.amazon.co.uk/RHCSA-Linux-...

/dp/0071765654 - you
should have a cople of test question there.
Learn and practice is the key to the exam - there is not much time on the exam, and you cannot ask uncle google
and aunt wikipedia.
Well, couple of mine questions from the book - as I remember them now - notes are from me - PLS double check
them, as they might be wrong!:
Question. - Scrypt prints kernel or user
Write a script in /root/programs, which prints a word kernel, when the parameter is user, prints the word
kernel, when the parameter is user, and when the parameter is not user or kernel prints /root/programs user|
kernel
Manual, reference & learning materials
http://www.gentoo.org/doc/pl/article...example-p2.xml
Example answer no 1:
vi /root/programs
##### script here #####
#!/bin/bash
case $1 in
user) echo "kernel";;
kernel) echo "user";;
*) echo "/root/programs user|kernel";;
esac
##### script here #####
chmod 700 /root/programs
Example answer no 2:
vim /root/programs
##### script here #####
#!/bin/bash
if [ "$1" = "kernel" ]
then
echo "user";
elif [ "$1" = "user" ]
then
echo "kernel";
elif [ "$1" != "user" ] || [ "$1" != "kernel" ]
then
echo "/root/programs user|kernel";
fi
##### script here #####
chmod 700 /root/programs
*******************************************************************
Question. Uses the command find
Find ALL files owned by user jacquiline and copy those files only to the directory /var/findfiles
*******************************************************************
Question. Server ftp with anonymous access
Setup ftp server, when you will grant anonymous access to read data from location /var/ftp/pub only from domain
service40.example.com
Explain the difference between active and passive ftp.
*******************************************************************
Question. SELinux enforcing system
Make sure that SELinux will be working in enforcing mode after reboot.
Manual, reference & learning materials
Manual: http://www.crypt.gen.nz/selinux/disable_selinux.html
Example answer no 1:
Edit /etc/selinux/config and change the line SELINUX= according to your needs...
SELinux will be disabled after reboot. To turn selinux off immediately, without rebooting use:
sudo setenforce 0

To automatically relabel the complete filesystem upon reboot, do:


touch /.autorelabel && reboot
*******************************************************************
Question. Enable IP forwarding
Enable IP Forwarding on the machine.
Example answer no 1:
Add net.ipv4.ip_forward=1 to /etc/sysctl.conf
echo 1 > /proc/sys/net/ipv4/ip_forward
*******************************************************************
Question. SSH Service accessible from certain locations
Run ssh service with is accessible from any user from local domain (service40.example.com), but not from network
my1328t.net (172.25.0.0/16)
*******************************************************************
Question.
Setup www website 1 www.server.example.com (/var/www/html)
another www.server40.example.com (/var/html/virtual)
*******************************************************************

Last edited by Alvin88; 11-13-2012 at 07:47 AM.

You might also like