Sei sulla pagina 1di 13

RHCSA Exam Practice Question

Fill the form with your name / address / email Agree with the rules and accept it

* login in runlevel 5 with GUI with root:

- change the root password to "V2nCda10".

- assign the static ip

Ip : 192.168.0.X (X is your station number)

Netmask : 255.255.255.0 Gateway : 192.168.0.1 DNS : 192.168.0.254

- Set the Hostname stationX.example.com

Ans. root@station1 ~]#echo "V2nCda10" | passwd --stdin root root@station1 ~]#vim /etc/sysconfig/network-scripts/ifcfg-eth0 - & do following changes:

BOOTPROTO="static"

IPADDR="192.168.0.X"

NETMASK="255.255.255.0"

Gateway="192.168.0.1"

:wq root@station1 ~]# vim /etc/resolv.conf search example.com nameserver 192.168.0.254 :wq

RHCA Requirements with Questions and Solutions

Q.1 Once Your System is installed the distribution is available via YUM:

YUM ftp://instructor.example.com/pub/rhel6/dvd

Ans. root@station1 ~]# vim /etc/yum.repos.d/client.repo [Client] name=yum client

baseurl=ftp://instructor.example.com/pub/rhel6/dvd

gpgcheck=0

:wq root@station1 ~]# yum list all

Q.2 Create the following users, groups, and group membership:

- A group named sysusers.

- A user paula who belongs to sysusers as a secondary group.

- A user susan who belongs to sysusers as a secondary group.

- A user brad who does not have access to an interactive shell & who is not

a member of sysusers group.

- paula, susan and brad should all have the password of password.

Ans. root@station1 ~]#groupadd sysusers root@station1 ~]#useradd -G sysusers paula root@station1 ~]#useradd -G sysusers susan

root@station1 ~]#useradd -s /sbin/nologin brad root@station1 ~]#passwd paula & [ Give password of password for paula ]

root@station1 ~]#passwd brad

& [ Give password of password for brad ]

Q.3 create a collaborative directory /shared/sysusers with the following characteristics:

- Group ownership of /shared/sysusers is sysusers.

- The directory should be readable, writable, and accessible to member of

sysusers, but not to any other user.

access to all files and directories on the system.)

- Files created in /shared/sysusers automatically have group ownership set to the sysusers group. Ans. root@station1 ~]#mkdir -p /shared/sysusers root@station1 ~]#chgrp sysusers /shared/sysusers root@station1 ~]#chmod 2770 /shared/sysusers

(It is understood that root has

Q.4 Install the appropriate kernel update from

ftp://server1.example.com/pub/updates. The following criteria must be also be met:

- The updated kernel is the default kernel when the system is rebooted.

- The original kernel remains available and bootable on the system.

Ans. root@station1 ~]#lftp server1.example.com/pub/updates root@station1 ~]#lftp server1.example.com:/pub/updates> get kernel-<Tab> root@station1 ~]#lftp server1.example.com:/pub/updates> bye

( Note: Your New Grub file look like below after install the new kernel )

root@station1 ~]#rpm -ivh kernel-<Tab> root@station1 ~]#vim /boot/grub/grub.conf

default=0

timeout=5

splashimage=(hd0,0)/grub/splash.xpm.gz

hiddenmenu title Red Hat Enterprise Linux Server (2.6.32-71.1.1.el6.i686) root (hd0,0) kernel /vmlinuz-2.6.32-71.1.1.el6.i686 ro root=LABEL=/ rhgb quiet initrd /initrd-2.6.32-71.1.1.el6.i686.img title Red Hat Enterprise Linux Server (2.6.32-71.el6.i686) root (hd0,0) kernel /vmlinuz-2.6.32-71.el6.i686 ro root=LABEL=/ rhgb quiet initrd /initrd-2.6.32-71.el6.i686.img

Q.5 Set up the default local print queue to forward jobs to the IPP (CUPS) print queue stationX on instructor.example.com, where X is your station number. Configure the printer as a "Generic-text-only" print queue. Ans. root@station1 ~]#system-config-printer --> Click New Printer --> Type stationX --> select ipp ( Internet Printing Protocol ) --> Type Hostname --> instructor.example.com --> Type printername --> stationX --> select Generic --> Text Only Printer Type

& than click your stationX under local printer at the left hand-side after that click make default printer tab at the right hand-side

