Q1. CORRECT TEXT
There is a HTTP server 192.168.0.254 and all required packages are dumped in /var/www/html/rhel5 of that server. Install the Redhat Enterprise Linux 5 by creating following partitions:
/ 1000
/boot 200
/home 1000
/var 1000
/usr 4000
swap 2X256 (RAM SIZE)
Answer and Explanation:
Note: Examiner will provide you the Installation startup CD. And here mentioned size may vary see on the exam paper.
1. Insert the CD on CD-ROM and start the system.
2. In Boot: Prompt type linux askmethod
3. It will display the Language, keyboard selection.
4. It will ask you for the installation method.
5. Select the HTTP from the list
6. It will ask the IP Address, Net mask, Gateway and Name Server. Select Use
Dynamic IP Configuration: because DHCP Server will be configured in your exam lab.
7. It will ask for the Web site name and Redhat Enterprise Linux Directory.
Specify the HTTP Server: 192.168.0.254
Directory: rhel5 à Because Default Directory for http is /var/www/html
8. After Connecting to the HTTP Server Installation start. Go upto the partition screen by selecting the different Options.
9. Create the partition According to the Question because Size and what-what partition should you create at installation time is specified in your question
10. Then select the MBR Options, time zone and go upto package selections.
It is another Most Important Time of installation. Due to the time limit, you should be care about the installation packages. At Exam time you these packages are enough.
X-Window System
GNOME Desktop
(these two packages are generally not required)
Administration Tools.
System Tools
Windows File Server
FTP Servers
Mail Servers
Web Servers
Network Servers
Editors
Text Based Internet
Server Configuration Tools
Printing Supports
When installation will complete, your system will reboot. Jump for another Question.
Answer:
Q2. CORRECT TEXT
Your System is going to use as a Router for two networks. One Network is 192.168.0.0/24 and Another Network is 192.168.1.0/24. Both network's IP address has assigned. How will you forward the packets from one network to another network?
Answer and Explanation:
1. echo "1" >/proc/sys/net/ipv4/ip_forward
2. vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
If you want to use the Linux System as a Router to make communication between different networks, you need enable the IP forwarding. To enable on running session just set value 1 to /proc/sys/net/ipv4/ip_forward. As well as automatically turn on the IP forwarding features on next boot set on /etc/sysctl.conf file.
Answer:
Q3. CORRECT TEXT
Install the Redhat Linux RHEL 4 through NFS. Where your Server is server1.example.com having IP 172.24.254.254 and shared /var/ftp/pub. The size of the partitions are listed below:
/ à 1048
/home à 1028
/boot à 512
/var à 1028
/usr à 2048
Swap -> 1.5 of RAM Size
/archive à configure the RAID Level 0 of remaining all free space.
After completing the installation through NFS solve the following questions. There are two networks 172.24.0.0/16 and 172.25.0.0/16. As well as there are two domains example.com on 172.24.0.0/16 network and my133t.org on 172.25.0.0/16 network. Your system is based on example.com domain.
Answer and Explanation:
1. Insert the CD on CD-ROM and start the system.
2. In Boot: Prompt type linux askmethod
3. It will display the language, keyboard selection.
4. It will ask you for the installation method.
5. Select the NFS Image from the list
6. It will ask the IP Address, Net mask, Gateway and Name Server. Select Use
Dynamic IP Configuration: because DHCP Server will be configured in your exam lab.
7. It will ask for the NFS Server Name and Redhat Enterprise Linux Directory.
Specify the NFS Server: 172.24.254.254
Directory: /var/ftp/pub
8. After Connecting to the NFS Server Installation start in GUI. Go up to the partition screen by selecting the different Options.
9. Create the partition According to the Question because Size and what-what partition should you create at installation time is specified in your question
10. Create the two RAID partitions having equal size of remaining all free space.
11. Click on RAID button
12. Type mount point /archive
13. Select RAID Level 0
14. Click on ok
15. Then select the MBR Options, time zone and go upto package selections.
It is another Most Important Time of installation. Due to the time limit, you should care about the installation packages. At Exam time you these packages are enough.
X-Window System
GNOME Desktop
(these two packages are generally not required)
Administration Tools.
System Tools
Windows File Server
FTP Servers
Mail Servers
Web Servers
Network Servers
Editors
Text Based Internet
Server Configuration Tools
Printing Supports
When installation will complete, your system will reboot. Jump for another Question.
Answer:
Q4. CORRECT TEXT
Create the directory /storage and group owner should be the sysusers group.
Answer and Explanation:
1. chgrp sysusers /storage
2. Verify using ls -ld /storage command. You should get like
drwxr-x--- 2 root sysusers 4096 Mar 16 17:59 /storage
chgrp command is used to change the group ownership of particular files or directory.
Another way you can use the chown command.
chown root:sysusers /storage
Answer:
Q5. CORRECT TEXT
You have a domain in your LAN named example.com. Allow the FTP connection only from local domain.
Answer and Explanation:
1. vi /etc/hosts.deny
vsftpd:ALL EXCEPT .example.com
We can secure the services using tcp_wrappers. There are main two files, /etc/hosts.allow and /etc/hosts.deny.
There will be three stage access checking
-Is access explicitly permitted? Means permitted from /etc/hosts.allow?
- Otherwise, Is access explicitly denied? Means denied from /etc/hosts.deny?
- Otherwise, by default permit access if neither condition matched.
To deny the services we can configure /etc/hosts.deny file using ALL and EXCEPT operation.
Pattern of /etc/hosts.allow and /etc/hosts.deny file is:
Demon_list:client_list:options
In Client list can be either domain name or IP address.
Answer:
Q6. CORRECT TEXT
Create the user named user1, user2, user3
Answer and Explanation:
2. useradd user1
3. useradd user2
4. useradd user3
5. passwd user1
6. passwd user2
7. passwd user3
We create the user using useradd command and we change the password of user using passwd command. If you want to set the blank password use: passwd -d username.
Answer:
Q7. CORRECT TEXT
There are some part-time staff in your office. And you gave the username user9 and user10 to them. Their Office time is 12-2pm on Sunday, Monday and Friday. Configure to login only on their office time.
Answer and Explanation:
1. vi /etc/security/time.conf
login;*;user9|user10;SuMoFri1200-1400
2. vi /etc/pam.d/login
account required pam_time.so
For Time based authentication, we should configured in /etc/security/time.conf
Syntax of /etc/security/time.conf
services;ttys;users;times
services
is a logic list of PAM service names that the rule applies to.
ttys
is a logic list of terminal names that this rule applies to.
users
is a logic list of users to whom this rule applies.
times
the format here is a logic list of day/time-range entries the days are specified by a sequence of two character entries, MoTuSa for example is Monday Tuesday and Saturday. Note that repeated days are unset MoMo = no day, and MoWk = all weekdays bar Monday. The two character combinations accepted are
Mo Tu We Th Fr Sa Su Wk Wd Al
the last two being week-end days and all 7 days of the week respectively. As a final example, AlFr means all days except Friday.
pam_time modules checks the file /etc/security/time.conf for authentication. So, we should call the pam_time modules in /etc/pam.d/login.
Answer:
Q8. CORRECT TEXT
The System you are using is for NFS (Network File Services). Some important data are shared from your system. Make automatically start the nfs and portmap services at boot time.
Answer and Explanation:
We can control the services for current session and for next reboot time. For current Session, we use service servicename start or restart or stop or status. For automatically at next reboot time:
3. chkconfig servicename on or off
eg: chkconfig nfs on
chkconfig portmap on
or
ntsysv
Select the nfs and portmap services.
4. Reboot the system and identify whether services are running or not.
Answer:
Q9. CORRECT TEXT
One Package named zsh is dump on ftp://server1.example.com under /pub/updates directory and your FTP server is 192.168.0.254. Install the package zsh.
Answer and Explanation:
1. rpm -ivh ftp://server1/example.com/pub/updates/zsh-*
or
1. Login to ftp server : ftp ftp://server1.example.com using anonymous user.
2. Change the directory: cd pub and cd updates
3. Download the package: mget zsh-*
4. Quit from the ftp prompt : bye
5. Install the package
6. rpm -ivh zsh-*
7. Verify either package is installed or not : rpm -q zsh
Answer:
Q10. CORRECT TEXT
There are more then 400 Computers in your Office. You are appointed as a System Administrator.
But you don't have Router. So, you are going to use your One Linux Server as a Router. How will you enable IP packets forward?
Answer and Explanation:
1. /proc is the virtual filesystem, we use /proc to modify the kernel parameters at running time.
# echo "1" >/proc/sys/net/ipv4/ip_forward
2. /etc/sysctl.conf àwhen System Reboot on next time, /etc/rc.d/rc.sysinit scripts reads the file
/etc/sysctl.conf. To enable the IP forwarding on next reboot also you need to set the parameter.
net.ipv4.ip_forward=1
Here 0 means disable, 1 means enable.
Answer:
Q11. CORRECT TEXT
There are mixed lots of System running on Linux and Windows OS. Some users are working on Windows Operating System. You want to make available /data directory to samba users only from 192.168.0.0/24 network. Configure the samba server.
Answer and Explanation:
1. vi /etc/samba/smb.conf
[global]
netbios name=station?
workgroup = mygroup
server string=Share from Linux Server
security=user
smb passwd file=/etc/samba/smbpasswd
encrypt passwords=yes
hosts allow=192.168.0.
[data]
path=/data
writable=yes
public=no
browsable=yes
2. service smb start| restart
3. chkconfig smb on
Samba servers helps to share the data between linux and windows. Configuration file is /etc/samba/smb.conf. There are some pre-defined section, i. global à use to define the global options, ii. Printers à use to share the printers, iii. homes à use to share the user's home directory.
Security=user à validation by samba username and password. May be there are other users also.
To allow certain share to certain user we should use valid users option.
smbpasswd à Helps to change user's smb password. -a option specifies that the username following should be added to the local smbpasswd file.
If any valid users option is not specified, then all samba users can access the shared data. By Default shared permission is on writable=no means read only sharing. Write list option is used to allow write access on shared directory to certain users or group members.
To allow access the shared directory only from certain network or hosts, there is a option hosts allow= host or network. If this option is applied on global option, then it will apply to all shared directory.
Answer:
Q12. CORRECT TEXT
You are new System Administrator and from now you are going to handle the system and your main task is Network monitoring, Backup and Restore. But you don't know the root password.
Change the root password to redhat and login in default Runlevel.
Answer and Explanation:
When you Boot the System, it starts on default Runlevel specified in /etc/inittab:
Id:?:initdefault:
When System Successfully boot, it will ask for username and password. But you don't know the root's password. To change the root password you need to boot the system into single user mode.
You can pass the kernel arguments from the boot loader.
1. Restart the System.
2. You will get the boot loader GRUB screen.
3. Press a and type 1 or s for single mode
ro root=LABEL=/ rhgb queit s
4. System will boot on Single User mode.
5. Use passwd command to change.
6. Press ctrl+d
Answer:
Q13. CORRECT TEXT
Some users home directory is shared from your system. Using showmount -e localhost command, the shared directory is not shown. Make access the shared users home directory.
Answer and Explanation:
1. Verify the File whether Shared or not ? : cat /etc/exports
2. Start the nfs service: service nfs start
3. Start the portmap service: service portmap start
4. Make automatically start the nfs service on next reboot: chkconfig nfs on
5. Make automatically start the portmap service on next reboot: chkconfig portmap on
6. Verify either sharing or not: showmount -e localhost
7. Check that default firewall is running on system ? if running flush the iptables using iptables –F and stop the iptables service.
Answer:
Q14. CORRECT TEXT
You have a directory /local. You want to make available that directory to all the members of example.com and trusted.cracker.org. But directory should available in read and write to all the members of example.com domain and read only to cracker.org domain.
Answer and Explanation:
1. vi /etc/exports
/local *.example.com(rw,sync) trusted.cracker.org(ro,sync)
Check the SELinux Context, should be like this:
-rw-r--r-- root root system_u:object_r:exports_t /etc/exports
Use the restorecon -R /etc command to restore the selinux context of the file.
2. service nfs start | restart
3. service portmap start | restart
4. chkconfig nfs on
5. chkconfig portmap on
In Linux to share the data we use the /etc/exports file. Pattern is:
Path client(permission)
Shared Directory Path, Client can be single host or domain name or ip address. Permission should specify without space with client lists in parentheses. NFS is RPC service so portmapper service should restart after starting the nfs service. We can specify multiple clients' list separating by space with different shared option.
Answer:
Q15. CORRECT TEXT
Make Successfully Resolve to server1.example.com where DNS Server is 192.168.0.254.
Answer and Explanation:
1. vi /etc/resolv.conf
Write : nameserver 192.168.0.254
Answer: