WGU C698 Practice Test D

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Which character(s) should you use at the beginning of a BASH script line to ensure that the line is ignored?

# You should use the # character at the beginning of a BASH script line to ensure that the line is ignored. Using the # character at the beginning of a line in a BASH script ensures that line is ignored. You can use the # character to write comments that document your code for future reference.

Which character is used in the password field of the /etc/passwd file to indicate a locked account?

* The presence of an asterisk (*) or an exclamation point (!) in the password field indicates that the account is locked. Entries in the /etc/passwd file have the following syntax: username:password:UID:GID:comment:directory:shell

Your company's new security policy prohibits rebooting of all computers using the Ctrl+Alt+Del key combination. Which Linux file should you edit to change the default behavior of this key combination?

/etc/inittab To change the default behavior of the Ctrl+Alt+Del key combination, you should edit the /etc/inittab file. By default, the line that controls this behavior is as follows: ca::ctrlaltdel:/sbin/shutdown -t3 -r now To ignore this key combination and do nothing, you should edit the line as follows: ca::ctrlaltdel:

All of the KDE Display Manager (KDM) files on your Linux computer are located in the /etc/kde4/kdm directory. You need to configure the extra KDM options that expand on X Display Manager (XDM). Which file should you access?

/etc/kde4/kdm/kdmrc You should access the /etc/kde4/kdm/kdmrc file to configuration the extra KDM options that expand on XDM. Many of the XDM configuration options are used by KDM. The /etc/kde4/kdm/kdmrc file only configures the extra KDM options.

A system administrator issues the dig -t MX kaplanit.com command. What will be the outcome of the command?

The presence of kaplanit.com's mail exchange DNS records will be checked. The dig -t MX kaplanit.com command will check the validity of kaplanit.com's mail exchange Domain Name System (DNS) records. The dig command is used to quiz the DNS server. The -t MX parameter of the dig command is used to send a query request to the DNS server to check the mail exchange (MX) records for their presence in the DNS zone.

You need to edit a crontab entry. Which command should you use?

crontab -e

What is one of the functions of the netstat command?

displaying information regarding open sockets The netstat command can be used to display the information regarding open sockets. The netstat command is a TCP/IP command that can be used to display information regarding the network status. The netstat command can also be used to display information regarding active sockets, routing tables, the user's multicast memberships, and so on. By default, the netstat command displays the list of open sockets.

You need to view the environment variables configured for your current Linux session. You can use all of the following commands EXCEPT:

export You cannot use the export command to view the environment variables. The export command is used to configure environment variables globally. This command can also be used to configure other global settings. For example, if you need to change the language of messages from a program to Portuguese (pt), you should add either the export LANG="pt" or export LC_MESSAGES="pt" line to the /etc/bash_profile file.

A system administrator wants to view the list of the groups associated with a user named Jason. The system administrator wants only the user's group names to be displayed in the list. Which command can be used to obtain the desired list?

groups jason The groups jason command can be used to view the list of groups to which the user jason belongs. The output of the command is similar to the following output: jason: root bin daemon adm In this example, jason is the username, and root, bin, daemon, and adm are the names of the groups to which jason belongs.

You install a second NIC in your Linux computer, then log on to the computer as root. You want to configure the new NIC with the IP address 192.168.0.1 and the subnet mask 255.255.255.0. Which command should you issue at a command prompt to configure the NIC?

ifconfig eth1 192.168.0.1 netmask 255.255.255.0 up On a Linux computer, you should use the ifconfig command to configure a network interface card (NIC). The first NIC in a Linux computer is typically named eth0, and the second NIC is named eth1. Therefore, you should log on to the Linux computer as root, which is also known as the superuser, and issue the command ifconfig eth1 192.168.0.1 netmask 255.255.255.0 to configure the second NIC. The 192.168.0.1 portion of the command configures the IP address for the NIC, the netmask 255.255.255.0 portion of the command configures the subnet mask for the NIC, and the up portion of the command activates the NIC. A similar procedure would be used on a UNIX computer.

