Documente Academic
Documente Profesional
Documente Cultură
7. The user tony must configure a cron job that runs daily at 16:45 local time a
nd executes /bin/echo ciao Ans:#crontab -e -u tony 45 16 * * * /bin/echo ciao :w
q #service crond restart #chkconfig crond on 8. Bind to the NIS domain GELATO pr
ovided by 192.168.0.254 for user authentication. Note the following:
nisuserx 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
Ans:#authconf ig-tui click Use NIS ?Next type Domain name and server address Domain
GELATO Server 192.168.0.254 ok login your user (eg:username is nisuser10,if you
r station no. is 10) and password isp a ssw o rd we can t get home directory 9. Co
nfigure autofs to automount the home directories of NIS users. Note the followin
g: server1.example.com (192.168.0.254) NFS-exports /rhome/stationx to your syste
m, where
x is your station number
nisuserx's home directory is server1.example.com:/rhome/stationx/nisuserx
nisuserx's home directory should be automounted locally beneath /rhome as /rhome
/nisuserx
home directories must be writable by their users
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 nisuserx.
Ans:#vi /etc/auto.master move to end line and type /rhome /etc/auto.misc :wq
#vi /etc/auto.misc
move to last line and type this
nisuser10
- -rw,sync 192.168.0.254:/rhome/station10/nisuser10 :wq #service autofs restart
#chkconfig autofs on Login your user ,then we get home directory of that particu
lar user
10. 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 belongs to the group root.
the file /var/tmp/fstab should not be executable by anyone.
the user tony is able to read and write /var/tmp/fstab
the user paula can neither write nor read /var/tmp/fstab
all other users (current or future) have the ability to read /var/tmp/fstab.
Ans:#cp /etc/fstab /var/tmp #ls - l /var/tmp/fstab
#setfacl m u:tony:rw /var/tmp/fstab
#setfacl m u:paula:0 /var/tmp/fstab
#chmod 644 /var/tmp/fstab
#umask 022
11.Configure your system so that it is an NTP client of server1.example.com Ans:
Open terminal?type system-config-date select Network Time Protocol ?click enable netwo
rk time protocol ?delete all entries click Add button?type server1.example.com and clic
k enter button Then click show advanced option ?enable synchronize system clock before
starting service and disable use local time source ?ok RHCE (Network Services and S
ecurity) Requirements SELinux must be running in Enforcing mode. We are using tw
o Networks in this section. Networks and dns names are mentioned below 192.168.0
.0/255.255.255.0 example.com 192.168.1.0/255.255.255.0 my133t.org 1.Configure SSH
access as follows: paula has remote SSH access to your machine from within examp
le.com Clients within my133t.org should NOT have access to ssh on your system An
s:#service sshd restart #iptables -A INPUT -p tcp -s 192.168.1.0/255.255.255.0 -
-dport 22 -j REJECT
#service iptables save
#service iptables restart
#smbpasswd -a paula New smb password:pa ssword Retype New smb password:p a sswor
d #service smb restart #chkconfig smb on 5.Implement a web server for the site h
ttp://stationX.example.com, then perform the following steps: Download ftp://ser
ver1.example.com/pub/rhce/station.html
Rename the downloaded file to index.html
Copy this index.html to the DocumentRoot of your web server
Do NOT make any modifications to the content of index.html
Ans:#service httpd restart #cd /var/www/html #ftp server1.example.com
login:anonymous
password: <none>
ftp>cd pub/rhce ftp>get station.html ftp>bye #mv station.html index.html #vi /et
c/httpd/conf/httpd.conf move to line no. 972 #NameVirtual Host *:80 remove # sym
bol and change * to your pc ip address eg: NameVirtualHost 192.168.0.12:80 copy
last 7 lines and paste Remove all # symbols of these lines Changes: <Virtual Hos
t 192.168.0.12:80> ServerAdmin webmaster@dummy-host.example.com DocumentRoot /va
r/www/html server Name station12.example.com
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
</Virtual Host>
:wq
#service httpd restart #chkconfig httpd on Open Mozilla Web Browser typeh tt p:/
/sta tio n1 2 .e xa mp le. co m?e n te r 6.Export your /common directory via NF
S to the example.com domain only. Note: because you will not have root access, y
ou will not be able to directly mount your exported
/common directory using your guest account on the system provided for testing. H
owever, the
automounter
on the system has been configured such that it will automount your /common direc
tory under
/home/guestx/nfs/stationx, where x is your station number. Consequently, success
ful execution of
ls /home/guestx/nfs/stationx indicates that the automounter was able to automoun
t your NFS
share.