Q.6 The user andrew must configure a cron job that runs daily at 15:25 local time and executes

- /bin/echo hello >>/dev/tty1

Ans. root@station1 ~]#crontab -u paula -e 25 15 * * * /bin/echo hello >>/dev/tty1 root@station1 ~]#service crond restart; chkconfig crond on

Q.7 Configure your machine as LDAP client. LDAP server and LDAP directory tree information will be given in the exam.

- ldapuserX 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.

- All ldapuser users have a password of password

Ans. root@station1 ~]#system-config-authentication --> On the Identity & Authentication tab, select User A/C Configuration check box, choose LDAP for User A/C Database --> Configure LDAP Search Base DN with: dc=example,dc=com --> Configure LDAP Server with the URI: ldap://instructor.example.com --> Select Use TLS to encrypt connections and Click Download CA Certificate --> Enter Certificat URL: http://instructor.example.com/pub/EXAMPLE-CA-CERT & click ok --> Enable LDAP under Authentication Configuration & Click Apply button. root@station1 ~]#getent passwd ldapuserX [ To check client & server mapping ] * Now check by logging through ldapuserX (Suppose you are sitting at station2 then your user will be ldapuser2) * the password of ldapuser2 is password

Q.8 Configure autofs to automount the home directories of LDAPUSER users. Note the following:

- server1.example.com (192.168.0.254) NFS-exports /home/guests for ldapuser,

- ldapuserX's home directory is server1.example.com:/home/guests/ldapuserX, where X is your station number

- ldapuserX's home directory should be automounted locally beneath

/home/guests as /home/guests/ldapuserX

- home directories must be writable by their users.

- while you are able to log in as any of the user ldapuser1 through

ldapuser20, the only home directory that is accessible from your system is ldapsuserX * Example: station2 would configure the automounter such that ldapuser2's home directory /home/guests/ldapuser2 gets mounted

automatically upon login. The NFS share would be:

- instructor.example.com:/home/guests/ldapuser2.

Ans. root@station1 ~]# vim /etc/auto.master

/home/guests

/etc/auto.guests

Note: * ( /home/guests which is in your system ) * ( /etc/auto.guests this is new file which we create & we provide the info. to the client that what is coming from the LDAP Server. )

root@station1 ~]#vim /etc/auto.guests (or) /etc/auto.misc

* -fstype=nfs instructor.example.com:/home/guests/ldapuserX root@station1 ~]#service autofs stop

root@station1 ~]#service autofs start; chkconfig autofs on * Note: Now check login through your ldapuserX from the terminal & only your

station ldapuser will get the home

directory

Q.9 Copy the file /etc/fstab to /var/tmp. Configure the permissions of /var/tmp/fstab so that:

- the file /var/tmp/fstab is owned by the root user

- the file /var/tmp/fstab belong to the group root

- the file /var/tmp/fstab should not be execubable by anyone

- the user paula 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 Ans. root@station1 ~]#cp -p /etc/fstab /var/tmp root@station1 ~]#ls -l /var/tmp/fstab * if required change them root@station1 ~]#chown root:root /var/tmp/fstab root@station1 ~]#setfacl -m u:paula:rw- /var/tmp/fstab root@station1 ~]#setfacl -m u:susan:--- /var/tmp/fstab

Q.10 Configure your system so that it is an NTP client of server1.example.com. Ans. root@station1 ~]#system-config-date --> on Date and Time tab --> select check box Synchronize date and time over the network * Firstly remove all existing NTP servers entry & after that --> than click Add button * Type instructor.example.com and, * click show advanced options --> select check box Speed up initial Synchronization --> than click OK button ( NOW your system is configured as a NTP Client )

Q.11 Configure the FTP Server for anonymous Download Ans.

root@station1 ~]# yum install vsftpd

root@station1 ~]# service vsftpd restart; chkconfig vsftpd on

[ To Install ftp server rpm ]

Q.12 Your system has a new 100MB physical partition mounted under /mnt/new with a 100MB ext4 filesystem. Note: because partition sizes are seldom exactly what is specified when they are created, anything within the range of 90MB to 110MB is acceptable.