For security reasons, you need to determine which ports are in use on your Linux computer. Any unnecessary ports and services must be terminated. Which tool will allow you to view the open ports on your Linux computer and also view the process IDs (PIDs) using those ports?

netstat The netstat command helps provide useful information about a network and has several options, including the following: interface or -i: provides information about a systems network interfaces route or -r: displays the routing table for your network

The user passwords for your Linux computer are stored in the /etc/passwd file. You want to configure some of the users' accounts so that their passwords must be changed every 30 days. Which command should you use?

passwd -x 30 username You should use the passwd -x 30 username command to configure some of the users' accounts so that their passwords must be changed every 30 days. The username parameter indicates the username of the account as listed in the /etc/passwd file.

Which port is used by SMTP?

port 25 Simple Mail Transfer Protocol (SMTP) uses port 25. SMTP scans data packets on the network for the ones that are marked for port 25. After an SMTP packet is recognized, the SMTP network service responds appropriately. SMTP is used to send e-mail messages between servers. Some mail transfer programs include sendmail, Postfix, Exim, and qmail.

Which port is used by Postfix for e-mail transfer?

port 25 The mail server program Postfix uses Simple Mail Transfer Protocol (SMTP) for performing mail transfer over port 25 An SMTP service uses port 25 by default, and processes packets destined for that port.

Observe the following entry: ALL: .samplewebsite.com EXCEPT myserver.samplewebsite.com In which file will this entry NOT be found?

/etc/hosts The ALL: .samplewebsite.com EXCEPT myserver.samplewebsite.com entry will NOT be found in the /etc/hosts file. The /etc/hosts file stores a mapping of the IP addresses to the respective host names. An entry in the /etc/hosts file has the IP_address canonical_hostname [aliases...] format. The IP_address and canonical_hostname entries are one field each. The /etc/hosts file contains a mapping of host names to their IP addresses that are used before the domain name server (DNS) is contacted.

Which command will allow an administrator to change the Samba password?

smbpasswd The smbpasswd command allows an administrator to change the Samba password. The Samba encrypted password file named smbpasswd contains the username, Unix user ID, and the SMB hashed passwords of the user. In addition, the smbpasswd password encrypted file contains the account flag information and the time the password was last changed.

You have a computer that uses Fedora Linux. You would like to add a new user named JaneSmith to the Samba SMB share. Which command should you use first?

useradd You should use the useradd command first. This command will add the new user account to the Linux computer.

You need to create a new user account. You need to specify the home directory, but otherwise use all of the defaults from the /etc/login.defs file. Which command should you use?

useradd -d You should use the useradd -d command to specify the home directory while using all the other defaults from the /etc/login.defs file.

You want to create a user account named John_Davis that uses all of the default settings configured in the /etc/logins.def file. Which command should you execute?

useradd John_Davis You should execute the useradd John_Davis command. This command will create the John_Davis account using the default settings configured in the /etc/logins.def file.

Which command will enable the administrator to completely remove the user Jason and the contents of jason's home directory from the system?

userdel -r jason The userdel -r jason command will delete the user named jason from the Linux system and remove the contents of Jason's home directory. The userdel command deletes the specified user account and all related user entries in the /etc/passwd, /etc/ shadow, and /etc/group files. The -r parameter in the userdel -r jason command removes the user's home directory and mail spool directory.

Which command will delete a user named Cathy from a Linux system but leave the contents of Cathy's home directory intact?

userdel cathy The userdel cathy command will delete the user named cathy from the Linux system, but leave the contents of Cathy's home directory intact. The userdel command deletes the specified user account and all related user entries from the /etc/passwd, /etc/shadow, and /etc/group files.

Which parameter of the at command is equivalent to running the atrm command?

-d The -d parameter of the at command is equivalent to running the atrm command. Either of these commands will remove an at job.

