Linux-104 (61-120)

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Given the following line from /etc/nsswitch.conf: Hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 By default, which file will be queried first for hostname lookups

/etc/hosts

The presence of what file will temporarily prevent all users except root from logging into the system?

/etc/nologin

By default, the contents of which directory will be copied to a new user's home directory when the account is created by passing the -m option to the useradd command?

/etc/skel

Which of the following is a valid IPv6 address? A. 2001:db8:3241::1 B. 2001::db8:4581::1 C. 2001:db8:0g41::1 D. 2001%db8%9990%%1 E. 2001.db8.819f..1

A. 2001:db8:3241::1

Which of the following are valid IPv4 network masks? (Choose TWO correct answers) A. 255.255.0.0 B. 255.255.255.65 C. 255.255.0.255 D. 0.0.0.1 E. 255.255.255.248

A. 255.255.0.0 E. 255.255.255.248

After issuing: Function myfunction {echo $1 $2;} in Bash, which output does: myfunction A B C produce? A. AB B. ABC C. AC D. BC E. BCA

A. AB

Given the following routing table Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.178.0 0.0.0.0 255.255.255.0 U 9 0 0 wlan0 Why does the command route add default gw 192.168.1.1 fail? A. Because there is no route to 192.168.1.1 B. Because only one route can exist at a time C. Because there is already a default route D. Because default routes can not be set manually E. Because default routes must be set with ifconfig

A. Because there is no route to 192.168.1.1

What is true about groups in a Linux system? (Choose TWO correct answers.) A. Each user may be a member of several groups. However, only one group is the user's primary group. B. Groups may have a password that allows users to join that group temporarily. C. Each user can only be a member of on group at a time D. Group memberships are optional such that there may be users that do not belong to any group. E. Groups can be nested meaning that one group can be a member of another group.

A. Each user may be a member of several groups. However, only one group is the user's primary group. B. Groups may have a password that allows users to join that group temporarily.

What is the purpose of the dig command? A. It can be used as a tool for querying DNS servers B. It can be used for searching through indexed file content C. It can be used to look for open ports on a system D. It can be used to ping all known hosts on the current subnet

A. It can be used as a tool for querying DNS servers

Which of the following resources can be directly limited for a given user using ulimit?(Choose Three correct answers.) A. Maximum seconds of CPU time spent B. Maximum number of open file descriptors C. Maximum number of processes available D. Maximum number of concurrent login sessions E. Maximum seconds of login duration per session

A. Maximum seconds of CPU time spent B. Maximum number of open file descriptors C. Maximum number of processes available

What of the following can be done by the command ifconfig? (Choose TWO correct answers.) A. Set a network interface active or inactive B. Specify the kernel module to be used with a network interface C. Allow regular users to change the network configuration of a network interface D. Change the netmask used on a network interface E. Specify which network services are available on a network interface.

A. Set a network interface active or inactive D. Change the netmask used on a network interface

Which of the following are tasks handled by a display manager like XDM or KDM? (Choose TWO correct answers.) A. Start and prepare the desktop environment for the user. B. Configure additional devices like new monitors or projectors when they are attached. C. Handle the login of a user D. Lock the screen when the user was inactive for a configurable amount of time. E. Create an X11 configuration file for the current graphic devices and monitors.

A. Start and prepare the desktop environment for the user. C. Handle the login of a user

What is the purpose of the sticky keys feature in X? A. To assist users who have difficulty holding down multiple keys at once. B. To prevent repeated input of a single character if the key is held down. C. To ignore brief keystrokes according to a specified time limit. D. To repeat the input of a single character.

A. To assist users who have difficulty holding down multiple keys at once.

Which of the following commands can modify or set the password expiration for a user ? (Choose TWO correct answers.) A. chage B. chexpiration C. shadowconfig D. passwd E. userconf

A. chage D. passwd

Which of the following commands are used to manage the environment and shell variables within a shell process? (Choose TWO correct answers.) A. export B. init C. reset D. set E. tset

A. export D. set