Q.13 Resize the lvm to 250M /home Ans. root@station1 ~]#lvscan [ HOW TO EXTEND LVM ] root@station1 ~]#umount /home root@station1 ~]#lvextend --size 250M /dev/vg1/lv-home root@station1 ~]#e2fsck -f /dev/vg1/lv-home root@station1 ~]#resize2fs /dev/vg1/lv-home root@station1 ~]#mount /dev/vg1/lv-home /home

[ HOW TO REDUCE LVM ] root@station1 ~]#umount /home root@station1 ~]#e2fsck -f /dev/vg1/lv-home root@station1 ~]#resize2fs /dev/vg1/lv-home 250M root@station1 ~]#lvreduce --size 250M /dev/vg1/lv-home root@station1 ~]#mount /dev/vg1/lv-home /home

Q.14 Resize the LVM using the GUI tool by the PE value.

Q.15 Create a swap partition of 756M MB and make it available permanent.

[ Pattern - 1 ]

Ans. root@station1 ~]# fdisk /dev/vda command ( m for help ):n First Cylinder: <Leave Blank> Last Cylinder:+756M

[ To make new partition ]

command ( m for help ):w

[ To save & exit partition table ]

root@station1 ~]#reboot

[ To active new partition table ]

* After reboot run following command to make swap partition for

permanent: -

root@station1 ~]#mkswap /dev/vdaN

root@station1 ~]#swapon /dev/vdaN

root@station1 ~]#swapon -s

root@station1 ~]#vim /etc/fstab /dev/vdN

[ Where N is your partiton number ] [ Where N is your partiton number ]

[ To check new swap partition is active or not ]

swap

[ To make swap partition for permanent ]

swap

default

0 0

 

:wq

[ To save & exit fstab file ]

[

Pattern - 1 ]

root@station1 ~]#cd / root@station1 ~]#dd if=/dev/zero of=swapfile bs=756M count=1

root@station1 ~]#mkswap swapfile root@station1 ~]#swapon swapfile root@station1 ~]#swapon -s root@station1 ~]#vim /etc/fstab

[ To make swap partition for permanent ]

/swapfile

swap

swap

default

0 0

:wq

[ To save & exit fstab file ]

 

Q.16 Configure Internet web server for your domain. Download the index.html from the server (IP and location will be specified in the exam) into the default document root of the server

- Download ftp://instructor.example.com/pub/rhce/station.html

- Rename the downloaded file to index.html

- Copy this index.html file to the DocumentRoot of your web server

- Do NOT make any modifications to the content of index.html

Ans. root@station1 ~]#yum install httpd -y root@station1 ~]#cd /var/www/html root@station1 ~]#lftp instructor.example.com/pub/rhce root@station1 ~]#lftp instructor.example.com:/pub/rhce> get station.html root@station1 ~]#lftp instructor.example.com:/pub/rhce> bye root@station1 ~]#mv station.html index.html root@station1 ~]#vim /etc/httpd/conf/httpd.conf

* than press shift + g ( to go End of the file ) <VirtualHost 192.168.0.X:80> ServerAdmin root@stationX.example.com DocumentRoot /var/www/html ServerName stationX.example.com DirectoryIndex index.html </VirtualHost>

root@station1 ~]#service httpd restart; chkconfig httpd on root@station1 ~]#vim /etc/hosts

192.168.0.X stationX.example.com

stationX

* than save & exit the file and check the Web Server, open firefox & type url: stationX.example.com

* NOTE:- When we download the file directly into the default DocumentRoot then there is no need to change the security context of the index.html file

Q.17 Find a file created by a user susan and copy it into a directory some directory.

Ans. root@station1 ~]# find / -user susan -exec cp -rpf {} /root/data/ \; 2> /dev/null

Q.18 Find a string from a file and copy that string in a different file (name and location will be specified).

Ans. root@station1 ~]#grep root /etc/passwd --color > /root/Desktop/newfile

NOTE: You will note that some requirements specify that a service should not be available from the DNS domain my133t.org (172.24.0.0/255.255.0.0). All system in that domain are in the 192.168.0.0/255.255.255.0 subnet.

Q.1.SELinux must be running in the Enforcing Mode.

Ans. Simply edit it's configuration file set the enfocing mode infront of SELINUX directive like that, & to make it permanenet reboot your system.

root@station1 ~]#vim /etc/sysconfig/selinux SELINUX=enforcing :wq root@station1 ~]#init 6

Q.2 Enable IP Forwarding on your machine.

