[Link]
v=sQn5AEQDyGU&t=7s
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
1. SELINUX
2. LVM – Extend your /mnt/lvm up to 750M
3. Usermgmt
Create a group sysadmin
Create users susan, natasha and harry
User susan and harry should be part of the sysadmin group
Natasha should not be a part of that group and she is given a non-interactive shell
Password of all users are “password”
4. ACL
Copy /etc/fstab to /var/tmp/fstab
The user and group owner of that file should be root
All users should be able to read the file
No one should be able to execute
Susan should not be able to read nor write
Natasha should be able to read and write
5. Direct Collaboration (special permission)
Secure /data such that only group sysadmin can access it
Group owner should be sysadmin and all child directories and files by default should
have group sysadmin (permission).
6. LDAP
Configure an LDAP client where your ldap server is [Link]
LDAP Base DN: dc=station,dc=district,dc=com (dc=[Link]=com)
Authenticate your LDAP server using certificate
[Link]
7. NTP
Configure your NTP server to synchronize with [Link]
8. LDAP
You can use the user ldapuserX with passwd password
Home directories for your LDAP users should be automatically mounted on access
These home directories are served from the NFS share
[Link]:/home/guests/
9. Kernel
Install the kernel from the site [Link]
The newly installed kernel should be default kernel
The previous kernel should be available and bootable at grub
10. CRON
Add a cron jon for the user jane /bin/echo hiya
This job should run every day at 2:23PM
11. TAR
Synchronize the /etc directory tree on server to the /configbackup directory on server
Create an archive named /root/[Link] with the
/configbackup directory as content.
To prepare the archived directory tree compression with the currently actively used
configuration file on server, extract the contents of the /root/configuration-backup-
[Link] archive to the /tmp/configcompare/ directory on serverXtimedatectl set-
ntp true
12. User of specific UID
Create a user jean
User id of this should be 3564
13. FIND
Locate all files owned by user sasha and copy them to /home/lost+found/
14. LVM
Create a logical volume lvmgroup from volume group v2group
The volume group should have extents of size 8.
The logical volume should have 100 extents
Mount this lvm as /mnt/lvm2 as ext4 filesystems
15. SEARCH
Display the first 12 lines of the /usr/bin/clean-binary-file
Send the output to the /home/student/[Link] file
16. Record the command to display all system journal entries recorded between 9:05:00 and
9:15:00 in the /home/student/[Link]
17. Deny user sasha to create cron job for herself
1. Assuming the root user password is lost for C1 and your system is running in multiuser target
with no current root session open. Boot the system into an appropriate target and change the
root user password to root1234
2. Configure the primary network interface with hostname [Link] (alias rhcsa1)
IP Address: [Link]/24
Gateway: [Link]
Nameserver: [Link]
3. Set the default boot target to multiuser
4. Set SELinux to enforcing mode
5. Perform a case-insensitive search for the pattern “then” in the /etc/profile file and save the
result in the /var/tmp/[Link]. Make sure that empty lines are not included
6. Activate and start firewalld
7. Set the primary command prompt for user root to display the hostname, username and current
working directory information in that order
8. Create users same, tome, steve, bob and anna with home directories in /home
Set their passwords to user123
Make accounts for sam and tom expire on June 31, 2019
Users steve and bob should have their secondary groups set to group tech (create this
group if it does not exists)
9. Create a directory called dir1 as user anna in her home directory and set default ACLs on it for
user same for read and write access
10. Set up a local repository for the remote FTP yum repository in the /pub/ directory on S1. The IP
Address for the S1 server is [Link]
11. Create a logical volume called lv01 of size equal to 15 Les in vg01 volume group
Create vg01 with PE size 16MB with mount point /mnt/dirxfs and xfs file system
structures
Create a file called testxfs1 in the mount point
Set the file system to automatically mount at each system reboot
12. Add a group called tester and change the group ownership of /mnt/dirxfs1 to tester
Set read/write/execute permissions on /mnt/dirxfs1 for the owner and group members
No permission for others
13. Extend lv01 file system in vg01 online by 105MB without losing any data
14. Create a swap partition of size 200MB on an available disk. Use its UUID and ensure it is
activated after every system reboot.
15. Create a standard partition of size 500MB on any available disk and format it with ext4 file
system structures.
Mount the file system on /mnt/dirext4 persistently using its UUID
Create a file called testext4 in the mount point
16. Create a directory /dir1 and apply SELinux contexts for /root on it
17. Set up a cron job as the root user to execute the backup script which is located under the root
home directory. This job should run every Sunday at 1:00AM
18. Use star to create a compressed archive of the /etc directory. Store the archive in /root using
any name of your choice
19. Enable at access for user Sam and deny for user Bob
20. Modify the bootloader and set the default autoboot timer value to 30 seconds
1. Change the current hostname to [Link]
2. Set the default target to boot into [Link]
3. Configure the following settings on your virtual machine
IPv4 address: [Link]/24
Default Gateway: [Link]
DNS server: [Link]
Interface name: eth01
4. Install the ftp package and allow it to get documents stored in CIFS mounted directories
5. Extend the existing root file system with an additional size of 1GB
6. Assign the same SELinux contexts that are used by the users’ home directories to the /dir1
directory
7. Create user Ahmed with UID 1100
Ahmed account expire 9 months from the date you created the account
Create another user Rabah with UID 1200 and with cshel login shell
Both users passwords must be P@ss
8. Create a directory named /admins
Allow ahmed and rabah to share documents in the /admins directory using a group
named admins
Both users can read and write
Users that are not member of the admins group cannot access the directory
9. Create an xfs file system on a logical volume named lvm2 with the size of 150MB and mount it
permanently using UUID under a directory named /xfs2
10. Create a new logical volume lvm5 with size 700MB and file system ext4 mounted on /ext4dir
permanently using its label name “data”
11. Create a logical volume named swap2 with the size of 1024MB and add it permanently to the
current swap space
12. Create a cron job as root that deletes empty files and directory from /tmp at 00:30AM daily.
13. Allow Ahmed to get full access to Rabah home directory
DAHJI
1. Assuming the root user password is lost for rchsa1 and your system is running in multiuser
target with no current root session open. Boot the system into an appropriate target and change
the root user password to root1234
ANSWER:
a) Boot to single user. Press e to edit
b) Input [Link] then CTRL+X
c) Type mount –o rw,remount /sysroot/
d) chroot /sysroot/
e) passwd or passwd root
f) enter the desired password
g) touch /.autorelabel
2. Configure the primary network interface with hostname [Link] (alias rhcsa1)
IP Address: [Link]/24
Gateway: [Link]
Nameserver: [Link]
You may use different IP assignments
ANSWER: (Procedure1)
a) ifconfig
b) nmcli connection delete interface-name
c) nmcli connection add con-name eth0 ifname ens3 type Ethernet autoconnect yes ip4
[Link]/24 gw4 [Link]
d) nmcli connection modify eth0 [Link] [Link]
e) nmcli connection down eth0 ; nmcli connection up eth0
f) cat /etc/[Link]
g) cat /etc/sysconfig/network-scripts/ifcfg-eth0
ANSWER: (Procedure2)
a) ifconfig
b) nmtui > edit a connection > ensxxxxxx
IPv4 Configuration = Manual
Address = [Link]
Gateway = [Link]
DNS = [Link]
c) nmtui > activate a connection
d) ip route
e) nmtui > set system hostname > [Link] > click OK
3. Set the default boot target to multiuser
ANSWER:
a) systemctl get-default
b) systemctl set-default [Link]
4. Set SELinux to enforcing mode
ANSWER:
a) getenforce
b) cat /etc/selinux/config
5. Create the following user, groups and group memerships
A group named sysgrp - #groupadd sysgrp
A user Andrew who belongs to sysgrp as a secondary group -
#useradd Andrew
#usermod –aG sysgrp andrew
A user susan also belongs to sysgrp as a secondary group -
#useradd susan
#usermod –aG sysgrp susan
A user sarah who does not have access to an interactive shell on system and who is not
a member of sysgrp - #useradd –s /sbin/nologin sarah
Susan, Andrew and sarap password = “Postroll”
#passwd Andrew
#passwd susan
#passwd sarah
#id andrew
#id susan
#su – sarah
6. Create a collaborative directory /redhat/sysgrp with the following characteristics:
Group ownership of /redhat/sysgrp is sysgrp
The directory should be readable, writable and accessible to members of sysgrp but not
to any other users
Note: It is understood that root has access to all files and directories on the system,
ANSWER:
a) mkdir –p /redhat/sysgrp
b) chgrp sysgrp /redhat/sysgrp/
c) chmod 2770 /redhat/sysgrp/
d) ls –ltr /redhat
e) cd /redhat/sysgrp/
f) touch [Link]
g) ls –ltr [Link]
7. Enable IP forwarding on your machine
ANSWER:
a) vi /etc/[Link]
b) add line net.ipv4.ip_forward=1
c) sysctl –p
8. Copy the file /etc/fstab to /var/tmp
Configure the permission of /var/tmp/fstab so that the file /var/tmp/fstab is owned by
the root user, belongs to the group root should not be executable by anyone
The user Andrew is able to read and write /var/tmp/fstab
The user susan can neither write nor read /var/tmp/fstab
All other users (current or future) have the ability to read /var/tmp/fstab
ANSWER:
a) cp /etc/fstab /var/tmp/
b) cd /var/tmp
c) ls fstab
d) setfacl –m u:andrew:rw- /var/tmp/fstab
e) setfacl –m u:susan:--- /var/tmp/fstab
f) getfacl /var/tmp/fstab
9. Add the user talusan with userid 2985
ANSWER:
a) useradd –u 2985 talusan
b) id talusan
10. File the file which owned by user julice and copy the file into /root/findresults directory
ANSWER:
a) mkdir –p /root/findresults
b) useradd julice
c) id julice
d) find / -user julice –exec cp {} /root/findresults/ \;
e) ls /root/findresults/
11. Create an archive file /root/[Link] for /usr/local. It should be compressed by gzip
ANSWER:
a) tar –cvzf /root/[Link] /usr/local
b) ls
12. Search the string sarah un the /etc/passwd file and save the output un /root/lines
ANSWER:
a) grep sarah /etc/passwd > /root/lines
b) cat /root/lines
1. Network setup
IP Address: 172.25.x.11/[Link]
Gateway: [Link]
DNS IP: [Link]
ANSWER:
a) ifconfig
b) nmcli connection delete interface-name
c) nmcli connection add con-name eth0 ifname ens3 type Ethernet autoconnect yes ip4
[Link]/24 gw4 [Link]
d) nmcli connection modify eth0 [Link] [Link]
e) nmcli connection down eth0 ; nmcli connection up eth0
f) nmcli connection show
g) systemctl restart NetworkManager
h) systemctl enable NetworkManager
i) cat /etc/[Link]
j) cat /etc/sysconfig/network-scripts/ifcfg-eth0
2. Set hostname to [Link]
3. Configure SELinux to enforcing mode
4. Create a new 100MB physical partition mounted under /meet
ANSWER:
a) fdisk –l
b) fdisk /dev/vdb
c) n
d) e
e) enter
f)
5. Create a new 150MB swap partition
6. Create a repository for [Link]
7. Install the appropriate kernel update from [Link]
The following criteria must be met:
The updated kernel is the default kernel when the system rebooted
The original kernel remains available and bootable on the system
8. Bind with LDAP used provided by [Link] for user authentication
Note the following;
The LDAP search base DN is dc=example,dc=com
The LDAP certificate file is [Link]
ldapuserX should be able to log into your system, whereX is your server (Hint: where X is
your domain number) but will not have a home directory until you complete the autofs
requirement, below all LDAP users have password of “password”.
9. Configure autofs to automount the home directories of LDAP users
Note the following;
[Link] ([Link]), NFS-exports /home/guests to your system,
where X is your server number.
LDAP userX’s home directory is [Link]:/home/guests/ldapuserX
home directories must be writable by their users
while you are able to log in as any of the users ldapuser1 through ldapuser20 the only
home directory that is accessible from your system us ldapuserX
Example: - [Link] would configure the automaster such that
ldapuser100’s home directory /home/guests/
10. Configure your system so that it is an NTP client of [Link]
11. Create a new physical volume.
Create a new volume group in the datacontainer, vg extent is 16.00MB
Create a new logical volume in the name of datacopy with the size of 50 extents and file
system must vfat then mount it under /datasource
12. Resize the logical volume, logical-data and it filesystem to 400MB. Make sure that the fiesystem
contents remain intact
13. Add the user talusan with userid 2985. Find the file which owned by user julice and copy the file
into /root/findresults directory
14. Create an archive file /root/[Link] for /usr/local. It should be compressed by gzip
15. Search the string sarap in the /etc/passwd file and save the output in /root/lines
16. The user Andrew must configure a cron jib that runs daily at 14:23 local time and executes –
/bin/echo hiya
UDEMY
1. Resetting the root password
2. Configure IP address, Gateway and Hostname
3. Create ext4 file system partition and mount in a directory
4. Configure Permission
5. Set special permission to a user
6. Add the three users with distinct permissions
7. Create a collaborative directory and change group ownership
8. Search a string
9. Change SELinux Mode
10. Create Logical Volume
11. Find all files owned by a user in your system
12. Schedule a recurring job
13. Resize Logical Volume
14. Authenticate users from LDAP
15. Extend a swap space to a given size
16. Create a local repository and manage packages with yum
17.