You have been asked to delete a user account that is currently logged in to the Linux computer. Which parameter of the userdel command should you use?

-f You should use the -f or --force parameter of the userdel command to delete a user account that is currently logged in to the Linux computer.

You need to determine the minimum and maximum size for the current X Window screen. Which parameter of the xwininfo command should you use?

-size You should use the -size parameter of the xwininfo command to determine the minimum and maximum size for the current X Window screen. The xwininfo command is located in the /usr/bin directory.

What is the network prefix that is used to denote an unsubnetted Class C IPv4 address?

/24 The network prefix /24 is used to denote an unsubnetted Class C IPv4 address. Class-based IP addresses were the first types of addresses assigned on the Internet. The first octet of a Class A IP address is from 1 through 126 in decimal notation; the first octet of a Class A IP address is the network address. The first octet of a Class B IP address is from 128 through 191 in decimal notation; the first two octets of a Class B IP address are the network address. The first octet of a Class C IP address is from 191 through 223; the first three octets of a Class C IP address are the network address. IPv4 addresses are broken into A, B, C, and D classes. Class A, B, and C addresses are for usual networking. Class D addresses are used for multicasting. There are also Class E addresses, which range from 240.0.0.0 to 255.255.255.255, but these are reserved for future use. Class A: ReservedPrivate: 10.0.0.0-10.255.255.255 Loopback address: 127.0.0.1 Class B: ReservedPrivate: 172.16.0.0-172.31.255.255 Class C: ReservedPrivate: 192.168.0.0-192.168.255.255 Class D: 224.0.0.0-239.255.255.255 No private or reserved addresses Class E: 240.0.0.0-255.255.255.255 No private or reserved addresses Class A, B, and C have addresses that are reserved for private usage, as shown in the list above. Each class has a default subnet mask. The default subnet mask for a Class A subnet is 255.0.0.0. The default subnet mask for a Class B network is 255.255.0.0. The default subnet mask for a Class C network is 255.255.255.0. An unsubnetted Class A network can contain up to 16,777,214 hosts. An unsubnetted Class B network can contain up to 65,534 hosts. An unsubnetted Class C network can contain up to 254 hosts. Subnetting was introduced to enable more efficient use of the IP address space. In subnetting, some host bits of a class-based IP address are used as network address bits to enable smaller groupings of IP addresses to be created than the groupings offered by class-based IP addresses. Consider an office with 200 computers that reside on four separate networks that consists of 50 computers each. If each network has been assigned its own Class C IP address range, then 204 IP addresses would not be used in each range, for a total of 816 wasted IP addresses. With subnetting, a single Class C IP address range can provide IP addresses for the hosts on all four networks. If you subnetted a single Class C IP address range, then only 48 IP addresses would be wasted. It is important to keep in mind that you will need to know how to subnet for the exam. When subnetting, you will need to be able to determine the number of subnets and the number of hosts that are available when using a particular subnet mask. A subnet mask is a 32-bit binary number that can be compared to an IP address to determine which part of the IP address is the host address and which part of the IP address is the network address. Every 1 bit in a subnet mask indicates a bit in the network address, and every 0 bit in the subnet mask indicates a bit in the host address. For example, on a network that uses an unsubnetted Class C IP address range, the IP address 192.168.0.1 has a subnet mask of 255.255.255.0. In binary notation, 255 is represented as 11111111. In binary notation, the subnet mask 255.255.255.0 is represented as 11111111 11111111 11111111 00000000. The binary representation of the IP address 192.168.0.1 is 11000000 10101000 00000000 00000001. The following is a comparison of the binary subnet mask and the binary IP address: 11111111 11111111 11111111 00000000 Subnet Mask 11000000 10101000 00000000 00000001 IP Address From this comparison, you can see that the first 24 bits of the IP address, or 192.168.0 in decimal notation, are the network address and the last eight bits of the IP address, or 1 in decimal notation, are the host address. Another method, called a network prefix, is also used to determine which part of an IP address is the network address and which part of an IP address is the host address. The network prefix method appends a slash (/) character and a number after the IP address, as in the following example: 192.168.0.1/24 In this example, the network prefix indicates that the first 24 bits of the IP address, or 192.168.0 in decimal notation, are the network address and the last 8 bits of the IP address are the host address.