Ans-

root@station1 ~]#vim /etc/sysctl.conf

net.ipv4.ip_forward = 1 :wq

root@station1 ~]#sysctl -w

root@station1 ~]#sysctl -p

Q.3 Configure SSH access as follows

- susan has remote SSH access to your machine from within example.com

- Clients within my133t.org should NOT have access to SSH on your system

Ans-

root@station1 ~]#vim /etc/ssh/sshd_config

AllowUsers susan root :wq

root@station1 ~]#vim /etc/hosts.deny sshd:ALL EXCEPT .example.com :wq

You may use whatever you want

root@station1 ~]# iptables -A INPUT -s 192.168.0.0/24 -p tcp --dport 22 -j ACCEPT root@station1 ~]# iptables -A INPUT -s 192.168.0.0/24 -p udp --dport 22 -j ACCEPT root@station1 ~]#chkconfig sshd on ;/etc/init.d/sshd restart

Q.4 Configure POP3 email on your system according to these criteria:

- brad must be able to retrieve email from your machine using POP3 from within example.com

- Clients within my133t.org domain should not have access to your POP3 service

Ans-

root@station1 ~]#yum install dovecot root@station1 ~]#vim /etc/dovecot/dovecot.conf protocols = imap pop3 :x root@station1 ~]#/etc/init.d/dovecot restart;chkconfig dovecot on root@station1 ~]#iptables -F root@station1 ~]#iptables -A INPUT ! -s 192.168.0.0/24 -p tcp --dport 22 -j REJECT root@station1 ~]#iptables -A INPUT ! -s 192.168.0.0/24 -p udp --dport 22 -j REJECT root@station1 ~]#service iptables save

Q.5 Configure FTP access on your system:

- Clients within the example.com domain should have anonymous FTP access to your machine. - Clients outside example.com domain should not have access to your FTP service

Ans-

root@station1 ~]#yum install vsftpd root@station1 ~]#getsebool -a |grep ftp root@station1 ~]#setsebool -P allow_ftpd_full_access on root@station1 ~]#vim /etc/hosts.deny

vsftpd,sshd:ALL EXCEPT .example.com :wq

root@station1 ~]#/etc/init.d/vsftpd restart;chkconfig vsftpd on

Q.6 share the /shared directory via SMB:

- Your SMB server must be a member of the SMBGROUP workgroup

- The share name must be shared

- The shared share must be available to example.com domain clients only

- The shared share must be browseable

- susan mush have read access to the share, authentication with the same password password, if necessary.

Ans-

root@station1 ~]# mkdir /shared root@station1 ~]#chcon -R -t samba_share_t /shared root@station1 ~]#getsebool -a |grep samba root@station1 ~]#setsebool -P samba_enable_home_dirs on root@station1 ~]#vim /etc/samba/smb.conf workgroup = SMBGROUP interface lo eth0 192.168.0.12/24 host allow 127. 192.168.0.

[shared] comment = shared path = /shared browseable = yes valid users = susan :wq

root@station1 ~]#/etc/init.d/smb restart;chkconfig smb on root@station1 ~]#smbpasswd -a susan New SMB password:password Retype new SMB password:password

******

******

root@station1 ~]#service smb restart root@station1 ~]#smbclient -L localhost -N root@station1 ~]#smbclient //192.168.0.12/shared -U susan Enter susan's password:

Domain=[SMBGROUP] OS=[Unix] Server=[Samba 3.5.4-68.el6] smb: \>

Q.7 Configure Internet web server for your domain. Download the index.html from

the server. (IP and location will be specified in the exam) into the default document root of the server

-

-

-

-

Download ftp://instructor.example.com/pub/rhce/station.html

Rename the downloaded file to index.html^M

Copy this index.html file to the DocumentRoot of your web server

Do NOT make any modifications to the content of index.html

Ans-

root@station1 ~]#yum install httpd

root@station1 ~]#cd /var/www/html

root@station1 ~]#ftp instructor.example.com Connected to instructor.example.com (192.168.0.254).

220 (vsFTPd 2.2.2)

Name (instructor.example.com:root): ftp

331 Please specify the password.

Password:

230 Login successful.

Remote system type is UNIX. Using binary mode to transfer files. ftp> cd pub/rhce

250 Directory successfully changed.

ftp> get station.html index.html

