EX200 - 001 - RHEL6

Beschreibung

Teste
Vagner Aragão
Quiz von Vagner Aragão, aktualisiert more than 1 year ago
Vagner Aragão
Erstellt von Vagner Aragão vor fast 6 Jahre
29
0

Zusammenfassung der Ressource

Frage 1

Frage
Configure your Host Name, IP Address, Gateway and DNS. Host name: station.domain40.example.com /etc/sysconfig/network hostname=abc.com hostname abc.com IP Address: 172.24.40.40/24 Gateway: 172.24.40.1 DNS: 172.24.40.1
Antworten
  • ifcfg-eth0

Frage 2

Frage
Add 3 users: harry, natasha, tom. The requirements: The Additional group of the two users: harry, Natasha is the admin group. The user: tom's login shell should be non-interactive.
Antworten
  • Answer: # useradd -G admin harry # useradd -G admin natasha # useradd -s /sbin/nologin tom # id harry;id Natasha (Show additional group) # cat /etc/passwd
  • NA

Frage 3

Frage
Create a catalog under /home named admins. Its respective group is requested to be the admin group. The group users could read and write, while other users are not allowed to access it. The files created by users from the same group should also be the admin group.
Antworten
  • # cd /home/ # mkdir admins / # chown .admin admins/ # chmod 770 admins/ # chmod g+s admins/
  • NA

Frage 4

Frage
Configure a task: plan to run echo hello command at 14:23 every day.
Antworten
  • # which echo # crontab -e 23 14 * * * /bin/echo hello # crontab -l (Verify)
  • NA

Frage 5

Frage
Create a 2G swap partition which take effect automatically at boot-start, and it should not affect the original swap partition.
Antworten
  • # fdisk /dev/sda p (check Partition table) n (create new partition: press e to create extended partition, press p to create the main partition, and the extended partition is further divided into logical partitions) Enter +2G t l W partx -a /dev/sda partprobe mkswap /dev/sda8 Copy UUID swapon -a vim /etc/fstab UUID=XXXXX swap swap defaults 0 0 (swapon -s)
  • NA

Frage 6

Frage
Create a user named alex, and the user id should be 1234, and the password should be alex111.
Antworten
  • # useradd -u 1234 alex # passwd alex alex111 alex111
  • NA

Frage 7

Frage
Install a FTP server, and request to anonymous download from /var/ftp/pub catalog. (it needs you to configure yum direct to the already existing file server. )
Antworten
  • # cd /etc/yum.repos.d # vim local.repo [local] name=local.repo baseurl=file:///mnt enabled=1 gpgcheck=0 # yum makecache # yum install -y vsftpd # service vsftpd restart # chkconfig vsftpd on # chkconfig --list vsftpd # vim /etc/vsftpd/vsftpd.conf anonymous_enable=YES
  • NA

Frage 8

Frage
Configure a HTTP server, which can be accessed through http://station.domain40.example.com. Please download the released page from http://ip/dir/example.html.
Antworten
  • # yum install -y httpd # chkconfig httpd on # cd /var/www/html # wget http://ip/dir/example.html # cp example.com index.html # vim /etc/httpd/conf/httpd.conf NameVirtualHost 192.168.0.254:80 <VirtualHost 192.168.0.254:80> DocumentRoot /var/www/html/ ServerName station.domain40.example.com </VirtualHost>
  • NA

Frage 9

Frage
Configure the verification mode of your host account and the password as LDAP. And it can ldapuser40. The password is set as "password". And the certificate login successfully through can be downloaded from http://ip/dir/ldap.crt. After the user logs on , the user has no host directory unless you configure the autofs in the following questions.
Antworten
  • # yum groupinstall directory-client (1.krb5-workstation 2.pam-krb5 3.sssd) # system-config-authentication 1.User Account Database: LDAP 2.LDAP Search Base DN: dc=example,dc=com 3.LDAP Server: ldap://instructor.example.com (In domain form, not write IP) 4.Download CA Certificate 5.Authentication Method: LDAP password 6.Apply getent passwd ldapuser40
  • system-config-authentication LDAP Server: ldap//instructor.example.com (In domain form, not write IP)