You have written a script that includes some commands that are specific to the BASH shell. You need to ensure that the script runs these commands using the appropriate binary. Which shell should you stipulate on the first line of the script after the #! characters?

/bin/bash In the first line of the script immediately after the #! characters, you should stipulate the /bin/bash shell. The complete first line of the script should be as follows: #! /bin/bash While the /bin/sh symbolic link usually points to the /bin/bash shell, there exists a possibility that it does not. To ensure that the commands work correctly, you should stipulate the /bin/bash shell.

Which file helps you configure the main GNOME Display Manager (GDM)?

/etc/X11/gdm/gdm.conf The /etc/X11/gdm/gdm.conf file is the main GDM configuration file.

Which file defines the startup scripts and configuration files used by X Display Manager (XDM)?

/etc/X11/xdm/xdm-config

When queried, which file will specify the order in which to resolve a domain name?

/etc/nsswitch.conf The /etc/nsswitch.conf file is used to specify the method to resolve a domain name. Linux uses a resolver library to obtain the IP address corresponding to a host name. The following sample /etc/nsswitch.conf file contains the domain name resolution entry: hosts: files dns In this entry, the hosts directive indicates that the resolver library should first consult the /etc/hosts file and then check the DNS servers listed in the /etc/resolv.conf file to resolve the domain name. If your computer does not use the configured DNS servers to look up host names, it is most likely that the hosts entry in your /etc/nsswitch.conf does not list DNS.

Which file can be accessed by a normal user to view passwords if the shadow passwords are not enabled?

/etc/passwd The /etc/passwd file may be viewed by a normal user if shadow passwords are not enabled. The /etc/passwd file contains general user settings, with one line per user account. Each line consists of a username followed by a series of field values separated by colons(:). An entry in the /etc/passwd file has the following syntax: username:password:UID:GID:comment:directory:shell

Which file is accessed first when a user logs in to the BASH shell?

/etc/profile The /etc/profile file is accessed first when a user logs in to the BASH shell. This file contains BASH settings that are applied globally to all users that log in to BASH. When a BASH shell is first started, it executes the /etc/profile file. The /etc/profile file is a system file that is used by Linux at login and controls default variables for the system. These include file creations masks, types of terminals, export variables and mail message settings. Only the Linux system administrator can make changes to this file. After loading the settings from the /etc/profile file, the /etc/bashrc file is accessed. This file should contain BASH-specific configurations (settings that will only apply in the BASH environment). The /etc/bash.bashrc file is a Linux system file. This file sets the environment for a user when a BASH shell it is first started up. It contains global definitions and aliases for all users. On startup, the BASH shell searches for ~/.bash_profile, ~/.bash_login, ~/.profile, and ~/.bashrc. The '~' indicates the correct abbreviation for the current user's home directory. After accessing the /etc/bashrc file, the user settings are applied. The first user-specific file that is loaded is the ~/.bash_profile file. The ~/.bash_profile file stores user-specific settings for a BASH shell, including values for environment variables like PATH. The next file that is loaded is the ~/.bash_login file. If the ~/.bash_profile and ~/.bash_login files are absent, then the ~/.profile file is loaded. The ~/.bash_login file is read when a user who has the BASH shell logs on. Commands will be executed after the file is read. The ~/.profile file is located in a user's $HOME directory and contains customization information including PATH and epath settings for a particular user account. The ~/.bashrc file is a shell configuration file for a specific user and is located in the user's $HOME directory. It differs from the /etc/bash.bashrc in that /etc/bash.bashrc contains shell configuration for ALL users. When the BASH shell is exited, it executes the ~/.bash_logout file.

