Act now and download your Red Hat RH302 test today! Do not waste time for the worthless Red Hat RH302 tutorials. Download Most recent Red Hat Red Hat Certified Engineer on Redhat Enterprise Linux 5 (Labs) exam with real questions and answers and begin to learn Red Hat RH302 with a classic professional.
Q31. CORRECT TEXT
Set the Hostname station?.example.com where ? is your Host IP Address.
Answer and Explanation:
4. hostname station?.example.com àThis will set the host name only for current session. To set hostname permanently.
5. vi /etc/sysconfig/network
HOSTNAME=station?.example.com
6. service network restart
Q32. CORRECT TEXT
Create the user named jackie, curtin, david
Answer and Explanation:
1. useradd jackie
2. useradd curtin
3. useradd david
useradd command is used to create the user. All user's information stores in /etc/passwd and user;s shadow password stores in /etc/shadow.
Q33. CORRECT TEXT
Add a new logical partition having size 100MB and create the /data which will be the mount point for the new partition.
Answer and Explanation:
Use fdisk /dev/hda à To create new partition.Type n à For New
partitionsIt will ask for Logical or Primary Partitions. Press l for logical.It will ask for the Starting
Cylinder: Use the Default by pressing Enter Key.Type the Size: +100M à You can Specify either
Last cylinder of Size here.Press P to verify the partitions lists and remember the partitions
name.Press w to write on partitions table.Either Reboot or use partprobe command.Use mkfs -t
ext3 /dev/hda?Ormke2fs -j /dev/hda? à To create ext3 filesystem.vi /etc/fstabWrite:/dev/hda? /data
ext3 defaults 0 0Verify by mounting on current Sessions also:mount /dev/hda? /data
Q34. 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.
Q35. CORRECT TEXT
Add a cron schedule to take full backup of /home on every day at 5:30 pm to /dev/st0 device.
Answer and Explanation:
1. vi /var/schedule
30 17 * * * /sbin/dump -0u /dev/st0 /dev/hda7
2. crontab /var/schedule
3. service crond restart
We can add the cron schedule either by specifying the scripts path on /etc/crontab file or by creating on text file on crontab pattern.
cron helps to schedule on recurring events. Pattern of cron is:
Minute Hour Day of Month Month Day of Week Commands
0-59 0-23 1-31 1-12 0-7 where 0 and 7 means Sunday.
Note * means every. To execute the command on every two minutes */2.
Q36. CORRECT TEXT
Deny to all users except root to run cron schedule.
Answer and Explanation:
1. vi /etc/cron.allow
root
or
vi /etc/cron.deny
Write all user name to deny.
/etc/cron.allow, /etc/cron.deny file is used to control users to allow or deny. If /etc/cron.allow file is created only that users are allowed to run cron schedule. Another way to deny to users is /etc/cron.deny write all user name on single line.
Q37. CORRECT TEXT
Install the dialog-*
Answer and Explanation:
Questions asking you to install the dialog package from the server. In your Lab FTP server as well as NFS server are configured. You can install either through FTP or NFS.
1. Just Login to server1.example.com through FTP: ftp server1.example.com
2. Enter to pub directory: cd pub
3. Enter to RedHat/RPMS: cd RedHat/RPMS
4. Download the Package: mget dialog-*
5. Logout from the FTP server: bye
6. Install the package: rpm -ivh dialog-*
7. Verify the package either installed or not: rpm -q dialog
Q38. CORRECT TEXT
Your Local Domain is example.com. Configure the send mail server for you local LAN by following these conditions.
i. Any mail going from Local LAN should be masquerade to example.com
ii. Any incoming mail for info@example.com virtual address should be mapped to admin@example.com
iii. All outgoing mail should be send via smtp.abc.com mail server.
Answer and Explanation:
1. vi /etc/mail/local-host-names
example.com
2. vi /etc/mail/sendmail.mc
dnl # DEAMON_OPTIONS(`Port=smtp,Addr=127.0.0.1,Name=MTA`)dnl
MASQUERADE_AS(`example.com')dnl
define(`SMART_HOST',`smtp.abc.com')
3. m4 /etc/mail/sendmail.mc >/etc/mail/sendmail.cf
4. vi /etc/mail/virtusertable
info@example.com admin@example.com
5. vi /etc/mail/access
192.168.0 RELAY
/etc/mail/local-host-names file contains the aliases to hostname. Mail server program reads the
/etc/mail/sendmail.cf. To change the configuration on mail server, we should edit the
/etc/mail/sendmail.mc file and should generate the sendmail.cf using m4 command.
By default sendmail server allows to connect to local host only. So we should edit the
/etc/mail/sendmail.mc file to allow connect to other hosts.
By default sendmail server will not forward mail. We should specify on /etc/mail/access to relay or to block mail coming from domain or network or individual email address.
To masquerade the address, MASQUERADE_AS option is in /etc/mail/sendmail.mc.
SMART_HOST deliver all local mail locally and outgoing mail through another mail server.
/etc/mail/virtusertable file is used map virtual address to real address.
Eg.
info@example.com user1@example.com
enquiry@example.com admin@abc.com
Q39. CORRECT TEXT
You are a System administrator. Using Log files very easy to monitor the system. Now there are 50 servers running as Mail, Web, Proxy, DNS services etc. You want to centralize the logs from all servers into on LOG Server. How will you configure the LOG Server to accept logs from remote host ?
Answer and Explanation:
By Default system accept the logs only generated from local host. To accept the Log from other host configure:
1. vi /etc/sysconfig/syslog
SYSLOGD_OPTIONS="-m 0 -r"
Where
-m 0 disables 'MARK' messages.
-r enables logging from remote machines
-x disables DNS lookups on messages recieved with -r
2. service syslog restart
Q40. CORRECT TEXT
/data directory on linux server should make available on windows to only john with full access but read only to other users and make sure that /data can access only within example.com domain.
Configure to make available.
Answer and Explanation:
1. vi /etc/samba/smb.conf
[global]
netbios name=station?
workgroup=station?
security=user
smb passwd file=/etc/samba/smbpasswd
encrypt passwords=yes
hosts allow= .example.com
[data]
path=/data
public=no
writable=no
write list=john
browsable=yes
2. smbpasswd -a john
3. service smb start
4. chkconfig smb on
/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 the 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.