RHCSA
RHCSA
Step-2. when we’re in editing mode by pressing “e” button then there’s a coding on screen. when you’ll
go down in coding then there’s a line which started by “linux16/”. In this end of line, we write
“rd.break” and press “Ctrl + x” by which booting will start again and give a command line interface
where we can run further commands which is required to crack password of root.
Step-7. Exit
-> Now by write “exit” on command line by which we can exit from interactive shell.
Step-8. Exit
-> Now again we write “exit” on command line interface by which we can exit from command line
interface and booting process will again started with new root password.
Q2). setup a ip addr for virtual macine as ip addr 172.25.X.11
subnet mask 255.255.255.0 Default gateway 172.25.2.254
nameserver 172.25.254.254 and hostname as
serverx.example.com.
Ans. We’re going to create physical partition in our system with following steps-
Step-1. fdisk (path of hard drive)
-> In this command, “fdisk” is command to create partition and “/dev/vda” is path of hard drive in which
we have to create our partition with given requirement.
Step-6. +size{ K, M, G }
-> In this step, we assign size of new partition in form of last sector, sectors or size of partition and press
enter to assign size to new partition. We can assign size of partition in kilobytes, megabytes or gigabytes
like +2K, +2M or +2G.
Step-9. blkid
-> This command show uuid of formatted partitions and we have to copy newly formatted partition
because we have to fill entry in “/etc/fstab” file for permanent mounting.
Ans. We’re going to create users, group and group membership with following steps-
Step-1. groupadd sysadmin
-> This command is simply creating a group “sysadmin” in which no any member added recently.
Ans. We’re going to create collaborative and also give group ownership and permission for group
members-
Step-3. Reboot
-> After the installation of kernel, We have to reboot the system by which our update version of kernel is
selected automatically and system start with update version of kernel.
Ans. We’re going to resize the LVM partition with some following steps-
Step-1. lvdisplay
-> “lvdisplay” command is used to show the created LVM partition by which we can see the details of
created LVM partitions.
Ans. We’re going to schedule a job in our system. By this, we can schedule a job which automatically
perform a task on configured time by some following steps-
Step-2. After the execution of above command, one file is open on screen where we have to fill proper
entry with given syntax-
* * * * * (Task which we want to assign to user)
-> First (*) is for every minute :- Means task will be perform on each and every minute if we substitute *
on this place instead of any numeric value (range 0-59).
-> second (*) is for every hour :- Means task will be perform on each and every hour if we substitute *
on this place instead of any numeric value (range 0-23).
-> third (*) is for every day of month:- Means task will be perform on each and every day if we substitute
* on this place instead of any numeric value (range 1-31).
-> fourth (*) is for every month :- Means task will be perform on each and every month if we substitute
* on this place instead of any numeric value (range 1-12).
-> fourth (*) is for every week’s day :- Means task will be perform on each and every week’s day if we
substitute * on this place instead of any numeric value (range 1-12).
-> After full fill entire entry according to syntax then save the file and exit.
Ans. We’re going to set our system on enforcing mode because this is special type of security which
is “Security Enhance Linux” by which we can implement a flexible mandatory access control architecture
in our system. We can do this by some following steps-
Step-1. getenforce
-> This command is used to get current mode of SELinux.
Step-2. setenforce 1
-> This command is used to modify the mode of SELinux on run time.
-> After the “setenforce” command, “1” is used for enforcing mode for SELinux. We can also place “0”
on place of “1” for permissive mode for SELinux.
Step-1. cp (path of file which we want to copy) (path of directory where we want to copy)
-> “cp” command is used to copy any file or directory.
-> After “cp” command, we give path of that file which we want to copy and after this we give path of
that directory where we want to copy file.
Ans. We’re going to synchronize the system time with server time or configure the Network Time
Protocol because if system time is not synchronized with server time then we can face some problem in
accessing of server from system. We can configure the NTP with some following steps-
Ans. We’re going to find the files in system and copy all the find files in specified directory. We can
do this task with some following step-
Step-2. find / -user (user_name) –exec cp –a –rvf {} (path of directory where we want to copy)
\;
-> “find” is a command to find any file or directory.
-> After the “find” command, we use “/” which means this command will find the required file in whole
system because whole directory or file is made in “/”.
-> After “/”, We use “-user” option which is used to specify the name of user and we’re using this option
when we want to find that files which is owned by any user.
-> After specify the user name, we use “–exec” option by which we can add or join another command
with previous command.
-> After the “-exec” option, we use “cp” command for copy all files at given path of directory. In “cp”
command, we use certain following option-
-a = This option is used to append command with previous command.
-r = This option is used to copy files recursively.
-v = This option is used to print verbose information on screen means process shows on display.
-f = This option is used to copy all files forcefully.
-> After all options, we give path of that directory where we want to copy all file which is find and
owned by specified user.
Step-1. Initially we create a new partition according to required size of partition but when we’re going
to save partition by press ‘w’ before that we have to change the partition type by press ‘t’. When we
press ‘t’ then we have to give hex code(82) of “Linux swap partition type” and press enter. If we have
any confusion then we can check the hex code of “Linux swap partition type” by press “l”.
Step-4. free –m
-> “free” command is used to check or display free and used amount of memory in system.
-> “-m” option is used to display free and used amount of memory in system in Megabyte(mb).
Ans. We’re going to create a ldapuser through some configuration which is given in following steps-
Step-1. yum –y install authconfig-gtk autofs sssd
-> We’re going to install three package to configure ldapuser.
-> “yum –y install” command is used to install package in system through server.
Step-2. authconfig-gtk
-> “authconfig-gtk” command is used to configure or create ldapuser with graphical console where we
have to fill server name, base dn and url of valid certificate which will download from server and at last
we have to select “ldap password” option into drop down list and at last we have to click on “apply”
button to apply all configure setting.
Step-6. su – ldauuserX
-> This command is used to switch user and by this command, we can login on ldapuserX shell prompt
and also can verify that ldapuserX is created or not.
Step-7. pwd
-> “pwd” command is used to check present working directory and by this command, we also check that
ldapuserX have his home directory or not which is provided by server to ldapuserX.
15). Create the following user name neo with uid 1337 and set
the password password.
Ans. We’re going to provide user id to any new user with some following steps-
Step-1. useradd –u (uid) (user_name)
-> “useradd” command is used to create a new user and “-u” option is used to provide required user id
to newly created user.
Step-7. mount -a
-> We have to reboot our system or run “mount -a” command by which partition will be mount on
specified mount point. In this command, “-a” is used of mount all that partition on specified mount
point which we specified in “/etc/fstab” file for permanent mounting.
17). Find the string Find the string root from /etc/passwd file
and save the result in /searchfile.
Ans. We’re going to search a particular string from a particular file and store output into specified file
with some following steps-
Step-1. grep ‘root’ (path of that file in which we want to search string) > (path of that file in
which we want save output)
-> “grep” is a command to search specified string in command (eg. ‘root’) this string is always written in
single quotes(‘ ’) after the command.
-> After the “grep” command, We provide the path of that file in which we want to search string and
after this, we use “>”(redirection) to save output of “grep” command into specified file.
Step-2. vim (path of that file where we save the output of command)
-> With use of vim editor, We can open file in which output will save and cross check the result.
Ans. We’re going to create a backup of given directory on specified location with some following
steps-
Step-1. tar –cvfj (file_name.tar.bz2) (path of that directory where we want to save backup
file)
-> “tar” command is used to create backtup of any file or directory.
-> With “tar” command, we use some following options-
-c = This option is used to create a new archive.
-v = This option is used for verbosely list files processed(display processing on screen)
-f = This option is used for creating backup in a single file.
-j = This option is used for .bzip2 compression technique.
-> After providing the option, We provide the file name of .tar file and after this we provide path of that
directory where we want to save .tar file.