EX200 Korean 無料問題集「RedHat Red Hat Certified System Administrator - RHCSA (EX200 Korean Version)」
lv1이라는 이름의 논리 볼륨 하나가 vg0 아래에 생성됩니다. 해당 논리 볼륨의 초기 크기는 100MB입니다. 이제 500MB 크기가 필요합니다. 데이터를 잃지 않고 해당 논리 볼륨의 크기를 500M으로 성공적으로 만듭니다. 또한 크기는 온라인에서 증가해야 합니다.
正解:
The LVM system organizes hard disks into Logical Volume (LV) groups. Essentially, physical hard disk partitions (or possibly RAID arrays) are set up in a bunch of equal sized chunks known as Physical Extents (PE). As there are several other concepts associated with the LVM system, let's start with some basic definitions:
Physical Volume (PV) is the standard partition that you add to the LVM mix. Normally, a physical volume is a standard primary or logical partition. It can also be a RAID array.
Physical Extent (PE) is a chunk of disk space. Every PV is divided into a number of equal sized PEs. Every PE in a LV group is the same size. Different LV groups can have different sized PEs.
Logical Extent (LE) is also a chunk of disk space. Every LE is mapped to a specific PE.
Logical Volume (LV) is composed of a group of LEs. You can mount a file system such as /home and /var on an LV.
Volume Group (VG) is composed of a group of LVs. It is the organizational group for LVM. Most of the commands that you'll use apply to a specific VG.
Verify the size of Logical Volume: lvdisplay /dev/vg0/lv1
Verify the Size on mounted directory: df -h or df -h mounted directory name Use: lvextend -L+400M /dev/vg0/lv1 ext2online -d /dev/vg0/lv1 to bring extended size online.
Again Verify using lvdisplay and df -h command.
Physical Volume (PV) is the standard partition that you add to the LVM mix. Normally, a physical volume is a standard primary or logical partition. It can also be a RAID array.
Physical Extent (PE) is a chunk of disk space. Every PV is divided into a number of equal sized PEs. Every PE in a LV group is the same size. Different LV groups can have different sized PEs.
Logical Extent (LE) is also a chunk of disk space. Every LE is mapped to a specific PE.
Logical Volume (LV) is composed of a group of LEs. You can mount a file system such as /home and /var on an LV.
Volume Group (VG) is composed of a group of LVs. It is the organizational group for LVM. Most of the commands that you'll use apply to a specific VG.
Verify the size of Logical Volume: lvdisplay /dev/vg0/lv1
Verify the Size on mounted directory: df -h or df -h mounted directory name Use: lvextend -L+400M /dev/vg0/lv1 ext2online -d /dev/vg0/lv1 to bring extended size online.
Again Verify using lvdisplay and df -h command.
autofs를 구성하여 로그인이 성공적으로 완료된 후 홈 디렉토리 autofs가 있는지 확인합니다. 이 디렉토리는 /rhome/ldapuser40으로 공유되며 ip: 172.24.40.10에서 실행됩니다. 또한 다른 LDAP 사용자도 홈 디렉토리를 정상적으로 사용할 수 있어야 합니다.
正解:
# 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
# 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
harry가 소유한 파일을 찾아 catalog: /opt/dir에 복사합니다.
正解:
# cd /opt/
# mkdir dir
# find / -user harry -exec cp -rfp {} /opt/dir/ \;
# mkdir dir
# find / -user harry -exec cp -rfp {} /opt/dir/ \;
1부(Node1 서버)
작업 7 [Linux 파일 시스템 접근]
사용자 natasha가 소유한 모든 파일을 찾아 출력을 /home/alex/files로 리디렉션합니다.
/etc 디렉토리에서 5MiB보다 큰 모든 파일을 찾아 /find/largefiles로 복사합니다.
작업 7 [Linux 파일 시스템 접근]
사용자 natasha가 소유한 모든 파일을 찾아 출력을 /home/alex/files로 리디렉션합니다.
/etc 디렉토리에서 5MiB보다 큰 모든 파일을 찾아 /find/largefiles로 복사합니다.
正解:
[root@node1 ~]# find / -name natasha -type f > /home/natasha/files
[root@node1 ~]# cat /home/natasha/files
/var/spool/mail/natasha
/mnt/shares/natasha
[root@node1 ~]# mkdir /find
[root@node1 ~]# find /etc -size +5M > /find/largefiles
[root@node1 ~]# cat /find/largefiles
/etc/selinux/targeted/policy/policy.31
/etc/udev/hwdb.bin
[root@node1 ~]# cat /home/natasha/files
/var/spool/mail/natasha
/mnt/shares/natasha
[root@node1 ~]# mkdir /find
[root@node1 ~]# find /etc -size +5M > /find/largefiles
[root@node1 ~]# cat /find/largefiles
/etc/selinux/targeted/policy/policy.31
/etc/udev/hwdb.bin
eric이라는 사용자를 생성하고 대화형 로그인을 거부합니다.
正解:
useradd eric
passwd eric
vi /etc/passwd
eric:x:505:505::/home/eric:/sbin/nologin
Which shell or program should start at login time is specified in /etc/passwd file? By default, Redhat Enterprise Linux assigns the /bin/bash shell to the users. To deny the interactive login, you should write /sbin/nologin or /bin/ false instead of login shell.
passwd eric
vi /etc/passwd
eric:x:505:505::/home/eric:/sbin/nologin
Which shell or program should start at login time is specified in /etc/passwd file? By default, Redhat Enterprise Linux assigns the /bin/bash shell to the users. To deny the interactive login, you should write /sbin/nologin or /bin/ false instead of login shell.
다음 특성을 갖춘 협업 디렉토리/홈/관리자를 만듭니다.
/home/admins의 그룹 소유권은 adminuser입니다.
디렉토리는 adminuser의 멤버가 읽고 쓸 수 있고 액세스할 수 있어야 하지만 다른 사용자는 액세스할 수 없습니다. (루트는 시스템의 모든 파일과 디렉토리에 액세스할 수 있다는 것을 알고 있습니다.) /home/admins에서 생성된 파일은 자동으로 그룹 소유권이 adminuser 그룹으로 설정됩니다.
/home/admins의 그룹 소유권은 adminuser입니다.
디렉토리는 adminuser의 멤버가 읽고 쓸 수 있고 액세스할 수 있어야 하지만 다른 사용자는 액세스할 수 없습니다. (루트는 시스템의 모든 파일과 디렉토리에 액세스할 수 있다는 것을 알고 있습니다.) /home/admins에서 생성된 파일은 자동으로 그룹 소유권이 adminuser 그룹으로 설정됩니다.
正解:
mkdir /home/admins
chgrp -R adminuser /home/admins
chmodg+w /home/admins
chmodg+s /home/admins
chgrp -R adminuser /home/admins
chmodg+w /home/admins
chmodg+s /home/admins
다음 요구 사항에 따라 autofs 서비스를 구성하고 LDAP 도메인의 사용자 홈 디렉토리에 자동으로 마운트합니다.
- Instructor.example.com(192.168.0.254)은 NFS 내보내기 기능을 통해 /home/guests/ldapuserX 홈 디렉토리를 귀하의 시스템에 공유했습니다. X는 귀하의 호스트 이름 번호입니다.
- LdapuserX의 홈 디렉토리는 instructor.example.com에 존재합니다: /home/guests/ldapuserX
- LdapuserX의 홈 디렉토리는 시스템의 /home/guests/ldapuserX에 자동으로 마운트될 수 있어야 합니다.
- 홈 디렉토리에는 해당 사용자에게 쓰기 권한이 있습니다.
하지만 ldapuser1 - ldapuser99 사용자는 검증 후에 로그인할 수 있습니다. 하지만 해당 ldapuser 사용자만 가져올 수 있습니다. 시스템의 호스트 이름이 server1.example.com인 경우 ldapuser1의 홈 디렉토리만 가져올 수 있습니다.
- Instructor.example.com(192.168.0.254)은 NFS 내보내기 기능을 통해 /home/guests/ldapuserX 홈 디렉토리를 귀하의 시스템에 공유했습니다. X는 귀하의 호스트 이름 번호입니다.
- LdapuserX의 홈 디렉토리는 instructor.example.com에 존재합니다: /home/guests/ldapuserX
- LdapuserX의 홈 디렉토리는 시스템의 /home/guests/ldapuserX에 자동으로 마운트될 수 있어야 합니다.
- 홈 디렉토리에는 해당 사용자에게 쓰기 권한이 있습니다.
하지만 ldapuser1 - ldapuser99 사용자는 검증 후에 로그인할 수 있습니다. 하지만 해당 ldapuser 사용자만 가져올 수 있습니다. 시스템의 호스트 이름이 server1.example.com인 경우 ldapuser1의 홈 디렉토리만 가져올 수 있습니다.
正解:
mkdir -p /home/guests
cat /etc/auto.master:
/home/guests /etc/auto.ldap
cat /etc/auto.ldap:
ldapuser1 -rw instructor.example.com:/home/guests/ldapuser1
automatically mount all the user's home directory #* -rw instructor.example.com:/home/guests/&
cat /etc/auto.master:
/home/guests /etc/auto.ldap
cat /etc/auto.ldap:
ldapuser1 -rw instructor.example.com:/home/guests/ldapuser1
automatically mount all the user's home directory #* -rw instructor.example.com:/home/guests/&
2부(Node2 서버)
작업 1 [부팅 프로세스 제어]
부팅 프로세스를 중단하고 루트 암호를 재설정합니다. kexdrams로 변경하여 시스템에 액세스합니다.
작업 1 [부팅 프로세스 제어]
부팅 프로세스를 중단하고 루트 암호를 재설정합니다. kexdrams로 변경하여 시스템에 액세스합니다.
正解:
* 1. Reboot the server pressing by Ctrl+Alt+Del
2. When the boot-loader menu appears, press the cursor keys to highlight the default boot-loader entry
3. Press e to edit the current entry.
4. Use the cursor keys to navigate to the line that starts with linux.
5. Press End to move the cursor to the end of the line.
6. Append rd.break to the end of the line.
7. Press Ctrl+x to boot using the modified configuration.
8. At the switch_root prompt
* switch_root:/# mount -o remount,rw /sysroot
switch_root:/# chroot /sysroot
sh-4.4# echo kexdrams | passwd --stdin root
Changing password for user root.
passwd: all authentication tokens updated successfully.
sh-4.4# touch /.autorelabel
sh-4.4# exit; exit
* Type exit twice to continue booting your system as usual.
2. When the boot-loader menu appears, press the cursor keys to highlight the default boot-loader entry
3. Press e to edit the current entry.
4. Use the cursor keys to navigate to the line that starts with linux.
5. Press End to move the cursor to the end of the line.
6. Append rd.break to the end of the line.
7. Press Ctrl+x to boot using the modified configuration.
8. At the switch_root prompt
* switch_root:/# mount -o remount,rw /sysroot
switch_root:/# chroot /sysroot
sh-4.4# echo kexdrams | passwd --stdin root
Changing password for user root.
passwd: all authentication tokens updated successfully.
sh-4.4# touch /.autorelabel
sh-4.4# exit; exit
* Type exit twice to continue booting your system as usual.
http://server.domain11.example.com/pub/updates에서 적절한 커널 업데이트를 설치하세요.
다음 기준도 충족해야 합니다.
업데이트된 커널은 시스템이 재부팅될 때 기본 커널이 됩니다.
원래 커널은 시스템에서 계속 사용 가능하고 부팅 가능합니다.
다음 기준도 충족해야 합니다.
업데이트된 커널은 시스템이 재부팅될 때 기본 커널이 됩니다.
원래 커널은 시스템에서 계속 사용 가능하고 부팅 가능합니다.
正解:
ftp server.domain11.example.com Anonymous login
ftp> cd /pub/updates ftp> ls
ftp> mget kernel* ftp> bye
rpm -ivh kernel*
vim /etc/grub.conf
Check the updatted kernel is the first kernel and the orginal kernel remains available. set default=0 wq!
ftp> cd /pub/updates ftp> ls
ftp> mget kernel* ftp> bye
rpm -ivh kernel*
vim /etc/grub.conf
Check the updatted kernel is the first kernel and the orginal kernel remains available. set default=0 wq!
다음 요구 사항에 따라 사용자, 사용자 그룹 및 그룹 구성원을 생성합니다.
- admin이라는 그룹
- mary라는 사용자이고 2차 그룹인 admin에 속합니다.
- alice라는 사용자이고 2차 그룹인 admin에 속합니다.
- bobby라는 사용자, bobby의 로그인 셸은 비대화형이어야 합니다. Bobby는 보조 그룹인 admin에 속하지 않습니다.
Mary, Alice, bobby 사용자는 사용자 비밀번호로 "password"를 설정해야 합니다.
- admin이라는 그룹
- mary라는 사용자이고 2차 그룹인 admin에 속합니다.
- alice라는 사용자이고 2차 그룹인 admin에 속합니다.
- bobby라는 사용자, bobby의 로그인 셸은 비대화형이어야 합니다. Bobby는 보조 그룹인 admin에 속하지 않습니다.
Mary, Alice, bobby 사용자는 사용자 비밀번호로 "password"를 설정해야 합니다.
正解:
groupadd admin
useradd -G admin mary
useradd -G admin alice
useradd -s /sbin/nologin bobby
echo "password" | passwd --stdin mary
echo "password" | passwd --stdin alice
echo "password" | passwd --stdin bobby
useradd -G admin mary
useradd -G admin alice
useradd -s /sbin/nologin bobby
echo "password" | passwd --stdin mary
echo "password" | passwd --stdin alice
echo "password" | passwd --stdin bobby