(here define username ftp) the ftp user password is ftp)

(&

(switch into rhce directory)

ftp>bye

root@station1 ~]#vim /etc/httpd/conf/httpd.conf

NameVirtualHost 192.168.0.17:80

(enter your ip address before port 80)

#

VirtualHost example:

#

Almost any Apache directive may go into a VirtualHost container.

#

The first VirtualHost section is used for requests without a known

#

server name.

#

<VirtualHost 192.168.0.17:80>

(again enter your ip address before port 80)

ServerAdmin root@desktop17.example.com DocumentRoot /var/www/html ServerName desktop17.example.com DirectoryIndex index.html </VirtualHost> :wq

(Define here your document root) (Define here your website name) (Define here directory index)

root@station1 ~]#/etc/init.d/httpd restart;chkconfig httpd on

Q.8 Export your /shared directory via NFS to the example.com domain only:

- You can check your shared directory but shoumount will not allow becuse you login from local user - You may check by using /net directory

Ans-

root@station1 ~]#vim /etc/exports /shared *.example.com(rw,sync) :wq root@station1 ~]#chkconfig nfs on root@station1 ~]#service nfs restart root@station1 ~]#cd /net/192.168.0.17 root@station1 ~]#ll total 0 dr-xr-xr-x. 3 root root 0 Jul 28 19:44 shared

Q.9 Configure an email alias for your MTA such that mail sent to acctmgr is received by the local user paula.

Ans-

root@station1 ~]#vim /etc/aliases acctmgr: paula :wq root@station1 ~]#newaliases

Q.10 Configure SMTP mail service according to the following requirements:

- Your mail server should accept mail from remote hosts and localhost

- susan must be able to receive mail from remote hosts

- Mail delivered to susan should spool into the default mail spool for susan, /var/spool/mail/susan root@station1 ~]#yum install postfix root@station1 ~]#vim /etc/postfix/main.cf

myhostname = desktop17.example.com mydomain = example.com myorigin = $mydomain inet_interfaces = all #inet_interfaces = localhost

(set your hostname) (define your domain name) (set myorigin) (uncomment this line) (comment this line)

#mydestination = $myhostname, localhost.$mydomain, localhost

#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain (uncomment this line) mynetworks = 192.168.0.0/24, 127.0.0.0/8 :wq

(comment this line)

root@station1 ~]#/etc/init.d/postfix restart;chkconfig postfix on

Q.11 Extend your web server to include a virtual host for the site http://wwwX.example.com, where X is your station number, then perform the following steps:

- Set the DocumentRoot to /var/www/virtual

- Download ftp://instructor.example.com/pub/rhce/www.html

- Rename the downloaded file to index.html^M

- Place this index.html in the DocumentRoot of the virtual host

- Do NOT make any modifications to the content of index.html

- Ensure that susan is able to create content in /var/www/virtual

* NOTE: The original web site http://stationX.example.com must still be accessable, DNS resolution for the hostname wwwX.example.com is already provided bye NameServer on instructor.example.com.

Ans-

root@station1 ~]#mkdir /var/www/virtual root@station1 ~]#cd /var/www/virtual

root@station1 ~]#ftp instructor.example.com

Connected to instructor.example.com (192.168.0.254).

220 (vsFTPd 2.2.2)

Name (instructor.example.com:root):ftp

331 Please specify the password.

Password:

230 Login successful.

Remote system type is UNIX. Using binary mode to transfer files. ftp> cd pub/rhce

250 Directory successfully changed.

ftp> get www.html index.html ftp>bye

(here define username ftp) the ftp user password is ftp)

(&

(switch into rhce directory)

root@station1 ~]#vim /etc/httpd/conf/httpd.conf <VirtualHost 192.168.0.17:80> ServerAdmin root@desktop17.example.com DocumentRoot /var/www/virtual ServerName www17.example.com DirectoryIndex index.html </VirtualHost> :wq

(Define here your document root) (Define here your website name) (Define here directory index)

root@station1 ~]#/etc/init.d/httpd restart;chkconfig httpd on

Q.12 Pass the kernel argument sysctl=1 to the kernel and make sure that the argument is available across the reboot.

Ans-

root@station1 ~]#vim /etc/grub.conf

:wq

default=0

timeout=5

splashimage=(hd0,0)/grub/splash.xpm.gz