Frage 10

Frage
Configure autofs to make sure after login successfully, it has the home directory autofs, which is shared as /rhome/ldapuser40 at the ip: 172.24.40.10. and it also requires that, other ldap users can use the home directory normally.
Antworten
  • # chkconfig autofs on # cd /etc/ # vim /etc/auto.master /rhome /etc/auto.ldap # cp auto.misc auto.ldap # vim auto.ladp ldapuser40 -rw,soft,intr 172.24.40.10:/rhome/ldapuser40 * -rw,soft,intr 172.16.40.10:/rhome/& # service autofs stop # server autofs start # showmount -e 172.24.40.10 # su - ladpuser40
  • NA

Frage 11

Frage
Configure the system synchronous as 172.24.40.10.
Antworten
  • # system-config-date
  • Answer: Graphical Interfaces: System-->Administration-->Date & Time

Frage 12

Frage
Change the logical volume capacity named vo from 190M to 300M. and the size of the floating range should set between 280 and 320. (This logical volume has been mounted in advance.)
Antworten
  • # vgdisplay (Check the capacity of vg, if the capacity is not enough, need to create pv , vgextend , lvextend) # lvdisplay (Check lv) # lvextend -L +110M /dev/vg2/lv2 # resize2fs /dev/vg2/lv2 mount -a (Verify) ------------------------------------------------------------------------------- (Decrease lvm) # umount /media # fsck -f /dev/vg2/lv2 # resize2fs -f /dev/vg2/lv2 100M # lvreduce -L 100M /dev/vg2/lv2 # mount -a # lvdisplay (Verify)
  • # e2fsck -f /dev/vg1/lvm02 # resize2fs -f /dev/vg1/lvm02 # mount /dev/vg1/lvm01 /mnt # lvreduce -L 1G -n /dev/vg1/lvm02 # lvdisplay (Verify)

Frage 13

Frage
Create a volume group, and set 16M as a extends. And divided a volume group containing 50 extends on volume group lv, make it as ext4 file system, and mounted automatically under /mnt/data.
Antworten
  • Answer: # pvcreate /dev/sda7 /dev/sda8 # vgcreate -s 16M vg1 /dev/sda7 /dev/sda8 # lvcreate -l 50 -n lvm02 # mkfs.ext4 /dev/vg1/lvm02 http://www.gratisexam.com/# blkid /dev/vg1/lv1 # vim /etc/fstab # mkdir -p /mnt/data UUID=xxxxxxxx /mnt/data ext4 defaults 0 0 # vim /etc/fstab # mount -a # mount (Verify)
  • NA

Frage 14

Frage
The Additional group of the two users: user2, user3 is the admin group Password: redhat
Antworten
  • Answer: # useradd -G admin user2 # useradd -G admin user3 # passwd user2 redhat # passwd user3 redhat
  • NA

Frage 15

Frage
Copy /etc/fstab to /var/tmp name admin, the user1 could read, write and modify it, while user2 without any permission.
Antworten
  • Answer: # cp /etc/fstab /var/tmp/ # chgrp admin /var/tmp/fstab # setfacl -m u:user1:rwx /var/tmp/fstab # setfacl -m u:user2:--- /var/tmp/fstab # ls -l -rw-rw-r--+ 1 root admin 685 Nov 10 15:29 /var/tmp/fstab
  • NA
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

Zeitformen
JohannesK
Juraexamen Karteikarten - Strafrecht
anna.grillborzer0656
Blut und Blutkreislauf
Ulrike Renauer
KORRE VO - Fragenkatalog überarbeitet
Jennifer Riegler
Euro-FH // Zusammenfassung SOPS3
Robert Paul
Themen der Vektorrechnung II
Paula Raithel
EC angewandte Sozialpsychologie Uni Wien
Alina S.
Vetie: Virofragen 2015
Johanna Tr
Basiswissen_MS-4.2_Foliensatz I_Stand_03.11.19
Bernd Leisen
Onlinequiz zu MS-4.2 Kapitel_3_Teil_I
Deborah Büscher
Vetie Pharma Übungsfragen 2019/2020
Maite J