Which configuration file should be edited to set the PasswordAuthentication variable to allow users to log on to the SSH server after authenticating their passwords?

/etc/ssh/sshd_config The /etc/ssh/sshd_config file should be edited to set the PasswordAuthentication variable to allow users to log on to the SSH server after authenticating their passwords. The /etc/ssh/sshd_config file is a system-wide configuration file for the Open SSH that allows the configuration of the SSH daemon (sshd). The /etc/ssh/sshd_config file is read by sshd. Information such as users who should be permitted access to the SSH server, and whether or not password authentication is permitted, can be specified in the /etc/ssh/sshd_config file.

Which file is used to configure the host name of the Linux system?

/etc/sysconfig/network The /etc/sysconfig/network file is used to specify information regarding the desired network configuration on the server. The following values can be used to specify the network configuration for the server: NETWORKING = yes or no. The NETWORKING parameter specifies whether or not to configure networking. FORWARD_IPV4 = yes or no. The FORWARD_IPV4 parameter enables or disables IP forwarding. HOSTNAME = hostname, where hostname is the hostname of the Linux system. GATEWAY = gwip, where gwip is the IP address of the remote network gateway, if available. GATEWAYDEV = gwdev, where gwdev is the device name eth#, which you use to access the remote gateway.

You have been asked to use a super server daemon that provides the same services but better security than the inet daemon. Which file should you configure?

/etc/xinetd.conf You should configure the /etc/xinetd.conf file. The xinetd super server daemon provides the same services but better security than the inet daemon. The xinetd super server provides the same services as the inetd super server with added security. If the configuration file is ever changed, you need to restart the super server.

Your company is initiating new security measures. As part of these measures, you must limit access to the who command. Which file is used by the who command?

/var/run/utmp The who command uses the /var/run/utmp file to obtain information on who is currently logged into the system. To prevent users from seeing who is logged in with the who command, you must remove the word readable but from the /var/run/utmp file.

You need to ensure that the script named script_audit is run at 8 AM, 3 PM, and 10 PM every Tuesday and Friday. Which crontab entry should you add?

0 8,15,22 * * 2,5 script_audit Each crontab line must end with a new line character. The first seven fields of each entry specify the job schedule as follows: The first field is the minute during which the job will run. Valid entries include 0-59 and wildcards The second field is the hour during which the job will run. Valid entries include 0-23 and wildcards The third field is the day of the month on which the job will run. Valid entries include 1-31 and wildcards The fourth field is the month during which the job will run. Valid entries include 1-12 and wildcards The fifth field is the day of the week on which the job will run. Valid entries include 0-7 (with both 0 and 7 being Sunday) and wildcards The sixth field lists the job to be run The seventh field lists the cron type that will be run and is stipulated as cron.daily, cron.hourly, cron.monthly, and cron.weekly These seven fields can include the following wildcard designations: An asterisk indicates all possible values. For example, an asterisk (*) in the third field indicates that a job runs every day of the month A list separated by commas indicates that the listed values should be used. For example, a list of 15,30 in the third field indicates that a job runs on the 15th and 30th of the month Two values that are separated by a dash indicate that the given range should be used. For example, a range of 10-15 in the third field indicates that a job runs every day from the 10th to the 15th of the month A slash when used with other designations specifies step values or increments. For example, an entry of 0-23/2 in the second field indicates that the job runs every two hours during the day

Which section of the X configuration file includes the color depth setting?

Screen The Screen section of the X configuration file includes the color depth setting. If you want to show the running color depth while in X Window, you should use the xwininfo command. If you want to start an X Window session using a 16-bit color depth, you should use the startx -- -bpp 16 command.

A user, Cathy, has the following entry in the /etc/passwd file: cathy:x:506:507:Cathy Joseph:/home/cathy:/bin/bash What does the above entry in the etc/passwd file imply?