Which of the following commands gets the GnuPG public key with the id 63B4835B from the key server example.com A. gpg -keyserver hkp://example.com -recv-key 63B4835B B. gpg -search-key hkp://[email protected] C. gpg - keyserver gpg://example.com -get-key 63B4835B D. gpg -keyserver hkp://example.com -add-key 63B4835B E. gpg -keyserver gpg://example.com -key 63B4835B

A. gpg -keyserver hkp://example.com -recv-key 63B4835B

Which of the following commands puts the output of the command date into the shell variable mydate? A. mydate="$(date)" B. mydate="exec date" C. mydate="$((date))" D. mydate="date" E. mydate="${date}"

A. mydate="$(date)"

Instead of using specific host names or IP addresses, which string can be used in /etc/hosts.allow entries to cover any remote host no matter of its name or address?

ALL

Which of the following configuration files should be modified to globally set shell variables for all users? A. /etc/bashrc B. /etc/profile C. ~/.bash_profile D. /etc/.bashrs

B. /etc/profile

Which of the following files holds the configuration for journal when running system? A. /etc/systemd/journalctl.conf B. /etc/systemd/journald.conf C. /etc/systemd/systemd-jounald.conf D. /etc/systemd/systemd-journalctl.conf E. /usr/lib/systemd/journalctl.conf

B. /etc/systemd/journald.conf

Which of the following are operators used for comparisons by the test command? (Choose TWO correct answers.) A. Equals B. = C. -is D. -eq E. Null

B. = D. -eq

What is NTP? A. A more secure protocol replacement for FTP B. A protocol for synchronizing time on computers C. A routing aid for finding next hops on a network. D. A simple tunneling protocol for computers behind firewalls.

B. A protocol for synchronizing time on computers

What is true regarding the time in a Linux system? A. The BIOS clock of a computer always indicates the current local time and time zone B. Each application must convert the Unix time to the current time zone which is usually done by using standard libraries. C. When the system is on the network, each query for the current time leads to a new network connection to a time server. D. When the system time changes, running processes must be restarted in order to get the correct time.

B. Each application must convert the Unix time to the current time zone which is usually done by using standard libraries.

How is a display manager started? A. It is started by a user using the command startx B. It is started like any other system service by the init system. C. It is started by inetd when a remote host connects to the X11 port. D. It is started automatically when a X11 user logs into the system console

B. It is started like any other system service by the init system.

67. Which environment variable will override all LC_* variables? A. LANG B. LC_ALL C. LC_COLLATE D. LOCALE

B. LC_ALL

What output will the command seq 10 produce? A. A continuous stream of numbers increasing in increments of 10 until stopped B. The numbers 1 through 10 with one number per line C. The numbers 0 through 9 with one number per line. D. The number 10 to standard output

B. The numbers 1 through 10 with one number per line

What is true regarding public and private SSH keys? (Choose TWO correct answers.) A. Several different public keys may be generated for the same private key B. The private key must never be revealed to anyone. C. For each user account, there is exactly one key pair that can be used to log into that account. D. To maintain the private key's confidentiality, the SSH key pair must be created by its owner. E. To allow remote logins, the user's private key must be copied to the remote server.

B. The private key must never be revealed to anyone. D. To maintain the private key's confidentiality, the SSH key pair must be created by its owner.

Why should an NTP client maintain connections to several NTP servers? A. To receive NTP information every second as each server transmits NTP pings every five seconds only. B. To improve the precision of the time by comparing responses from several servers. C. To not overload the remote server in case the local NTP time cache is not enabled. D. To not lose contact with all NTP servers in case the client changes networks.

B. To improve the precision of the time by comparing responses from several servers.

When trying to unmount a device it is reported as being busy. Which of the following commands could be used to determine which process is causing this? A. debug B. lsof C. nessus D. strace E. traceroute

B. lsof

Which of the following keywords can be used in the file /etc/resolv.conf? (Choose TWO correct answers.) A. substitute B. nameserver C. search D. lookup E. method

B. nameserver C. search

