Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
AM
BE
Search
Jump to Comments
PM
Recent Posts
RHCSA REDHAT 6.0 Sloved paper
Archives
December 2012
change ip-add
#system-config-network
change hostname
#vim /etc/sysconfig/network
set base.repo file
#vim /etc/yum.repos.d/base.repo
#reboot
Categories
Uncategorized
Meta
Register
Log in
Entries RSS
#iptables -L
#lokkit disabled
#lokkit selinux=permissive
Comments RSS
WordPress.com
1.LVM
Resize your LVM /home to 150MB
I)Reduce
#umount /home
#e2fsck -f /dev/vol0/home
#resize2fs /dev/vol0/home 150M
#lvreduce -L 150M /dev/vol0/home
#mount -a
#df -h
II)Extend
#lvextend -L 300M /dev/vol0/home
#resize2fs /dev/vol0/home
2.Usermgmt
Create a group sysadmin .Create users susan , natasha & harry .
Users susan & 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
password
converted by Web2PDFConvert.com
#groupadd sysadmin
#useradd -G sysadmin harry
#useradd -G sysadmin susan
#useradd -s /sbin/nologin natasha
#echo password|passwd stdin harry
#echo password|passwd stdin susan
#echo password|passwd stdin natasha
3.ACL
Copy /etc/fstab to /var/tmp/fstab . The user & group owner of that file should
be root .
All users should be able to read the file . No one should be able to execute .
susan should not be able to read nor write . natasha should be able to read &
write
#cp /etc/fstab /var/tmp
#getfacl /var/tmp/fstab
#setfacl -m u:susan:- /var/tmp/fstab
#setfacl -m u:natasha:rw /var/tmp/fstab
#getfacl /var/tmp/fstab
4.direct collaboration
Secure /data such that only group sysadmin can access it . Group owner should
be sysadmin &
all child directories & files by default should have group sysadmin.
(Permission)
#mkdir /data
#ls -ld /data
#chgrp sysadmin /data
#chmod 2070 /data
#ls -ld /data
5.LDAP
Configure an ldap client, where your ldap server is
rhgls.server.example.com(instructor.example.com) .
LDAP Base DN : dc=server,dc=example,dc=com (dc=example,dc=com).
Authenticate your ldap server using the certificate
ftp://rhgls.server.example.com/CA-CERT
(ftp://instructor.example.com/pub/EXAMPLE-CA-CERT) ..
You should be able to login as ldapuser10 via LDAP . This configuration must be
persistant after
restart . You will get the home directory only after solving automount question
#yum groupinstall directory-client*
#system-config-authentication
UserAccount-LDAP
LDAPBaseName-dc=example,dc=com
LDAPSERVER-ldap//instructor.example.com
#getent passwd ldapuser10
6.NTP
Configure Your NTP server as instructor.example.com
system->Administration->date&time
7.AUTOMOUNT 4 LDAP
Configure automount in such a way that the ldapuser10s home directory in
instructor.example.com:/home/guests/ldapuser10 should be mounted as local
directory
/home/guests/ldapuser10 when ldapuser10 logs in .This configuration must be
persistant after restart
converted by Web2PDFConvert.com
(ftp://instructor.example.com/pub/web/station.html) .
Do not make any modifications or changes to this file .
#lftp 192.168.0.254
get station.html
bye
#yum install httpd*
#mv station.html /var/www/html/index.html
#/etc/init.d/httpd restart
#chkconfig httpd on
#elinks http://desktop1.example.com(hostname)
13.user of Specific UID
Create a user jean .User id of this user should be 3564 .
#useradd -u 3564 jean
14.find
locate all files owned by user sasha & copy them to /home/lost+found/
# find / -user sasha -exec cp -vp {} /home/lost+found/ \;
^exc cmd ^src ^dstn ^ cmd syntax in find
15.grep
Search for the text strato in the file /usr/share/dict/words & copy this to a file
/root/lines.txt .The new file should not have any blank spaces or lines .
The 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 > /root/lines.txt
16.lvm
Create a logical volume wshare from the volume group wgroup .
The volume group should have extents of size 8MiB . The logical volume
should have 100 extents . Mount this lvm as /mnt/lvm .
#fdisk /dev/sda
n-1G-p-t-6-8e-p-w
#partx -a /dev/sda
#pvcreate /dev/sda6
#vgcreate -s 8M wgroup /dev/sda6
#lvcreate -l 100 -n wshare wgroup
#lvdisplay
#mkfs.ext4 /dev/wgroup/wshare
#mkdir /mnt/lvm
#vim /etc/fstab
/dev/wgroup/wshare /mnt/lvm ext4 defaults 0 0
:wq!
#mount -a
#df -h
#reboot
#uname -r (check new kernal)
About these ads
converted by Web2PDFConvert.com
Share this:
Like this:
Loading...
Leave a Comment
Leave a Reply
Enter your comment here...
converted by Web2PDFConvert.com