RHCSA Practice Questions
RHCSA Practice Questions
RHCSA Practice Questions
1. User Administration
2. Permissions
a. Standard permissions
4. Kernel
b. Kernel Upgrade
5. Boot process
6. Cron Scheduling
7. Servers
a. FTP Server
b. HTTP Server
8. Storage Administration
a. Partitioning
b. LVM
c. Swap
9. LDAP
10. NFS
a. YUM
b. RPM
A. usermod –L satish
A. usermod –U satish
A.
id satish
groups satish
Both of the above commands will show the groups that user
satish belongs to. The primary group is mentioned at the
beginning of the list.
A.
A. chage –d 0
A. chage –M 30
Note:
00 07 25 12 * /root/backup.sh
*/5 * * * * /root/take_stats.sh
07 03 * * * /root/email_check.sh
30 16 * * 5 /root/check_server.sh
00 00 * * 1-5 /root/check_server.sh
A.
Note:
A. crontab –l
A. crontab –u satish -l
A. crontab –u satish -e
* * * * * /bin/ls
Once the file is saved you can confirm the cron schedule by
typing the crontab –u satish –l command
Another way to perform the same task is to edit the
/etc/crontab file and add the following line at the
bottom of this file.
* * * * * /bin/ls -u satish
Regular Expressions & I/O redirection
Note:
Q. Search usernames that begin with the letter k and store them
in a file named /tmp/k_user_list.txt
Note:
The > I/O redirection will capture the standard of the grep
command and store in the file named /tmp/k_user_list.txt. If
this file is already present, the contents of this file will
be overwritten.
Note:
A.
mkdir /tmp/satish_files
Scenario #1
Scenario #2
Scenario #3
Find out the list of all users in the /etc/passwd file who have not
been assigned a “/bin/bash” shell. Save this list in a file named
/tmp/non_bash_user_list.txt. This list should be alphabetically
arranged from z-a.
Scenario # 4
No users should be able to read this file other than the users from
the “salesrep” group. It is assumed that root can read any files.
Scenario # 5
Create a user named jackie with UID of 3002 and default login shell as
“/bin/ksh” This user’s password should e set to Qip587#
Scenario # 6
Setup a cron job for user jackie to execute a command /bin/echo “Hi
How are you” at 1:20 PM on January 18, 2012.
Scenario # 7
Download a file named a.txt from the ftp server 172.24.8.111. The ftp
server is configured as an anonymous FTP server. The file has been
kept inside /pub directory of the ftp server. When you download the
file, keep it in the /tmp directory with a name of b.txt. Set up the
permissions and ownership on this file as follows.
2. All users from the “salesmgr” group should be able to read and
write to this file.
3. But user named “jason” should not be able to modify any contents
of this file even if he is a member of “salesmgr” group.
Scenario # 8
Scenario #1
You have been given a task by your manager to plan for the future disk
space requirement of your server. As a first step towards this task,
you are required to find out the following information about your
server. Please run appropriate commands to gather the information.
Scenario #2
Scenario #3
Is LVM implemented for any of the partitions. If yes, find out the
following information.
Physical Volumes
Volume Groups
Logical Volume
Scenario #4
You have recently deployed a new web application on your Red Hat
server. You have realized that the memory requirement of this web
application is high. You, therefore, have decided to increase the swap
space to take care of this issue. In such a situation, configure your
server to have additional swap space of 500 MB. This additional swap
should be made available to the system when the server reboots.
Scenario #5
Note: While performing the above operation there should not be any
data loss of existing data in the /home directory.
Scenario #6
For the above mentioned new project, there is a need to keep large
data files on the server. You need to cerate a separate mount point
named /sales_data for this purpose. Create a new volume group and a
logical volume for this purpose from the remaining free space on your
disk/s. The size of Physical extent of the volume group should be 8MB.
The logical volume should have 50 extents. This mount point should get
automatically mounted at the boot time.
Scenario # 7
Resize the file system /opt from its current size of 500 MB to 400 MB.
Do not lose any data while performing the resizing.
Scenario #1
You need to deploy an http server. Configure this server in such a way
that it can render html pages from his Document Root directory.
Download an already developed HTML page from an ftp server
172.24.0.254. The name of this HTML page file is abc.html. Configure
your web server so that this web page will be displayed when a user
hits your web site. You may rename this HTML file if necessary.
Open the appropriate port of your firewall for this web site to be
accessible from other machines.
Kernel Upgrade
Scenario #1
You need to create YUM repository on your YUM server. For this reason,
a RPM package named “createrepo” has to be installed on your YUM
server. The “createrepo” RPM and its dependent RPMs are kept in
/tmp/rpm directory.
Scenario #2
You are required to change Boot Loader’s Splash Screen to display the
name of your Organization ‘ABC Corporation’ instead of the default
‘Red Hat Enterprise Linux’ at the boot time.
Scenario #3
Scenario #4
There is a need for a cluster setup in your company for providing High
Availability of production servers. For this reason, all servers in
the cluster must have the exact system time. You are required to setup
your current server’s system time to sync with the TIME server in your
organization as your current is part of a cluster. The IP address of
the Time Server is 172.24.0.254.
2. / - partition – 3GB