Depending on the host's configuration, which of the following files can be used to turn on and off network services running on a host? (Choose TWO correct answers) A. /etc/profile B. /etc/services C. /etc/inetd.conf D. /etc/xinetd.conf E. /etc/host.conf

C. /etc/inetd.conf D. /etc/xinetd.conf

which configuration file does sudo read when determining if a user is permitted to run applications with root priveleges? A. /etc/security.conf B. /etc/supasswd C. /etc/sudoers D. /etc/sudo.conf

C. /etc/sudoers

To prevent a specific user from scheduling tasks with at, what should the administrator do? A. Add the specific user to /etc/at.allow file B. Add the specific user to [deny] section in the /etc/atd.conf file C. Add the specific user to /etc/at.deny file D. Add the specific user to nojobs group E. Run the following: atd -deny [user]/

C. Add the specific user to /etc/at.deny file

Which of the following actions prevents a specific user from scheduling tasks using at or batch? A. Add the specific user to the /etc/at.allow file B. Add the specific user to the [deny] section in the /etc/atd.conf file. C. Add the specific user to the /etc/at.deny file D. Add the specific user to the nojobs group E. Run atd -deny followed by the name of the specific user.

C. Add the specific user to the /etc/at.deny file

In order to discover the link layer address of the device that owns a specific IPv4 or IPv6 address, which mechanism is used? A. Both IPv4 and IPv6 use ARP B. Both IPv4 and IPv6 use Neighbor Discovery C. IPv4 uses ARP while IPv6 uses Neighbor Discovery D. IPv4 uses Neighbor Discovery while IPv6 uses ARP E. Both IPv4 and IPv6 can use either ARP or Neighbor Discovery depending on the network

C. IPv4 uses ARP while IPv6 uses Neighbor Discovery

What is true about the ntpdate command? A. It is the primary management command for the NTP time server. B. It updates the local system's date (i.e day, month and year) but not the time (i.e. hours, minutes, seconds) C. It queries one or more NTP time servers and adjusts the system time accordingly. D. It sends the local system time to one or many remote NTP time servers for redistribution E. It can be used by any user to set the user clock independently of the system clock.

C. It queries one or more NTP time servers and adjusts the system time accordingly.

Which of the following SQL statements will select the fields name and address from the contacts table? A. SELECT (name, address) FROM contacts; B. SELECT (name address) FROM contacts; C. SELECT name, address FROM contacts; D. SELECT name address FROM contacts;

C. SELECT name, address FROM contacts;

which of the following details can be found in an entry of a user specific crontab? (Choose TWO correct answers.) A. the verbal description of the job. B. The syslog facility to where the output of the job should be sent. C. The time when the cron job should run. D. The command that should be started by the cron job. E. The name of the user which should run the job.

C. The time when the cron job should run. D. The command that should be started by the cron job.

What is not contained in the locale setting of the operating system? A. currency symbol B. language C. timezone D. thousands separator

C. timezone

Which of the following commands shows the current color depth of the X Server? A. xcd B. xcdepth C. xwininfo D. xcolordepth E. cat /etc/X11

C. xwininfo

Which of the following files assigns a user to its primary group? A. /etc/pgroup B. /etc/shadow C. /etc/group D. /etc/passwd E. /ets/gshadow

D. /etc/passwd

How many bits make up an IPv6 address? A. 32 B. 48 C. 64 D. 128 E. 256

D. 128

What of the following statements is true regarding a display manger? A. A display manager handles remote X11 logins only and has no purpose on a system that is not attached to a network. B. The display manager is configured in the X11 configuration file xorg.conf C. There is only one display manager X11DM that must be started on all systems running X11 D. After system started, the display manager handles the login of a user E. Without a display manager, no graphical programs can be run.

D. After system started, the display manager handles the login of a user.

What is true about the file /etc/localtime? A. It is a plain text file containing a string such as Europe/Berlin B. It is created and maintained by the NTP service based on the geolocation of the system's IP address C. It is a symlink to /sys/device/clock/time and always contains the current local time D. It is either a symlink to or a copy of a timezone information file such as /usr/share/zoneinfo/Europe/Berlin

