You are on page 1of 6

change password #passwd username change ip-add #system-config-network change hostname #vim /etc/sysconfig/network set base.

repo file #vim /etc/yum.repos.d/base.repo #reboot #iptables -L #lokkit disabled #lokkit selinux=permissive .L!" #esi$e your L!" /home to %&"' ()#educe #umount /home #e*fsck -f /dev/vol&/home #resi$e*fs /dev/vol&/home %&" #lvreduce -L %&" /dev/vol&/home #mount -a #df -h (()+xtend #lvextend -L ,&&" /dev/vol&/home #resi$e*fs /dev/vol&/home *.-sermgmt .reate a group sysadmin ..reate users susan / natasha 0 harry . -sers susan 0 harry should be a part of the sysadmin group.natasha should not be a part of that group and she is given an non interactive shell.password of all users are 1password2 #groupadd sysadmin #useradd -3 sysadmin harry

#useradd -3 sysadmin susan #useradd -s /sbin/nologin natasha #echo 1password24passwd stdin harry #echo 1password24passwd stdin susan #echo 1password24passwd stdin natasha ,.5.L .opy /etc/fstab to /var/tmp/fstab . 6he user 0 group owner of that file should be root . 5ll users should be able to read the file . 7o one should be able to execute . susan should not be able to read nor write . natasha should be able to read 0 write #cp /etc/fstab /var/tmp #getfacl /var/tmp/fstab #setfacl -m u8susan8- /var/tmp/fstab #setfacl -m u8natasha8rw /var/tmp/fstab #getfacl /var/tmp/fstab 9.direct collaboration :ecure /data such that only group sysadmin can access it . 3roup owner should be sysadmin 0 all child directories 0 files by default should have group sysadmin. ;<ermission) #mkdir /data #ls -ld /data #chgrp sysadmin /data #chmod *&=& /data #ls -ld /data %.L>5< .onfigure an ldap client/ where your ldap server is rhgls.server.example.com;instructor.example.com) . L>5< 'ase >7 8 dc=server/dc=example/dc=com ;dc=example/dc=com). 5uthenticate your ldap server using the certificate ftp8//rhgls.server.example.com/.5-.+#6 ;ftp8//instructor.example.com/pub/+?5"<L+-.5-.+#6) .. @ou should be able to login as ldapuser & via L>5< . 6his configuration must be persistant after restart . @ou will get the home directory only after solving automount Auestion

#yum groupinstall directory-clientB #system-config-authentication -ser5ccount-L>5< L>5<'ase7ame-dc=example/dc=com L>5<:+#!+#-ldap//instructor.example.com #getent passwd ldapuser & C.76< .onfigure @our 76< server as instructor.example.com system-D5dministration-Ddate0time =.5-6E"E-76 9 L>5< .onfigure automount in such a way that the ldapuser &Fs home directory in instructor.example.com8/home/guests/ldapuser & should be mounted as local directory /home/guests/ldapuser & when ldapuser & logs in .6his configuration must be persistant after restart password for ldapuser is 1password #rpm -Aa autofs #vim /etc/auto.master /home/guests /etc/auto.misc 8wAG #vim /etc/auto.misc ldapuser & -rw/soft/intr instructor.example.com8/home/guests/ldapuser & 8wAG #/etc/init.d/autofs stop #/etc/init.d/autofs start #su ldapuser & H.Iernel (nstall the kernel from the site ftp8//rhgls.server.example.com/pub/updates . ;ftp8//instructor.example.com/pub/updates) .. 6he newly installed kernel should be default kernel . 6he previous kernel should be available 0 bootable at grub #yum install lftpB -y #lftp J*. CH.&.*%9 cd /pub/<ackages

mget kernal-B bye #rpm -ivh kernel-B #vim /etc/grub.conf defaults=& #estart and press up n down key before extracting J.cron 5dd a cron Kob for the user Kane /bin/echo hiya . 6his Kob should run every day at 8,& . #crontab -e -u Kane ,& B B B /bin/echo hiya 8wAG #crontab -l -u Kane &.ftp anon .reate an ftp server in such a way that anonymous user can login 0 download from the directory /var/ftp/pub/downloads #yum install vsftpdB #/etc/init.d/vsftpd restart #chkconfig vsftpd on #ftp machine ip .swap .reate a :wap partition of &&"' #fdisk -cu /dev/vda create new partition8n-DL &&"-Dt-%-H*-p-w #partx -a /dev/sda #mkswap /dev/sda% #vim /etc/fstab /dev/sda% swap swap defaults & & 8wAG #swapon /dev/sda% #swapon -s *.httpd page Most a webpage on your hostname . download the page to be hosted from

ftp8//rhgls.server.example.com/pub/web/station.html . ;ftp8//instructor.example.com/pub/web/station.html) . >o not make any modifications or changes to this file . #lftp J*. CH.&.*%9 get station.html bye #yum install httpdB #mv station.html /var/www/html/index.html #/etc/init.d/httpd restart #chkconfig httpd on #elinks http8//desktop .example.com;hostname) ,.user of :pecific -(> .reate a user Kean .-ser id of this user should be ,%C9 . #useradd -u ,%C9 Kean 9.find locate all files owned by user sasha 0 copy them to /home/lostLfound/ # find / -user sasha -exec cp -vp NO /home/lostLfound/ PQ Rexc cmd Rsrc Rdstn R cmd syntax in find %.grep :earch for the text SstratoT in the file /usr/share/dict/words 0 copy this to a file /root/lines.txt .6he new file should not have any blank spaces or lines . 6he order of the names in the new file should be same as the order in which it appears in the original file # grep strato /usr/share/dict/words D /root/lines.txt C.lvm .reate a logical volume wshare from the volume group wgroup . 6he volume group should have extents of si$e H"i' . 6he logical volume should have && extents . "ount this lvm as /mnt/lvm . #fdisk /dev/sda n- 3-p-t-C-He-p-w #partx -a /dev/sda #pvcreate /dev/sdaC

#vgcreate -s H" wgroup /dev/sdaC #lvcreate -l && -n wshare wgroup #lvdisplay #mkfs.ext9 /dev/wgroup/wshare #mkdir /mnt/lvm #vim /etc/fstab /dev/wgroup/wshare /mnt/lvm ext9 defaults & & 8wAG #mount -a #df -h

#reboot #uname -r ;check new kernal)

You might also like