rhcsa 8

¡Supera tus tareas y exámenes ahora con Quizwiz!

7.configure a corn task. user Natasha must configure a corn jop, local time 14:23 runs and executes: /bin/echo hiya every day.

corntab -e -u natacha 23 14 * * * /bin/echo hiya every day m h d Mo dw corntab-l -u natacha systemctl enable crond systemctl restart cornd

2. change runlevel?

step1: check a default runlevel system configuration: systemctl get-default step2:set default runlevel target unit to multi-user: systemctl set-default multi-user.target step2:set default runlevel target unit to graphical: systemctl set-default graphical.target step4:reboot or if you want to change runlevel without restarting: systemctl isolate multi-user

11.create user vicky with custom uid 2008.

useradd -u 2008 vicky

15.create new user named Eric and deny to interactive login.

useradd eric passwd eric useradd deny passwd deny vim /etc/passwd eric:x505:505:/home:eric/nologin deny:x506:506:/home:eric/nologin

3. set default values for new users. set default password validity to 90 days, and set the first UID that is used for new users to 2000.

vi /etc/login.defs change the following values: PASS_MAX_DAYS 90 UID_MIN 2000

10.set your server to use the recommended tuned profile.

1.yum install -y tuned 2.tuned-adm list 3.tuned-adm active 4.tuned-adm recommend 5.tuned-adm profile throughput-performance

1. reboot your server. assume that you don't know the root password, and use the appropriate mode to enter a root shell that doesn't require password. Set the root password to mypassword.

1. in the boot loader menu: press e 2.at the end of the line begging with the Linux, at the end of this line, append the following: init=/bin/sh 3.press ctrl-x 4.load the installed SELinux policy: /usr/sbin/load_policy -i 5-execute the following command you root partition: mount -o remount,rw / 6-reset the root password: passwd root 7-remount the root partition: mount -o remount,ro / 8-press ctrl-d

5.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 Gateway172.24.40.1 dns: 172.24.40.1

1.#nmtui edit ens33 ipv4 configuration <manual> addresses <172.24.40.40/40> Gateway <172.24.40.1> DNS severs <172.24.40.1> quit 2.ifdown ens33 3.ifup ens33 4.hostnamectl set-hostname station.domain40.example.com

9. create a 2-GiB swap partition and mount it persistently.

1.fdisk /dev/sdb 2.n 3.p 4.(1-4, default 1): 1 5.(2048-4194303, default 2048): 2048 6-last sector: +2G 7.w 8.partprobe /dev/sdb 9.mkswap /dev/sdb1 9.swapon /dev/sdb1

16.create a 512MiB partition, make it as ext4 file system, mounted automatically under/mnt/data and which take effect automatically at boot-start.

1.fdisk/dev/sdb n +512MiB w partprobe /dev/sdb mkfs -f ext4 /dev/sdb2 mkdir -p /data vim /etc/fstab /dev/sdb2 /data/ ext4 defaults 0 0 mount -a

6.Create shared group directories/groups/livingopensource and /groups/operations, and make sure the groups meet the following requirements: ■ Members of the group livingopensource have full access to their directory. ■ Members of the group operations have full access to their directory. ■ New files that are created in the group directories. ■ Others have no access to the group directories. ■ Members of the group operations have read access to the directory/groups/livingopensource.

1.mikdr -p /groups/livingopensource 2.mikdir -p /groups/operations 3. chgrp livingopensource /groups/livingopensource 4. chgrp operations /groups/operations 5.chmod g+s /groups/livingopensource 6.chmod g+s /groups/operations 7.chmod o=- /groups/livingopensource 8.chmod o=- /groups/operations 7.setfacl -m g:operations:x /groups/livingopensource 8.setfacl -m g:livingopensource:x /groups/operations

13.find all files that are owned by user edwin and copy them to the directory /rootedwinfiles.

1.mikdr/rootedwinfiles 2.find / -user edwin -exec cp -rfp {} /rootedwinfiles \;

8.intall the vsftpd service and ensure that it is started automatically at reboot. and enable to anonymous.

1.mount /dev/sr0 /mnt/ 2.cd /etc/yum.repos.d/ 3.vim local.repo 4.write: [rhel8_BaseOS] name=rhel8_BaseOS beseurl=file:///mnt/BaseOS enabled=1 gpgcheck=0 gpgkey=file:///mnt/RPM-GPG-KEY-redhat-release [rhel8_AppStream] name=rhel8_AppStram beseurl=file:///mnt/AppStream enabled=1 gpgcheck=0 gpgkey=file:///mnt/RPM-GPG-KEY-redhat-release 5. yum install vsftpd 6.systemctl enable vsftpd 7.systemctl start vsftpd

17. one package name zsh is dump on ftp://server1..example.com under/pub/updates directory and your FTP server 192.168.0.254 install the package zch

1.rpm -ivh ftp://server1.example.com/pub/updates/zch-* 2.login to ftp server: ftp ftp://server1.example.com using anonymous user 3.change the directory: cd pub cd updates 4.download the package: mget zch-* 5.Quit from the ftp prompt: bye 6.install the package 7.verfify either package is install or not: rpm -q zch

4.create users edwin and santos and make them members of the group livingopensource as a secondary group membership. Also, create users serene and alex and make them members of the group operation as a secondary group.grop

1.useradd edwin 2.passwd edwin 3.useradd santos 4.usermod santos 5.useradd serene 6.usemod serene 7.useradd alex 8.passwd alex 9.groupadd livingopensource 10.groupadd operations 11.usermod -aG livingopensource edwin 12.usermod -aG livingopensource santos 13.usermod -aG operations serene 14.usermode -aG operations alex

12.install a web server and ensure that it is started automatically.

1.yum install -y httpd 2.systemctl enable httpd 3.systemctl start httpd

14. SELinux must run in force mode

vim /etc/sysconfig/selinux SELINUX=enforcing


Conjuntos de estudio relacionados

Exam 3 Chp 15.16.17.18.20.21.22.23

View Set

Architecture Lecture Midterm/Quizes

View Set

MKT210 Marketing Chapter 6 Video : Eaton

View Set

THE SUDETENLAND AND CZECHOSLOVAKIA 1938-39

View Set

Accounting Chapter 10: Journalizing Purchases and Cash Payments Using Special Journals

View Set