/Linux/RHCSA/9일차(예제 풀기)2021. 7. 3. 17:46
11. Create a volume group, and set 8M as a extends. Divided a volume group containing 50 extends on volume group lv (lvshare), make it as ext4 file system, and mounted automatically under /mnt/data. (And the size of the floating range should set between 380M and 400M.) 이 부분 무시
논리 볼륨 만들라는 얘기
11. 볼륨 그룹을 생성하고 8M을 확장으로 설정합니다. 볼륨 그룹 lv(lvshare)에서 50개의 확장이 포함된 볼륨 그룹을 분할하여 ext4 파일 시스템으로 만들고 /mnt/data 아래에 자동으로 마운트합니다.
12. Add admin group and set gid=600 -
그룹추가 하는데 gid 600 주기
groupadd -g 600 admin
tail -1 /etc/group
13. Add users: user2, user3.
The Additional group of the two users: user2, user3 is the admin group Password: redhat
13. 사용자 추가: user2, user3.
user2, user3 두 사용자 중 추가 그룹은 관리자 그룹 암호: Redhat입니다.
유저생성 추가그룹 패스워드 설정
useradd -G admin user2
useradd -G admin user3
passwd user2
Redhat
Redhat
passwd user3
Redhat
Redhat
14. Configure a task: plan to run echo "file" command at 14:23 every day.
14. 작업 구성: 매일 14:23에 "파일" 에코 명령을 실행할 계획입니다.
crontab -e
23 14 * * * /bin/echo "file" (:wq)
crontab -l
systemctl restart crond
15. Copy /etc/fstab to /var/tmp name admin, the user1 could read, write and modify it, while user2 without any permission.
15. /etc/fstab을 /var/tmp name admin에 복사하면 user1이 아무런 권한 없이 해당 이름을 읽고, 쓰고, 수정할 수 있습니다.
cp /etc/fstab /var/tmp/admin
useradd user01
useradd user02
setfacl -m u:user01:rwx /var/tmp/admin
setfacl -m u:user02:--- /var/tmp/admin
getfacl /var/tmp/admin
16. Adjust the size of the Logical Volume.
Adjust the size of the vo Logical Volume, its file system size should be 290M. Make sure that the content of this system is complete.
Note: the partition size is rarely accurate to the same size as required, so in the range 270M to 320M is acceptable.
16. 논리적 볼륨의 크기를 조정합니다.
파일 시스템 크기가 290M이어야 하므로 Vogical Volume의 크기를 조정합니다. 이 시스템의 내용이 완전한지 확인하십시오.
참고: 파티션 크기가 필요한 만큼 정확하지 않은 경우가 드물기 때문에 270M - 320M 범위의 파티션이 허용됩니다.
umount /dev/vg1/lv1
lvreduce -r -L 290 /dev/vg1/lv1
mkfs.ext4 /dev/vg1/lv1
mount /dev/vg1/lv1
17. Configure /var/tmp/fstab Permission.
Copy the file /etc/fstab to /var/tmp/fstab. Configure var/tmp/fstab permissions as the following:
Owner of the file /var/tmp/fstab is Root, belongs to group root
File /var/tmp/fstab cannot be executed by any user
User natasha can read and write /var/tmp/fstab
User harry cannot read and write /var/tmp/fstab
All other users (present and future) can read var/tmp/fstab
17. /var/tmp/fstab 사용 권한을 구성합니다.
/etc/fstab 파일을 /var/tmp/fstab에 복사합니다. var/tmp/fstab 사용 권한을 다음과 같이 구성하십시오.
/var/tmp/fstab 파일의 소유자는 루트이며, 그룹 루트에 속합니다.
모든 사용자가 /var/tmp/fstab 파일을 실행할 수 없습니다.
사용자 나타샤는 /var/tmp/fstab을 읽고 쓸 수 있습니다.
사용자 해리가 /var/tmp/fstab을 읽고 쓸 수 없음
다른 모든 사용자(현재 및 미래)는 var/tmp/fstab을 읽을 수 있습니다.
cp /etc/fstab /var/tmp/fstab
chown root:root /vat/tml/fatab
chmod a-x /var/tmp/fstab
setfacl -m u:natasha:rw- /var/tmp/fstab
setfacl -m u:harry:--- /var/tmp/fstab
chmod o+r /var/tmp/fstab
getfacl /var/tmp/fstab
18. Create a Shared Directory.
Create a shared directory /home/admins, make it has the following characteristics:
/home/admins belongs to group adminuser
This directory can be read and written by members of group adminuser Any files created in /home/ admin, group automatically set as adminuser.
18. 공유 디렉토리를 생성합니다.
공유 디렉토리 /home/admins를 생성하여 다음과 같은 특성을 갖도록 합니다.
/home/home은 그룹 관리자 소유입니다.
그룹 adminuser의 멤버는 이 디렉토리를 읽고 쓸 수 있습니다. /home/admin에서 생성된 모든 파일, 그룹은 자동으로 adminuser로 설정됩니다.
mkdir /home/admins
groupadd adminuser
chgrp adminuser /home/admins
chmod g+srwx /home/admins
ls -ld /home/admins
19. Configure NTP service, Synchronize the server time, NTP server: classroom.example.com
19. NTP 서비스 구성, 서버 시간 동기화, NTP 서버: classroom.example.com
-잘 모르는 부분
yum -y install chrony
systemctl enable --now chronyd
vi /etc/chrony.conf
a -> server calassroom.example.com iburst
systemctl restart chronyd
20. Configure a user account.
Create a user iar uid is 3400. Password is redhat
20. 사용자 계정을 구성합니다.
사용자 uid는 3400입니다. 암호는 빨간색 모자입니다.
useradd -u 3400 iar
passwd redhat
'IT_공부 > Linux' 카테고리의 다른 글
/Linux/RHCSA/11일차(예제 풀기) (0) | 2021.07.04 |
---|---|
/Linux/RHCSA/10일차(예제 풀기) (0) | 2021.07.03 |
/Linux/RHCSA/8일차(예제 풀기) (0) | 2021.07.02 |
/Linux/RHCSA/7일차 (0) | 2021.06.30 |
/Linux/RHCSA/6일차 (0) | 2021.06.28 |