Cathy's encrypted password is stored in the /etc/shadow file. The presence of the character x in the password field signifies that the user has an encrypted shadow password, which is stored in the /etc/shadow file. The /etc/passwd file can store encrypted passwords, but the passwords are readable by all the users of the system, making the /etc/passwd file less secure. A shadow password is stored in the /etc/shadow file, which is accessible only by the root user. An entry in the /etc/passwd file has the following syntax: username:password:UID:GID:comment:directory:shell The username in the above syntax is the name of a user, such as cathy, on the system. The password field may be left blank or may contain the user's encrypted password, an asterisk (*), an exclamation point (!), or the character x. A blank in the password field indicates that the user does not have a password. The presence of the character x signifies that the user has a shadow password. An asterisk (*) or an exclamation point (!) in the password field signifies that the user's account is locked. An asterisk (*) after the first colon (:) disables a user account.

You have been asked to implement a protocol that will manage the fully qualified domain name (FQDN) to IP address mappings. Which protocol should you implement?

DNS The job of the Domain Name System (DNS) server is to convert between IP addresses of systems and their hostnames. It is the protocol that will manage the FQDN to IP address mappings. The DNS database will include the following record types: Host (A) record This is the name of a server on a domain. Pointer (PTR) record This is the last octet in the IP address of the server. Canonical name (CNAME) record This is the server name's alias. Mail exchanger (MX) record This is the domain used for email. Name server (NS) record This is name server's IP address or CNAME. Here are some sample entries for each of the record types listed above: Host (A) record: Localhost A 127.0.0.1 Pointer (PTR) record: 200 PTR test.example.com. CNAME record: ns1 CNAME test MX record: example.com MX 11 mail ; Primary Mail Exchange NS record: NS www ; Address of Nameserver

You are configuring a Linux server to act as your company's DNS server. You need to ensure that this server provides DNS services securely. You also need to ensure that no other services are active on this computer. Finally, you need to ensure that the DNS service operates efficiently. Which two steps should you complete? Choose two.

Disable xinetd. Run named as a stand-alone service. You should disable xinetd and run the named daemon as a stand-alone service. This will ensure that no other services are running on the computer and that the DNS server operates efficiently. You also need to ensure that traffic on port 53 is allowed because this is the port that DNS uses.

A Linux user creates a variable named TMPVAR on the BASH prompt and assigns a string value to the variable. Next, the user tries to display the value of the TMPVAR variable through a shell script by using the echo $TMPVAR command, but the value is not displayed. What should the user do before attempting to display the value of the TMPVAR variable on the system console by running the shell script?

Issue the export TMPVAR command to export the TMPVAR variable across subshells. The user must export the TMPVAR variable across the various subshells of the current login shell by issuing the export TMPVAR command on the BASH prompt. A user's current shell program usually generates separate subshells for the different commands that the shell executes. The export command is used to make a variable accessible to processes executing in subshells. In the given scenario, the user-defined TMPVAR variable can be accessed by programs, such as shell scripts, after export.

A user of a Linux system named Client22 logs on to a remote system named Client47 using the ssh command. The user issues the export DISPLAY=Client22:0 command on the remote system. Which command should the user issue to configure the local system to accept the X Window System output from the remote system?

Issue xhost +Client47 on the local system Issue xhost +Client47 on the local system

What is the purpose of the groupadd command?

It adds new groups on a Linux computer.

What will be the result of issuing the usermod -e 10/10/2016 jason command?

Jason's password will expire on 10/10/2016. Issuing the usermod -e 10/10/2016 jason command will ensure that Jason's password expires on 10/10/2016. The usermod command modifies a user's account information. Details, such as user's login directory, account expiration date, group details, encrypted password, login shell, and user ID, can be added or modified by using the usermod command. The -e parameter in the usermod command specifies the date on which the specified user's account will be disabled. The user is required to supply the expiration date in the MM/DD/YYYY format, but the actual value is stored as the number of days passed since January 1, 1970. The -e parameter requires that the system must have the shadow password enabled.

