RHCE
RHCE
RHCE
Stage1:-
1). Root Password Recovery
2). Hostname
4).DNS Resolving
Stage2:-
RHCT: - RHCE:-
1) Raid 1) LVM
2) User administration 2) Quota
3) Acl 3) NFS
4) Partition Creation 4). VSFTPD
5) Collaborative Directory 5) SSH
6) Printer Configuration 6) SMB
7) Cron Job 7) HTTPS
8) NIS User 8) POP3
9) NTP Client 9) SMTP
10) Mail aliases 10) SQUIRREL
11) IP Forwarding 11) IMAP
12) Kernel Upgrade 12) VIRTUAL WEB HOSTING
13) Selinux
14) Run levels
QUESTIONS:-
Stage1:-
1. Recovering Root Password
ANS :- First login default username and password, if you fail login reboot the system and go
to the single usermode
#passwd root
#cd /etc
#chmod 644 passwd (There are no permission here you cannot change the permission)
#passwd root
Give the password and try to login then also fail do below steps
#passwd –U root
#chage -E -1 root
#passwd root
Give the password and try to login then also fail do below steps
#vi /root/.bash_profile
Remove “exit”
:wq!
Console
vc/1
vc/2
vc/3
vc/4
vc/5
vc/6
vc/7
vc/8
vc/9
vc/10
vc/11
tty/1
tty/2
tty/3
tty/4
tty/5
tty/6
tty/7
tty/8
tty/9
tty/10
tty/11
:wq!
#vi /etc/security/access.conf
Ex:- #example.com
:wq!
#vi /etc/security/limits.conf
:wq!
#vi /etc/security/time.conf
Press (Shift+G)
wq!
#vi /etc/pam.d/login
#cd /lib/security
#passwd root
#login
#reboot (do not exit command if still not able to login with the given password then check the
log files)
#/var/log/secure
#/var/log/messages
1) Configuring The Static IP
ANS:- #setup
Give as follows:-
Ip Address:- 172.24.0.x
Gateway:- 172.24.254.254
#chkconfig network on
3. DNS Resolving
ANS:- #setup
Networking =Yes
Networking_IPV6 =no
Hostname =stationx.example.com
:wq!
#vi /etc/hosts
172.24.0.x stationx.example.com stationx
: :1 localhost6.localdomain6 localhost6
:wq!
Should be as following
:wq!
#vi /etc/inittab
:wq!
#hostname
#ifconfig
#cat /etc/resolv.conf
Ans:- start --> press “Escape”--> Redhat--> press “a”--> give space and type ‘1’ (or ) ‘S’ (or)
Single
Sh-3.1 3#passwd
Xxxxx
Xxxxx
#chage -E -1 NEVER root
#usermod –d root root
#chage -E -1 root
#reboot
b) Compulsory 2:- Ping 172.25.254.254 is Successful and your system uses static networking as
described in /root/network.txt
#vi /root/network.txt
172.24.254.254 -->Gateway
#setup
Network configuration
c) Compulsory 3:- dig Server1.my 133t.org successfully resolves that hostname using DNS
A). Login with Run level 5 successfully
Note: - because partition sizes are seldom exactly what is specified when they are created.
Anything within the range of 275 to 375 mb is acceptable.
“You must successfully correct all your compulsory problems within one hour to earn
certification”
ANS:- #fdisk -l
#fdisk /dev/had
#partprobe /dev/had
#mkfs.ext3 /dev/hda10
#mkdir -P /mnt/policy
#vi /etc/fstab
:wq!
(here ‘rhct ‘ is only name e1label command will use for label name changing)
RHCT:-
1). Create a new partition of Size 500mb and Mount it on /mnt/new
ANS:- #fdisk -l
#fdisk /dev/sda
:-Press Enter
:-+500M
:wq!
#partprobe
#mkdir /mnt/new
#mkfs.ext3 /dev/sda8
#vi /etc/fstab
:wq!
#mount -a
2).Create a Linux RAID (0) with the name as /dev/md0 of 700mb mounted on /storage with ext3
ANS:- #fdisk -l
#fdisk /dev/sda
:-Press Enter
:-+350M
( 1 - 9) :-9
:-350M
( 1 - 10) :-10
:-wq!
#partprobe
#mkdir /storage
#mkfs.ext3 /dev/md0
#vi /etc/fstab
:wq!
#mount -a
#cat /proc/mdstat
Xxxxx
Xxxxx
#groupadd usergroup
the updated kernel is the default kernel when the system is rebooted
The original kernel remains available and bootable on the system
ANS:- Open Firefox
fttp://server.example.com/pub/updates
kernel -2.6.18 -128.el5 - i686 .rpm
#vi /etc/grub.conf
default =0
Title Redhat enterprise linux 2.6.18 -128.el5 - i686 .rpm (that means “o”)
Title Redhat enterprise linux 2.6.18 -153.el5 - i686 .rpm (that means “1”)
Title Redhat enterprise linux 2.6.18 -8.el5 - i686 .rpm (that means “2”)
wq!
Go to the desktop and “Double click” the kernel file then boot with kernel
Check:- restart the system with kernel
:wq!
7). Setup the default local print queue to forward jobs to the IPP (Cups) print Queuestation’x’ on
Server1.example.com. Where ‘x’ is your station number, Configure this printer as ‘Generic
text’ only print queue.
Note:- The queue station on Server1 dumps print jobs into the file
http://server1/printers/station’x’, This file can be examined to confirm that you have
configured the print queue correctly.
8). The users Jackie must configure a cron job that runs daily at 16:45 local time and executes
/bin/echo cia0.
45 16 * * * /bin/echo “ciao”
Press (ctl+d)
#crontab -U Jackie job.txt
#chmod +x job.txt
#crontab -l
9). Bind to the NIS domain “GELATO “ provided by 172.24.254.254 for user authentication.
Nisuser’x’ should be able to log into your system, where ‘x’ is your station number,
but will not have a home directory until you have completed the autofs requirement below all
NIS Users have a password of password.
NISDOMAIN = GELATO.com
:wq!
#nisdomainname GELATO
#authconfig - tui
Nisdomainname=GELATO
Server IP = 172.24.254.249
#su - nisuser”x”
Bash#
While you are able to log in as any of the users nisuser1 through nisuser20.
The only home directory that is accessible from your system is nisuser’x’.
/rhome /etc/auto.misc
:wq!
#vi /etc/auto.misc
wq!
#chmod -x /var/tmp/fstab
Sysusers : alex
:wq!
#newaliases
#mail sysusers@stationx.example.com
SELINUX = enforcing
:wq!
Troubleshooting RHCT:-
1).
4). #getfacl/usr/anaconda-ks.cfg
5). #uname -r
6). #lpq
#lpq
alex]# crontab -l
10). #Sysctl -p
11).
12).
# su - alex
15). #getenforce
RHCE:-
1). Resize the LVM partition to 600 Mb (Output Between 590 to 650 mb)
ANS:- LV EXTEND
#lvdisplay
#resize2fs /dev/vol0/home
#lvdisplay
LV REDUCE
#lvdisplay
#umount /home
#mkfs.ext3 /dev/vol0/home
#mount -a
#cd /backup
Note :- Before doing LVREDUCE take the backup in directory check below steps take backup:-
#mkdir /backup
#cd . .
In the file their will be three fields and entry should as follows
#repquota -a
#su - James
sshd : .cracker.org
Clients within the example.com domain should have anonymous & local user FTP access to
your machine
Clients outside example.com and localhost should not have access to your FTP Service.
5). Export your /home/share directory via NFS to the example.com domain only in runleval 3 and 5.
NOTE:- because you will not have root access, you will not be able to directly mount your
exported /home/share directory using your guest account on the system provided for testing.
The auto-mounter on the system has been configured such that it will automount your
/shared directory under /home/guest’x’/nfs/station’x’, where ‘x’ is your station number.
Consequently successful execution of is /home/guest’x’/nfs/station’x’ indicates that the
automounter was able to automount your NFS Share.
#chkconfig portmap on
#chkconfig nfs on
#vi /etc/exports
/storage *.example.com(ro,sync)
:wq!
#exportfs -V
Workgroup = EXAMPLE
host’s allow = .example.com
[Share]
Path = /home/share
writeble = no
public = no
browseable = yes
write list = harold
“While trying to access that samba Share, as selinux is in enforcing mode it will not allow you
to login to overcome that issue run the following command”
7). Implement a web server for the site http://station’x’.example.com. Then perform the
following steps:-
download ftp://server1.example.com/pub/rhce/station.html
copy this station.html to the Document Root as index.html of your web server.
Do not make any modification to content of index.html
>ls
>get station.html
>bye
]#vi /etc/httpd/conf/httpd.conf
“Copy last 7 lines from configuration file and paste below and edit”
<virtualHost 172.24.0.x>
ServerAdmin root@stationx.example.com
Servername stationx.example.com
</virtualHost>
:wq!
#chkconfig httpd on
Check:- http://www.example.com
Jeif must be able to Retrieve email from your machine using POP3 and POP3S from within
example.com only
Clients from “my253t.org” domain should not have access to your POP3 and POP3S
Service.
:wq!
Marion must be able to relay mail through remote host’s having name
Server1.example.com
Mail delivered to Marion Should spool into the default mail spool for Marion,
/var/spool/mail/Marion
Clients within my 253t.org should not have access t o the MTA running on your
system.
Remove ‘#’ from 305 and change this as mail proxy server
11). Extend your webserver to include a Virtual host for the site http://wwwx.example.com/ where
‘X’ is your station number, then perform the following the steps:-
<virtualHost 192.168.0.x>
ServerAdmin root@wwwx.example.com
Servername wwwx.example.com
</virtualHost>
:wq!
Imaps: Jeif
:wq!
#vi /etc/dovecot.conf
“copy line no. 92 & 93 and paste it below so that the count of the newlines become
as 94 & 95 uncomment this two lines and modify as shown below”
SSL_key_file= /etc/pki/tls/certs/dovecot.pem
SSL_key_file= /etc/pki/tls/certs/dovecot.pem
#cd /etc/pki/tls/certs
#make dovecot.pem
#mutt -f imaps://neo@stationx.example.com
#cat /etc/hosts
#ifconfig
#dig server1.example.com
#cat /etc/resolv.conf
#mount
#getent group sysusers
#getent passwd James alex neo
#ls /storage/sysuser
#ls -ld /storage/sysuser
#getfacl /usr/anakona-ks.cfs
#uname -r
#lpq
#crontab -l -u alex
#ls /sbin/echo
#cp /bin/echo /sbin
#showmount -e server1 |grep station8
#vi /etc/auto.master
#vi /etc/auto.misc
#setup
#nisdomainname
#sysctl -p
#system-config-time
#mail -u alex
#getenforce
#sestatus
#lvdisplay
#df -h /dev/vol0/home
#service nfs status
#exportfs -V
#service vsftpd status
#cat /etc/hosts.deny
#service sendmail status
#vi James
#cd /var/spool/mail
#ls
#mail James
ADDITION RHCE QUESTIONS:-
1). Resize the LVM partition to 600 Mb (Output Between 590 to 650 mb)
2). Configure Quota
dd if=/dev/zero of=myfile bs=1024 count=70
For user James where his password is “password” and message as warning
dd if=/dev/zero of=myfile bs=1024 count=90
For user James where his password is “password” and massage as write failed user block limit
reached and disk quota exceeded.
Main Questions:-
1. How will increase performance in network bonding and why perfomance will
increase?
2. How to create LVM on top of RAID?
3. Have you done depth troubleshooting in linux if you did tell the scenarios?
4. How to create multiple users in 85 servers in less time and also servers are located in
different places?
5. How to install os from kickstart server without using cd (Server is located in uk)?
6. How to troubleshoot hard disk failure?
7. How to check the file system space in a directory?
8. How to troubleshoot if hard disk failure?
9. How to configure quotas?
10. Configuring Raid and Lvm?
11. Unable to create files inside a directory, Directory mounted and space also their?
12. What is the difference single user mode and maintenance mode?
13. There is a partition inside fdisk but when you are opening it’s not showing how can
you make it available?
14. Add lvm from SAN and how will discover and configure it
15. After Extending LVM you did the reboot but it’s not logging how will you
troubleshoot?
16. After Extending LVM by using which command we can activate without update
kernel?
17. How will you set the gateway?
18. NFS and NIS configuration and diffrerence?
19. What is the UMASK and what is the value?
20. Difference between hardlink and softlink?
21. What is the inode number what it will do?
22. Do you have idea about ITIL?
23. What is the minimum requirement to install linux
24. How to add patch for particular server?
25. How to increase swap space?
26. How to lock the users?
27. How to check the particular process status?
28. How to kill the process?
29. Unable to ping server hwo to troubleshoot?
30. How to check open port numbers in linux?
31. How to add the home directory a particular user?
32. What stands for RSA & what is the use of RSA key?
33. What is the difference TELNET and SSH?
34. NFS server needed packages?
35. What is the port number of samba?
36. Which file is postfix main configuration file?
37. What is the use of proxy module in APACHE WEBSERVER?
38. What are the steps of SSL configuration?
39. What purpose we use CGI-Scripts in apache configuration file?
40. What purpose we use Re-Write rule apache configuration file?
41. Write the complete samba configuration file and write down the syntax for selinux
give permissive to public users?
42. Which console are you using in your Linux environment (LIKE: - ILO Console)?
43. How will you run process in background and how to bring it foreground?
44. How will you install packages in all servers at one shot?
45. I am unable to take remote server A which is located in London how will troubleshoot
it?
46. Server is down how will you bring it and what are the reasons to go server down?
47. What is the difference between process and service?
48. How will you transfer yum repository from 1 server to another server (Ex, A server
having repository and you have transfer this repository to B server)
49. What is the syntax of corn tab ending (Ex:- minutes, hours, day of the month, month,
day of week, after this what syntax that you will give)
50. How will you take backup in simple shell scripting mode
51. In your Linux environment which profile using
52. What is the fields of free command
53. /etc/shadow file is corrupted how will you recover it from /etc/passwd
54. How will you check performance of servers
55. What is the difference between rhel 6 and rhel 5
56. I have installed 3 packages in server A, But it should update in all servers at a one
shot what is the steps needs to be taken
57. I have issued # ECHO $ what will happen
58. Where mbr will store in boot process
59. What are the private keys that you know
60. What is the mean of HARD and SOFT in quota environment
61. Which hardware using in your Linux environment
62. How many consoles you can open in linux
63.
TROUBLESHOOTING:-