ユーザー所有者とグループ所有者のメンバーのみが完全にアクセスできる/ archiveディレクトリに作成します。
正解:
chmod 770 /archive
Verify using : ls -ld /archive Preview should be like:
drwxrwx--- 2 root sysuser 4096 Mar 16 18:08 /archive
To change the permission on directory we use the chmod command. According to the question that only the owner user (root) and group member (sysuser) can fully access the directory so: chmod 770 /archive
質問 2:
sudo権限設定を追加する
sysmgrs グループのメンバーがパスワードを入力せずに sudo を使用できるようにします。
正解:
[root@node1 ~]# visudo
...
%wheel ALL=(ALL) NOPASSWD: ALL
%sysmgrs ALL=(ALL) NOPASSWD: ALL
# Verification (mandatory operation)
[root@node1 ~]# su - natasha
[natasha@node1 ~]# sudo cat /etc/shadow
質問 3:
autofsを構成します。
必要に応じて、autofsがLDAPのホームディレクトリに自動的にマウントされるように設定します。
server.domain11.example.comは、NFSを使用してホームをシステムと共有します。このファイルシステムには、ユーザーldapuserXのホームディレクトリが事前に構成されています。
ldapuserXのホームディレクトリは次のとおりです。
server.domain11.example.com / home / guests / ldapuser
ldapuserXのホームディレクトリは、ローカルの/ home / guestsのldapuserXに自動的にマウントする必要があります。ホームディレクトリの書き込み権限は、ユーザーが使用できる必要がありますldapuser1のパスワードはpasswordです
正解:
yum install -y autofs
mkdir /home/rehome
/etc/auto.master
/home/rehome/etc/auto.ldap
Keep then exit
cp /etc/auto.misc /etc/auto.ldap
/etc/auto.ldap
ldapuserX -fstype=nfs,rw server.domain11.example.com:/home/guests/
Keep then exit
systemctl start autofs
systemctl enable autofs
su - ldapuserX// test
If the above solutions cannot create files or the command prompt is -bash-4.2$, it maybe exist multi-level directory, this needs to change the server.domain11.example.com:/home/guests/ to server.domain11.example.com:/home/guests/ldapuserX. What is multi-level directory? It means there is a directory of ldapuserX under the /home/guests/ldapuserX in the questions. This directory is the real directory.
質問 4:
次の要件に従って、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のホームディレクトリのみを取得できます。
正解:
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/&
質問 5:
システムは2つのネットワークのルーターとして使用します。 1つのネットワークは192.168.0.0/24で、もう1つのネットワークは192.168.1.0/24です。両方のネットワークのIPアドレスが割り当てられています。あるネットワークから別のネットワークにパケットをどのように転送しますか?
正解:
echo "1" >/proc/sys/net/ipv4/ip_forward
vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
If you want to use the Linux System as a Router to make communication between different networks, you need enable the IP forwarding. To enable on running session just set value 1 to
/proc/sys/net/ipv4/ip_forward. As well as automatically turn on the IP forwarding features on next boot set on /etc/sysctl.conf file.
質問 6:
alexという名前のユーザーを作成します。ユーザーIDは1234で、パスワードはalex111である必要があります。
正解:
# useradd -u 1234 alex
# passwd alex
alex111
alex111
OR
echo alex111|passwd -stdin alex
質問 7:
パート1(Node1サーバー上)
タスク14 [SELinuxセキュリティの管理]
非標準ポート(82)を使用してコンテンツを提供するシステムで実行されているWebサーバーを構成します。
正解:
* [root@node1 ~]# curl http://node1.domain15.example.com
curl: (7) Failed to connect to node1.domain15.example.com port 80: Connection refused
[root@node1 ~]# yum install httpd
[root@node1 ~]# systemctl enable --now httpd
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
[root@node1 ~]# systemctl start httpd
[root@node1 ~]# systemctl status httpd
Status: "Running, listening on: port 80"
* [root@node1 ~]# wget http://node1.domain15.example.com
2021-03-23 13:27:28 ERROR 403: Forbidden.
[root@node1 ~]# semanage port -l | grep http
http_port_t tcp 80, 81, 443, 488, 8008, 8009, 8443, 9000
[root@node1 ~]# semanage port -a -t http_port_t -p tcp 82
[root@node1 ~]# semanage port -l | grep http
http_port_t tcp 82, 80, 81, 443, 488, 8008, 8009, 8443, 9000
[root@node1 ~]# firewall-cmd --zone=public --list-all
[root@node1 ~]# firewall-cmd --permanent --zone=public --add-port=82/tcp
[root@node1 ~]# firewall-cmd --reload
[root@node1 ~]# curl http://node1.domain15.example.com
OK
* root@node1 ~]# wget http://node1.domain15.example.com:82
Connection refused.
[root@node1 ~]# vim /etc/httpd/conf/httpd.conf
Listen 82
[root@node1 ~]# systemctl restart httpd
[root@node1 ~]# wget http://node1.domain15.example.com:82
2021-03-23 13:31:41 ERROR 403: Forbidden.
[root@node1 ~]# curl http://node1.domain15.example.com:82
OK
Tanaga -
このPass4Testの問題集の模擬試験がとても良いです。EX200日本語版本番の試験は、この模擬試験を解いてから望むとベストです。EX200日本語版本番試験に無事合格いたしました。