A user wants the BASH prompt on the Linux system to look as follows: <username@hostname on shellname:presentworkingdirectory>$ Which setting should be used for the $PS1 environment variable?

PS1="<\u@\h on \s:\w>\$" The PS1="<\u@\h on \s:\w>\$" option contains the correct value for the $PS1 environment variable. The $PS1 variable is used to store the settings for the BASH shell prompt. The value of the $PS1 variable can be assigned in either the /etc/profile file or the /etc/bash_profile file. There are some special characters defined for setting the value of the $PS1 variable. The \u character represents the username; the \h character represents the hostname; the \s character represents the shell name; and the \w character represents the present working directory.

A system administrator issues the grep jason /etc/group > result.txt command. What will the result.txt file contain after the command is issued?

The result.txt file will contain a list of groups to which the user jason belongs. The result.txt file will contain a list of groups to which the user jason belongs after the grep jason /etc/group > result.txt command is issued. The grep jason /etc/group command will collect and display the lines from the file that contain the word jason. The /etc/group file contains an entry for each user group existing on the system. Along with the group ID and group name, each entry also contains a list of the users associated with the group. The encrypted group password may or may not be listed within the /etc/group file.

Which SQL statement is used to edit data in a database table?

UPDATE An UPDATE statement is used to edit data in a database table.

Which of the following is the file that stores information about your machine's X Window System configuration?

XF86Config

Which command can be used to store the shortcut to the ls -l --color=always command in a special variable named aa in a BASH shell?