hiddenmenu title Red Hat Enterprise Linux Server (2.6.32-71.el6.x86_64.debug)

root (hd0,0) kernel /vmlinuz-2.6.32-71.el6.x86_64 ro root=/dev/mapper/vol0-root rd_LVM_LV=vol0/root rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto

sysctl=1

initrd /initramfs-2.6.32-71.el6.x86_64.img

rhgb quiet

root@station1 ~]#cat /proc/cmdline ro root=/dev/mapper/vol0-root rd_LVM_LV=vol0/root rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=129M@0M sysctl=1 rhgb quiet

Q.13 Create a script that should print foo or bar when user input foo or bar otherwise show something else.

Ans-

vim script.sh #!/bin/bash

F1=$1

if [ $F1 == foo ];then echo "bar" elif [ $F1 == bar ];then echo "foo" else echo "Please Type foo or bar" fi :wq

root@station1 ~]#sh script.sh foo bar root@station1 ~]#sh script.sh bar foo root@station1 ~]#sh script.sh data Please tyep foo or bar

Q.14 Mount a iso file placed at /root permanently to a directory /mnt/data.

Ans-

root@station1 ~]#ls -l /root/oracle6i.iso -rw-r--r--. 1 root root 196976640 Jul 28 20:13 /root/oracle6i.iso root@station1 ~]#vim /etc/fstab

/root/oracle6i.iso

:wq root@station1 ~]#mount -a

/mnt/data iso9660 ro,loop 0 0

Q.15 Configure yourself as ISCSI initiator to the ISCSI target instructor.example.com. Then create a partition of 1200MB and mount it under

/mnt/data1.

Ans-

root@station1 ~]#yum install iscsi-initiator-utils

Now discover the target by using following command

root@station1 ~]#iscsiadm -m discovery -t st -p instructor.example.com

Starting iscsid:

192.168.0.254:3260,1 iqn.2008-09.com.example:server.target1

[

OK

]

Now login into target by using this command

root@station1 ~]#iscsiadm -m node iqn.2008-09.com.example:server.target1 -l Logging in to [iface: default, target: iqn.2008- 09.com.example:server.target1,portal: 192.168.0.5,3260] Login to [iface: default, target: iqn.2008-09.com.example:server.target1, portal:

192.168.0.5,3260] successful.

Now list your target to check it's name, use the following command & create a partition of 1200MB & mount it on /mnt/data1

root@station1 ~]#fdisk -l root@station1 ~]#fdisk /dev/sdb #WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u').

Command (m for help): n First cylinder (3648-30401, default 3648):

Using default value 3648 Last cylinder, +cylinders or +size{K,M,G} (3648-30401, default 30401):+1200MB Command (m for help): w root@station1 ~]#partprobe /dev/sdb root@station1 ~]#mkfs.ext4 /dev/sdb1 root@station1 ~]#mkdir /mnt/data1 root@station1 ~]#blkid /dev/sdb1 >>/etc/fstab /dev/sdb1: UUID="d8ba87e3-df97-4503-aafd-f922c411969c" TYPE="ext4"

root@station1 ~]#vim /etc/fstab UUID="d8ba87e3-df97-4503-aafd-f922c411969c" /mnt/data1 ext4 _netdev 1 2 :wq root@station1 ~]#mount -a

Q.16 The user paula should not have permission to schedule a cron job.

Ans-

root@station1 ~]#vim /etc/cron.deny paula :wq root@station1 ~]#/etc/init.d/crond restart;chkconfig crond on

Q.17 Extend your website. Create a directory in document root name as secret. Placed document root in configuration file as /var/www/html/secret. This web-site should be access on your local host and should be acces on others.

Ans-

root@station1 ~]#mkdir /var/www/html/secret root@station1 ~]#vim /var/www/html/secret/index.html local wesite :wq

root@station1 ~]#vim /etc/httpd/conf/httpd.conf <VirtualHost 192.168.0.17:80> ServerAdmin root@desktop17.example.com DocumentRoot /var/www/html/secret ServerName desktop17.example.com DirectoryIndex index.html

</VirtualHost> :wq root@station1 ~]#/etc/init.d/httpd restart ;chkconfig httpd on root@station1 ~]#elinks http://desktop17.example.com/secret

(Define here your document root) (Define here your website name) (Define here directory index)

BEST OF LUCK