D. It is either a symlink to or a copy of a timezone information file such as /usr/share/zoneinfo/Europe/Berlin

Each entry in a crontab must end with what character? A. Tab B. Space C. Backslash D. Newline

D. Newline

Which of the following is true regarding the mail queue of a mail server? (Choose TWO correct answers.) A. The messages in the queue must be readable by all users as the queue may contain messages for several users. B. According to the Filesystem Hierarchy Standard(FHS) the queue is located at /var/mail/spool. C. There is exactly one mail queue per user which holds all new messages for that user before they are moved to other folders by the user's mail client. D. The queue holds all messages that are processed by the mail server but have not yet been completely delivered. E. The content of the mail queue can be queried by the command mailq.

D. The queue holds all messages that are processed by the mail server but have not yet been completely delivered. E. The content of the mail queue can be queried by the command mailq.

Which of the following commands list all queued print jobs? A. lpd B. lpr C. lp D. lpq

D. lpq

Which of the following is a legacy program provided by CUPS for sending files to the printer queues on the command line? A. lpd B. lpp C. lpq D. lpr

D. lpr

With X11 forwarding in ssh, what environment variable is automatically set in the remote host shell that is not set when X11 forwarding is not enabled?

DISPLAY, $DISPLAY

Which of the following files is consulted when programs like netstat try to match port numbers to names? A. /etc/networks B. /etc/portmapper C. /etc/protocols D. /etc/resolv.conf E. /etc/services

E. /etc/services

On a machine running several X servers, how are the different instances of the X11 server identified? A. By a fixed UUID that is defined in the X11 configuration file. B. By a unique IPv6 address from the fe80::/64 subnet. C. By the name of the user that runs the X server like x11:bob D. By a device name like /dev/X11/xservers/1 E. By a display name like: 1

E. By a display name like: 1

Given the following routing table: Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use lface 0.0.0.0 192.168.178.1 0.0.0.0 UG 0 0 0 wlan0 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.2.0 192.168.1.1 255.255.255.0 U 0 0 0 eth0 192.168.178.0 0.0.0.0 255.255.255.0 U 9 0 0 wlan0 How would an outgoing packet to the destination 192.168.2.150 be handled? A. It would be passed to the default router 192.168.178.1 on wlan0 B. It would be directly transmitted on the device eth0 C. It would be passed to the default router 255.255.255.0 on eth0 D. It would be directly transmitted on the device wlan0 E. It would be passed to the router 192.168.1.1 on eth0

E. It would be passed to the router 192.168.1.1 on eth0

How do shadow passwords improve the password security in comparison to standard passwd passwords? A. Shadow passwords are stored in plain text and can be checked for weak passwords. B. Every shadow password is valid for 45 days and must be changed afterwards. C. The system's host key is used to strongly encrypt all shadow passwords. D. Shadow passwords are always combined with a public key that has to match the user's private key. E. Regular users do not have access to the password hashes of shadow passwords.

E. Regular users do not have access to the password hashes of shadow passwords.

Which of the following commands can be used to associate open TCP ports with the processes that opened the ports? A. ptrace B. strace C. debug D. nessus E. lsof

E. lsof

What word will complete an if statement in bash such as the following: if [-x"$file"]; then echo $file ____

fi

Which keyword must be listed in the hosts option of the Name Service Switch configuration file in order to make host lookups consult the /etc/hosts file?

files

Which command is used to add an empty group to the system?

groupadd

What word is missing from the SQL statement? _________count(*) from talenam;

select

what word is missing from the following SQL statement? update tablename ______ fieldname='value' where id=909

set

what is the name of the simple graphical login manager that comes with a vanilla X11 installation?

xdm


Kaugnay na mga set ng pag-aaral

GEOG 101! 04 Chapter 12 Study Guide

View Set

Functional Area 13: Risk Management

View Set

Real Estate: Transfer Of Property

View Set