alias aa="ls -l --color=always" The alias aa="ls -l --color=always" command can be used to store the shortcut to the ls -l --color=tty command in a special variable named aa. The alias command is used to assign user-friendly names to frequently used long Linux commands. The syntax of the alias command is as follows: alias [name=[command] where name is the alias name and command is the command for which the alias is being created.

While editing the XF86Config configuration file for an XFree86 server, a system administrator decides to add a vendor-specific configuration. Where in the file should the vendor configuration be added?

anywhere Vendor-specific information must be entered in the Vendor section. The Vendor section can be placed anywhere in the file. Therefore, vendor-specific information can be added anywhere in the XF86Config file.

You display a list of the pending at jobs. You need to delete job 4. Which command should you use?

atrm 4

What are the contents of the /etc/skel directory?

default configuration files and directories for the user The /etc/skel directory contains the default configuration files and directories for the user. When a user is added to a Linux system with the useradd command, the files in the Linux /etc/skel directory are manipulated to create the default environmental settings for the user. The Linux system uses the /etc/skel directory to create the default home directory for the user. To ensure that a particular subdirectory is automatically created each time you add a new user, you should add the subdirectory to the /etc/skel directory. To ensure that users receive a particular file when you add a new user, you should add the file to the /etc/skel directory.

What does the man 5 passwd command display?

information regarding the password file The man 5 passwd command will display information regarding the passwd file. The man command selects and displays the manual pages for the desired Linux resource from the Linux help files. The number that follows the man command identifies the section under which the manual page is categorized. The number-section mapping recognized by Linux is listed below: 1 = user commands 2 = system calls 3 = subroutines 4 = services 5 = file formats 6 = games 7= miscellaneous 8 = system administration l = local n = new In the man 5 passwd command, the number 5 indicates that passwd is categorized under the file format subsection of the Linux help files. If a section number is not specified on the command line or the MANSECT environment variable, then the man command searches the manual sections in numeric order (i.e., section 1, then section 2, etc.) and displays the first manual page that matches the variable. If a section number is not specified on the command line and the MANSECT environment variable is set, then the man command uses the value of the MANSECT environment variable as if the section number had been specified on the command line.

Multiple printers are configured on the LAN. Ben, the systems administrator, issued a print order for a document, but is unable to find the printer on which the document has been printed. Which command should Ben run to find the printer on which the document has been printed?

lpq Ben should use the lpq command. The lpq command displays the current print queue status on the named printer. Jobs queued on the default destination will be displayed if no printer is specified on the command line.

While testing a software program, a user named guest accidentally sends multiple print requests. The user asks the administrator to delete all the user's print jobs from the printer's queue.

lprm guest The lprm guest command, when issued by the root user, will delete all the print jobs belonging to the user named guest from the line printer's spooling queue. The syntax for the lprm command is as follows: lprm [-P Printer] [JobNumber] [UserName] [-] The name of the target printer from which the print job should be deleted can be provided by specifying the -P option. The lprm command can be issued to remove a specific job number from the spooling queue by specifying the job number in the command. If the root user issues the lprm command without any options or arguments, then all print jobs belonging to all users will be deleted. If a normal user issues the lprm command without any options or arguments, then all print jobs belonging to that user will be deleted.

You need to view a list of the files that are open on your Linux computer. Which command should you use?

lsof

Michael, a Linux administrator, wants to enable Telnet on the Linux system. To do this, Michael makes the desired changes to the Telnet configuration file. Which service should Michael restart to reflect the changes made to the configuration file?

xinetd Michael should restart the xinetd service to reflect the changes made to the Telnet configuration file because the Telnet service is configured in the /etc/xinetd.d directory. The xinetd service is a configuration manager for various services. The xinetd-managed applications store their configuration files in the /etc/xinetd.d directory. These applications include telnet, ftp, finger, and bind. Each configuration file has a disable statement that you can set to yes or no, which determines whether xinetd is allowed to start the service or not. Common internet services such as fingerd, rlogin, rsh, telnet, and many more depend on xinetd. By default, Telnet is disabled when Linux is first installed. Once Telnet has been enabled, the only way to stop it is to comment telnet out of the /etc/xinetd.conf file.

Stuart, a Linux administrator, is working on a Red Hat 9.0 computer where he has enabled the POP3 service. Which service does Stuart require in order to restart and bring the changes into effect?

xinetd Stuart requires the xinetd service to restart the POP3 service. The POP3 service is configured in the /etc/xinetd.conf file. Xinetd is referred to as a super daemon because xinetd is used to spawn sub-daemons. The xinetd daemon listens for a service request on the appropriate port. This is determined by the services enabled in the configuration file, /etc/xinetd.conf. The xinet daemon starts a server for each enabled service.

Barbara is a Linux system administrator whose system run level is set to 3. Her default shell is currently configured as BASH. Barbara wants the X Window system to start automatically whenever she logs on to the system. Which file should Barbara edit to configure the X Window system to start automatically at login?

~/.bash_login Barbara should edit the ~/.bash_login file to configure the X Window system to start automatically. The ~/.bash_login file is read when a user who has the BASH shell logs on. Commands will be executed after the file is read. The ~ parameter in the ~/.bash_login file name represents the home directory of the user, and the . parameter in the ~/.bash_login file name makes the file hidden. Barbara needs to edit the ~./bash_login file using the vi editor and enter the following line: /usr/X11R6/bin/startx This will start the X Window system for the user who has the BASH shell.

Which file will you edit to execute cleanup tasks after exiting the shell?

~/.bash_logout The ~/.bash_logout file is invoked whenever the login shell exits, assuming that the user is logged on to the BASH shell. Therefore, if there is any command or cleanup task that is to be executed, you can add the task to the .bash_logout file. The ~ parameter in the ~/.bash_logout file represents the home directory of the user, and the . parameter with the filename makes the file hidden.


Ensembles d'études connexes

ch 6 random variable & probability distribution

View Set

Human Physiology Quiz 2 Questions

View Set

Capital budgeting chap. 10 fin 3414

View Set

MidTerm History Wsetern Civilization

View Set

Prep U Safety, Med Emergencies, and Psychosocial Well-Being

View Set

Assessing Mouth, Throat, Nose, and Sinuses

View Set