0% found this document useful (0 votes)
443 views

EX200

The document contains questions and answers about various Linux system administration tasks. Some key tasks described include: 1. Configuring the host name, IP address, gateway and DNS on a system. 2. Adding new users and configuring their login shells and groups. 3. Creating a shared directory with restricted access for members of a certain group. 4. Configuring a daily cron job to run a command. 5. Finding and copying files owned by a specific user.

Uploaded by

Hamed Kamel
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
443 views

EX200

The document contains questions and answers about various Linux system administration tasks. Some key tasks described include: 1. Configuring the host name, IP address, gateway and DNS on a system. 2. Adding new users and configuring their login shells and groups. 3. Creating a shared directory with restricted access for members of a certain group. 4. Configuring a daily cron job to run a command. 5. Finding and copying files owned by a specific user.

Uploaded by

Hamed Kamel
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

QUESTION NO: 1 CORRECT TEXT 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

Answer: # cd /etc/syscofig/network-scripts/ # ls # vim ifcfg-eth0 (Configure IP Address, Gateway and DNS) IPADDR=172.24.40.40 GATEWAY=172.24.40.1 DNS1=172.24.40.1 # vim /etc/sysconfig/network (Configure Host Name) HOSTNAME= station.domain40.example.com OR Graphical Interfaces: System->Preference->Network Connections (Configure IP Address, Gateway and DNS) Vim /etc/sysconfig/network (Configure Host Name)

QUESTION NO: 2 CORRECT TEXT 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.

Answer: # useradd -G admin harry # useradd -G admin natasha # useradd -s /sbin/nologin tom # id harry;id Natasha (Show additional group) # cat /etc/passwd

(Show the login shell) OR # system-config-users

QUESTION NO: 3 CORRECT TEXT 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.

Answer: # cd /home/ # mkdir admins / # chown .admin admins/ # chmod 770 admins/ # chmod g+s admins/

QUESTION NO: 4 CORRECT TEXT Configure a task: plan to run echo hello command at 14:23 every day.

Answer: # which echo # crontab -e 23 14 * * * /bin/echo hello # crontab -l (Verify)

QUESTION NO: 5 CORRECT TEXT Find the files owned by harry, and copy it to catalog: /opt/dir

Answer: # cd /opt/ # mkdir dir # find / -user harry -exec cp -rfp {} /opt/dir/ \;

QUESTION NO: 6 CORRECT TEXT Find the rows that contain abcde from file /etc/testfile, and write it to the file/tmp/testfile, and the sequence is requested as the same as /etc/testfile.

Answer: # cat /etc/testfile | while read line; do echo $line | grep abcde | tee -a /tmp/testfile done OR grep `abcde' /etc/testfile > /tmp/testfile

QUESTION NO: 7 CORRECT TEXT Create a 2G swap partition which take effect automatically at boot-start, and it should not affect the original swap partition.

Answer: # 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 theextended 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)

QUESTION NO: 8 CORRECT TEXT Create a user named alex, and the user id should be 1234, and the password should be alex111.

Answer: # useradd -u 1234 alex # passwd alex alex111 alex111

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy