Labsim Linux+ 7-12
By default, which protocol is used by an MTA to send messages to other MTAs?
SMTP
The the full device file name for the first partition on the hard drive with the third lowest ID number.
/dev/sdc1
Which of the following device file names represent the second local terminal on the system?
/dev/tty2
Which of the following configuration files holds the name of the host?
/etc/HOSTNAME
Which of the following files stores the aliasing information for sendmail?
/etc/aliases.db
Which type of script control structure is useful when a specific action needs to be done a set number of times?
for
Type the command which will start gedit program in the background.
gedit &
What character should precede comments in a script?
#
You are creating a script to run in a BASH session. What line should you add to the beginning of the script?
#! /bin/bash
You are preparing to mount a device local to your system. Which directory holds the device files?
/dev
You want to keep the gshant user from using the at command, but still allow all other users to use it. Which file should you edit?
/etc/at.deny
You want to increase the security of the local Linux log files and send all of them to a remote server. The server has an IP address of 192.168.10.1. Which of the following lines should you add to the /etc/syslog.conf file on the local system?
*.* #192.168.10.1
Which of the following pgp opts digitally sign docs?
--clearsign
You are using the cupsctl command to configure the /etc/cups/cupsd.conf file. Which cupsctl option will enable the sharing of the locally-connected printer to other computers on the network?
--share-printers
Which signal is the default sent to processes by the kill utility?
-15
You need to configure your Linux system to allow only the root user account to mount the CD-ROM device. Which of the following options should you ass to the /etc/fstab file?
/dev/cdrom /media/cdrom -t iso9660 ro,nouser,noauto
Type the full device file name for the second partition on the hard drive with the lowest ID number?
/dev/sda2
Which kill option stops and restarts the process with the name Process ID (PID)?
-SIGHUP
Which repquota option will gives quota limits and disk usage for all file systems listed in /etc/mtab?
-a
You are inspecting the superblocks and block information on your file system. You need dumpe2fs to display only the blocks that are reserved as bad in the file system. Which option should you use?
-b
Your ext3 filesystem has experienced a significant amount of corruption. To examine the filesystem, you want to use the debugfs utility. Which debugfs option should you use to examine the filesystem?
-c
Which tail option should you use to continually update the /var/log/messages log at the shell?
-f
Your system time is over 30 mins different than the time on the NTP time provider . When you use the ntpd command, the time is not updated. Which ntpd option should you include>
-g
You are compressing a file with the tar utility, but you need to ensure you can uncompress the file with the bzip2 utility. Which tar option should you use during the file compression?
-j
You need to view the files within /home/gshant/expfile.bz2, but you want to leave the compressed file unchanged. What bzip2 option should you use?
-k
Which chage option keeps a user from changing password every two weeks?
-m
You suspect your /dev/sda3 partition is in need of repair. Which of the following e2fsck options will repair the errors without any interactions from you?
-p
You have a critical file called yearend.xls. You want to set file permissions so that only the owner of the file can modify it and only group owners can read it. Which permission listed below will accomplish that?
-rw-r----- 1 george acctg 26256 June 1 04:16 yearend.xls
You have an application whose group is sys but you want all users, whether or not they are members of the sysadmin group, to execute the application with sysadmin group permissions. Which of the following examples shows correct usage of the SGID flag?
-rwxr-sr-- 3 root sysadmin 73748 Nov 2 2005 /usr/bin/applicationx
Which hwclock option sets the system time to the current hardware clock time?
-s
You need to set the system date and time using the date command. Which date option should you use?
-s
You want to set the system time with the date command to UTC time. Which date option should you use?
-u
Which lpr option should be used to change the page width of the print job?
-w
You are working with the myapps script in the current working directory. The current working directory is not part of the PATH environment variable. What command should you use to execute the script?
./myapps
Which directory contains device files for hard drives, optical drives, and USB devices?
/dev
Which file should you edit if you want to permit specific users to edit their respective crontab file, but deny all other users on the system from editing their crontab file?
/etc/cron.allow
You want to keep the gshant user from editing his respective crontab file in /var/spool/cron, but still allow all other users on the system to edit their respective crontab file. Which file should you edit?
/etc/cron.deny
Which file should you edit to schedule a task to execute every week on Saturday?
/etc/cron.weekly
Where is the file system table located on a Linux system?
/etc/fstab
You have added several new hard disks to your system. After partitioning and formatting you have modified a configuration file to mount these new filesystems automatically. You want to document the changes you made. What file would you document?
/etc/fstab
You need to implement disk quotas on your Linux system. You need the quotas on the / directory. Which file must be edited to implement quotas for users and groups?
/etc/fstab
You want to mount a number of filesystems each time the system is brought up. Which configuration file should hold the configuration information for the filesystems to be mounted?
/etc/fstab
Which of the following files contain information that enables a Linux system to resolve IP addresses to FQDN/host names.
/etc/hosts /etc/resolv.conf
You are modifying the tcpd control files of the xinetd super daemon. Of the two tcpd control files, which file is applied first?
/etc/hosts.deny
Which file should you edit to configure the inetd super daemon?
/etc/inetd.conf
What file configures the logrotate utility?
/etc/logrotate.conf
Your linux system uses the Line Printer Daemon (LPD) to manage print jobs. Which file should you use to edit the LDP configuration?
/etc/lpd.perms
Which file shows the currently mounted volumes?
/etc/mtab
Which file should you create to disable the ability to log into a Linux system?
/etc/nologin
Which file should you edit to determine the order in which name resolution is done?
/etc/nsswitch.conf
You are managing system time on your Linux computer, and you need to change the setting to point to a local NTP server IP address. Which file should you edit?
/etc/ntp.conf
Which Pluggable Authentication Modules (PAM) config file should you edit to enforce login blocking?
/etc/pam.d/login
A number of remote users call to say that they cannot connect this morning via SSH. When you look at the processes, you see that the daemon us not running. Which command would you use to solve this problem?
/etc/rc.d/init.d/sshd start
Which files should you edit to limit the amount of concurrent logins for a specific user?
/etc/security/limits.conf
Which file in the Linux system lists all network services, including the port assigned to the service? (enter the full path to the file)
/etc/services
Where does the client store SSH keys that are used for establishing an SSH session?
/etc/ssh/ssh_known hosts & ~/.ssh/known_hosts
Which file should you edit to configure the SSH daemon on the server system?
/etc/ssh/sshd_config
You need to configure which commands may be used with the sudo command. Which file should you edit?
/etc/sudoers
Which file should you use to configure the hardware clock to use UTC automatically?
/etc/sysconfig/clock
Which of the following commands would not bring the first Ethernet interface down?
/etc/sysconfig/network-scripts/ifcfg-eth0 down
Which file should you edit to configure a server to receive log file messages from a remote client?
/etc/sysconfig/syslog
You want to customize logging on your system. Which file would you configure to customize the logging?
/etc/syslog.conf
Which file on a Debian Linux distro displays the time zone ?
/etc/timezone
Management wants a compilation of specific data to occur every night. Which file must you edit to enable TFTP on the Linux Server?
/etc/xinetd.d/tftp
The gshant user is attempting to connect to a remote SSH server; however, you need to override the default SSH configurations for the client system when he establishes an SSH session. Which of the following files should you edit?
/home/gshant/.ssh/config
Which of the following directories is specified by Filesystem Hierarchy Standard (FHS) as a mount point for removable media, such as USB storage media, DVDs, CD-ROMs, and Zip disks?
/media
Which directory on a Linux system contains multiple files and directories used for selecting a time zone?
/usr/share/zoneinfo
Which dir holds most of the system log files?
/var/log
Which file would you check to see system startup error messages?
/var/log/boot.msg & /var/log/boot.log
Which of the following logs is also known as the kernal ring buffer?
/var/log/dmesg
You have just installed a new software package
/var/log/messages
You suspect your system has been compromised by a user through a remote login. Which file is most likely to have information related to an intrusion?
/var/log/secure
Which directory will hold the crontab file for the gshant user account?
/var/spool/cron/gshant
Which of the following directories contains email for each user account on the system?
/var/spool/mail
Which file contains mail for the gshant user account?
/var/spool/mail/gshant
What is the default nice value for a process not executed with the nice command?
0
What is the typical default umask value?
0022
Which hexadecimal code represents an extended partition?
0x85
Which of the following IP addresses have a default subnet mask of 255.255.0.0? (select three). 1) 191.168.2.15 2) 129.0.0.1 3) 168.15.5.1 4) 123.254.19.6 5) 228.62.18.6 6) 1.6.45.254
1) 191.168.2.15 2) 129.0.0.1 3) 168.15.5.1
With a growing concern for security, you convince your boss to stop allowing telnet access to the network. Remote connections will now be allowed only through the use of SSH. Which port must you allow through the firewall for SSH access? 1) 22 2) 23 3) 24 4) 25
1) 22
You are configuring a network firewall to allow SMTP outbound e-mail traffic. Which of the following TCP/IP ports should you open on the firewall? (select two). 1) 25 2) 21 3) 143 4) 443 5) 110
1) 25 5) 110
Which of the following correctly describe the most common format for expressing IPv6 addresses? (select two). 1) 32 numbers, grouped using colons. 2) Binary numbers 3) 128 numbers, grouped using colons. 4) Decimal numbers 5) Hexadecimal numbers
1) 32 numbers, grouped using colons. 5) Hexadecimal numbers
Which of the following are valid IPv6 addresses? (select all that apply). 1) 6384:1319:7700:7631:446A:5511:8940:2552 2) 343F:1EEE:ACDD:2034:1FF3:5012 3) A82:5B67:7700:AH0A:446A:779F:FFE3:0091 4) 165.15.78.53.100.1 5) 141:0:0:0:15:0:0:1
1) 6384:1319:7700:7631:446A:5511:8940:2552 5) 141:0:0:0:15:0:0:1
Which of the following protocols includes extensive error checking to ensure that a transmission is sent and received without mistakes? 1) TCP 2) UDP 3) UCP 4) UDB
1) TCP
Which of the following are good reasons to enable NAT? 1) To translate between internet IP addresses and the IP addresses on your private network. 2) To prevent hackers from accessing your network. 3) To cache web pages. 4) To limit public access to just your DHCP server instead of your whole network.
1) To translate between internet IP addresses and the IP addresses on your private network.
Which of the following commands can be used to retrieve the IP address and/or FQDN/host name infromation from a DNS server? (choose all that apply) 1) dig 2) netstat 3) host 4) nslookup
1) dig 3) host 4) nslookup
A user calls the helpdesk to report that she is unable to connect to the network after an upgrade of her Linux operating system. You suspect the problem is related to the network configuration. Which command would you use to quickly see the current IP address(es) assigned to her computer? 1) ifconfig -a 2) host 3) network -a 4) netstat -a
1) ifconfig -a
As you troubleshoot the network connection for your Linux system, you discover the eth1 interface is down. Which command should you use to start the interface? 1) ifup eth1 2) eth1 ifup 3) ifconfig eth1 4) eth1 ifconfig
1) ifup eth1
Which utility would you use to view current connections and active sessions and ports on a computer? 1) netstat 2) ping 3) nslookup 4) ipconfig
1) netstat
Which of the following commands could you use to view your local systems default gateway? (choose all that apply) 1) netstat -r 2) ifconfig -r 3) route 4) ifconfig
1) netstat -r 3) route
which of the following commands verifies the TCP/IP is working correctly on the local computer? 1) ping 127.0.0.1 2) ping -a localhost 3) netstat 4) nslookup localhost
1) ping 127.0.0.1
Which of the following are NOT valid IP addresses? (select three). 1) 257.0.122.55 2) 145.8.260.7 3) 45.22.156.256 4) 116.0.0.116 5) 132.64.32.8 6) 1.55.254.3
1, 2, & 3.
You have installed and configured a new printer manually. You cannot print to the new printer. What should you do?
1. Use the command /etc/rc.d/init.d/lpd restart to restart the lpd print service 2. Use the command /etc/rc.d/init.d/cups restart to restart the cups print service 3. Use the command service cups restart to restart the cups print service
You are the administrator for a small network of Linux hosts. Your network does not communicate with the Internet and does not use DNS. When you add a new host named ENERGY7 to the network, which entry should be added to the /etc/hosts files?
192.168.0.34 ENERGY7 #Reception Area
You have a computer that is connected to the internet through a NAT router. You want to use a private addressing scheme for your computer. Which of the following IP addresses could you assign to the computer? (select three). 1) 127.0.0.1 2) 10.0.12.15 3) 224.15.166.12 4) 32.188.99.10 5) 172.18.188.67 6) 192.168.12.253 7) 240.12.188.1
2) 10.0.12.15 5) 172.18.188.67 6) 192.168.12.253
Which port number is used by the IMAP protocol? 1) 21 2) 143 3) 110 4) 25
2) 143
What is the default subnet mask for address 132.44.156.67? 1) 255.0.0.0 2) 255.255.0.0 3) 255.255.255.0 4) 255.255.255.255
2) 255.255.0.0
You want to maintain tight security on your internal network so you restrict access to the network through certain port numbers. If you want to allow users to continue to use DNS, which port should you enable? 1) 80 2) 53 3) 21 4) 42 5) 443
2) 53
Which of the following is a valid IPv6 address? 1) FECO:9087:AB04:9900:7GA2:7788:CEDF:349A 2) FECO::AB:9007 3) FECO:AB04:899A 4) 199.12.254.11 5) FECO:AB98::A7::9845:4567
2) FECO::AB:9007
Your computer has an IP address of 161.13.5.15. Your computer is on a? 1) Multicast network 2) Public network 3) Class C network 4) Private network
2) Public network
You are attempting to ping another computer on the internet by its IP address but you are not getting a response. You do however get a response when pinging a host on your own network. Which of the following commands would help you better determine where the problem is? 1) Ping the computers FQDN (fully qualified domain name) 2) Run traceroute on the IP address of the computer on the internet. 3) Run netstat on the internet computer's IP adddress. 4) Run nslookup on the Internet computer's IP address.
2) Run traceroute on the IP address of the computer on the internet.
You are an application developer and are writing a program to exchange video files through a TCP/IP network. You need to select a transport protocol that will guarantee delivery. Which TCP/IP protocol would you implement that provides this capability? 1) UDP 2) TCP 3) RIP 4) IP 5) TFTP
2) TCP
Which of the following network protocols must be used to connect to the internet? 1) IPX/SPX (NWLINK) 2) TCP/IP 3) AppleTalk 4) NETBeui/NETBios
2) TCP/IP
After arriving at work you turn on your Linux workstation and attempt to visit an internet news site. After a few minutes your Web browser times out telling you that the web site is unavailable. Which of the following troubleshooting steps would be helpful in determining the problem? (choose all that apply) 1) Use the ifconfig command to test if the IP address of the Web site you are trying to reach is correct. 2) Use the ping command to ping the FQDN and IP address of the website you are trying to reach. 3) Use the route command to test the route to the FQDN and IP address of the website you are trying to reach. 4) Use the traceroute command to traceroute the FQDN and IP address of the web site you are trying to reach.
2) Use the ping command to ping the FQDN and IP address of the website you are trying to reach. 4) Use the traceroute command to traceroute the FQDN and IP address of the web site you are trying to reach.
Which command displays network activity statistics for TCP, UDP and IP? 1) ping -s 2) netstat -s 3) nbtsat -s 4) telnet 5) nslookup
2) netstat -s
You are attempting to ping the FQDN of a computer on the internet, but are not getting a response. What is the problem? 1) Your default gateway is configured incorrectly. 2) pinging the FQDN of a computer does not give you enough information to know what the problem is. 3) Your NIC has failed. 4) Your local IP address information is configured incorrectly.
2) pinging the FQDN of a computer does not give you enough information to know what the problem is.
You want to issue a simple command to replace all the occurrences of the string foo with the string bar in the file myfile.txt. You have decided to use sed. Which line will work?
2. sed -e 's/foo/bar/g' myfile.txt
Which of the following IP addresses is a valid IP address for a host on a public network? 1) 192.168.16.45 2) 172.16.254.12 3) 142.15.6.1 4) 10.3.125.2
3) 142.15.6.1
What is the network address for the address 199.78.240.240 if the default subnet mask is used? 1) 199.0.0.0 2) 198.78.0.0 3) 199.78.240.0 4) 199.78.240.240
3) 199.78.240.0
To transfer files to your company's internal network from home, you use FTP. The administrator has recently implemented a firewall at the network perimeter and disabled as many ports as possible. Now you can no longer make the FTP connection. You suspect the firewall is causing the issue. Which ports need to remain open so you can still transfer the files? (select two). 1) 443 2) 23 3) 21 4) 20 5) 80
3) 21 4) 20
Which port does Telnet use? 1) 34 2) 25 3) 23 4) 80
3) 23
Which of the following protocols allows hosts to exchange messages to indicate problems with packet delivery? 1) DHCP 2) IGMP 3) ICMP 4) ARP 5) TCP 6) IP
3) ICMP
Which command could you use to see the path that a packet traveled across a network to a remote host? 1) ping 2) ifup 3) traceroute 4) route
3) traceroute
While working on a Linux server, you are unable to connect to Windows Server 2003 system across the internet. You are able to ping the default gateway on your own network, so you suspect that the problem lies outside of the local network. Which utility would you use to track the route a packet takes as it crosses the network? 1) ifconfig 2) tracert 3) traceroute 4) ipconfig 5) nslookup 6) dig
3) traceroute
Which is the most correct description for 3DES?
3DES is a very secure mode of the DES algorithm encryption method that encrypts data three times using a 168-bit key.
How many primary partitions can you create on a single hard disk drive?
4
You have just finished configuring a new network card in your Linux system. You would like to verify that it is configured to access the internet. Which of the following solutions would best help you verify that you have internet access? 1) run ifconfig 2) Attempt to ping the IP address of another computer on your network. 3) check to see if there is a link light on your network card. 4) Attempt to ping a site on the internet.
4) Attempt to ping a site on the internet.
You are trouble shooting a workstation that is having trouble while browsing the internet. You want to perform some tests on name resolution. which utility would give you the most information? 1) ping 2) traceroute 3) nslookup 4) dig
4) dig
Which of the following commands would allow you to see if a remote computer is reachable? 1) ipconfig 2) netstat 3) ifconfig 4) ping
4) ping
Which of the following sets of octal permissions would allow everyone to execute the following file as if they were the root user? -rwxr-xr-x 1 root root 8045 July 24 2004 myscript
4755
You are editing the crontab file and want an entry to run every hour at five minutes past the hour. Which of the following entries will accomplish this?
5 * * * * /home/emmett/example.sh
Which port number is used by SNMP? 1) 25 2) 110 3) 119 4) 143 5) 161
5) 161
You want the cron process to run a particular application only on Friday and Saturday of each week. Which entry should you place in the fifth field of the crontab entry?
5,6
You are called into the office of a newly hired manager. He has copied a file from his old place of work onto his new workstation, but is now receiving an error message that access is denied each time he tries to access the file. He is not the owner of the file, and not a member of the group the file is associated with. Which of the following represents the least set of file permissions needed for him to be able to read and write to the file?
666
What is the priority of the gedit process after using the nice -5 gedit command?
75
SELECT (location,price) FROM shirt / However, the command is not returning any information. What should you do?
Add a semicolon to the end of the statement
How can you permanently change the time zone (TZ) environment variable for your shell environment?
Add the TZ variable to the ~/bash_profile
Which of the following statements best describes the function of the repquota /home -vu command?
A summary of disc usage and quotas is displayed for those users who have files within /home.
You want to allow any host from westsim.com to have access to your system. What is the correct line item you would add to the /etc/hosts.allow file to accomplish this?
ALL: .westsim.com
You want to allow any host from westsim.com to have access to your system except a system called testsvr.westsim.com What is the correct line item you would add to the /etc/hosts.allow file to accomplish this?
ALL: .westsim.com EXCEPT testsvr.westsim.com
What will the netstat -a command show?
All listening and non-listening sockets
One of the steps a cracker does to hide their intrusion is to edit the various log files in /var/log. As a system admin what can you do to prevent this?
Apply encryption to the log files
A user calls with a concern about the display he is seeing after running the command: ps -ef. There are a number of processes that display getty and he is afraid that an unauthorized user is attached to the system. How should you respond?
Assure the user that this is normal.
What is the purpose of the find / type f -perm -o=x -ls
Audit file in the root dir that have execute perms for others
What is the purpose of the find /type f -perm -u=S -ls command?
Audit files in the root directory that have the SUID bit set
What effect does the ulimit -t 600 command have on a linux system?
Limits CPU time for a process to 10mins
User badams sends two print jobs to the Marketing printer (the default printer). He notices the printer is stalled on the first document, and uses the lprm - command. What will be the result?
Both of his jobs will be deleted.
Within the /etc/security/limits.conf file, you notice the following entry: @guests hard maxlogins 3
Limits the number of max logins from the guest group to three
You are asked to help a user who is complaining that file system errors are being reported during boot up. When you reboot the user's system you see errors on sda2. You want to check the filesystem on sda2 and fix the errors. What can you do?
Change to single user mode and run fsck /dev/sda2.
What is the effect of the tune2fs -j /dev/sdb1 command?
Converts the /dev/sdb1 device to ext3.
How would you enable the rsync service to be managed by the xinetd super daemon?
Create the rsync file in the /etc/xinetd.d
What is the purpose of the READ command in a script?
Creates a script variable and prompts the user to type text
You have a TCP/IP network with 50 hosts. There have been inconsistent communication problems between hosts. You run a protocol analyzer and discover that two hosts have the same IP address assigned. Which protocol can you implement on your network to help prevent problems such as this?
DHCP
Which network service would you use to get the IP address from the FQDN hostname?
DNS
You want to implement a protocol on your network that allows computers to find the IP address of a host from a logical name. Which protocol should you implement?
DNS
Yesterday you created a new swap area for your system. Today, after rebooting the system, you find the swap area is not mounted. What should you do to ensure the swap area is mounted each time the system boots.
Edit /etc/fstab and add the swap partition.
You want to implement remote logfile storage
Edit the local /etc/syslog.conf file to point to a remote host
You manage a Linux server that only occasionally and at random times needs to provide FTP services. To save on resources you want to only have the FTP server service running when it is needed and stopped the rest of the time. Which of the following solutions would satisfy these requirements and require the least amount of effort?
Enable the ftp service to be managed by the xinetd service.
You want to limit telnet access to three specific users How can you best accomplish this?
Enter IP address entries for the three users in the /etc/hosts.allow file
You are the system administrator of a test lab of computers running Linux. For security reasons your lab is not connected to the corporate network and therefore you are not able to resolve host names via the corporate DNS server. You do, however, want to be able to connect to the lab computers using host names, but you do not have the resources to bring up your own DNS server. Which of the following solutions would satisfy your requirements?
Enter the IP addresses and host names for all the lab computers in the /etc/hosts file on each of the machines in the lab.
Your ISP has changed the IP addresses of their DNS servers. What would you need to do on your Linux system to still be able to continue resolving host and fully qualified domain names if you use statically assigned IP address information?
Enter the IP addresses of the new DNS servers in the /etc/resolv.conf file.
During the Linux installation process you are asked to choose the filesystem type for your partitions. Which is the most common Linux filesystem to choose?
Ext3
You are trying to unmount /dev/sdd3 but are receiving a device is busy error message. What can you do to try to unmount the file system?
Find and close any open files on the file system, and try to unmount again. Make sure your current working directory is not on the file system and try to unmount again.
Which of the following SQL commands will group info in a list?
GROUP BY
Which of the following are common protocols used by MTAs to send messages to MUAs?
IMAP / POP3
Which statement is correct on how to differentiate core processes from other services?
If you run ps -aux, the core processes are at the top of the listing. They have the lowest pid numbers, always below 100.
A Linux system can determine the time and date in which of the following ways?
It can use NTP to set time / It can set the system clock to the local time
What is the purpose of the messages log file in /var/log/messages and what type of info does it hold?
It is the system message log file, and it holds kernal messages and messages from the applications.
Which of the following lines in the /etc/cups/cupsd.conf file will configure CUPS to listen for print jobs sent only from the local system?
Listen localhost:631
You are the only Linux administrator for a very small company. You are constantly asked to fix one problem or another as they occur. How should you log in to the system each morning?
Login as a regular user, then use su a needed to solve problems.
Which of the following is NOT true regarding mount points?
Mount points use the partitions represented by device files located in the /lib directory.
You have a large TCP/IP network and want to keep hosts' real time clocks synchronized. What protocol should you use?
NTP
What clause should you add to the SELECT command to sort results from an SQL database?
ORDER BY
Which of the following statements best describes the effects of having only the gshant user account listed in the /etc/at.allow file?
Only gshant and root can use the at command.
You need to show the contents of the location and price fields in the shirt table in an SQL database. Which SQL command should you use?
SELECT (location,price) FROM shirt;
Which SQL command displays a list of tables in a database?
SHOW TABLES
You need to manage a process in the foreground by pressing Ctrl+c on the keyboard. What signal code is sent to the process?
SIGINT
DELETE FROM shirts WHERE color='pink' AND type ='polo' AND gender='male';
Records for men's pink polo shirts will be removed from the shirts table
You are assembling a workstation. The system requirements show that this system will be used primarily to store documents of small size. What is the best Linux filesystem to install?
ReiserFS
What does the lprm command do?
Removes jobs from the line printer print queue
You believe your GnuPG key pair has been comprimised and should no longer be used. What are two steps you must take to revoke a pub key onn a key server?
Rovoke the key on a system using the key revocation cert & Send the rovoked key....
You just installed a new CD-ROM drive in your computer. After boot, you can't find the CD-ROM drive anywhere. Where would be a good place to start troubleshooting?
Run dmesg
Which version of SSH supports both the Rivest, Shamir Adleman (RSA_ and Digital Sig Algorithm (DSA) encryption standards?
SSH2
You need to install an e-mail server. Which of the following applications are valid Linux e-mail applications?
Sendmail / Postfix
You have just installed a new program that will be used by all users on the computer. After installation, you log in as a regular user and you try to run the program. The program stops and displays the following error: Error: not running as root What should you do so that all users can run this program?
Set the SUID on the program.
For what purpose would you edit the /etc.localtime file?
Set the current time zone.
What is the effect of the following command? chage -M 60 -W 10 jsmith
Sets the password for jsmith to expire after 60 days and gives 1a warning 10 days before it expires
Setting the SUID flag is a powerful and useful feature. It can have weaknesses associated with its use. Which of the following statements identifies a weakness?
Setting the SUID flag for an application or process owned by the root user is a potential security hole.
Which of the following special permissions will prevent a file's deletion by anyone except the file owner?
Sticky bit
You open the /etc/syslog.conf file and see the follow: cron.* /var/log/cron - What is the meaning?
Syslogd flags all messages from the cron scheduler & All flagged messages are sent to the /var/log/cron log
You open the /etc/nsswitch.conf file and observe the following line: hosts: files dns What is the result of this configuration?
The /etc/hosts file takes precedence over information obtained from a DNS server when resolving domain names.
Which of the following statements best describes the split -50 -d -a 3 AllNames FiftyNames- command is there are 103 lines and 240 bytes in the file?
The AllNames File is split into three files containing 50 lines or less. The output is FiftyName-001, FiftyName-002, FiftyName-003
You are asked to troubleshoot a problem on a user's computer. When the user types the name of any Web site, he gets a message "The page cannot be displayed". You determine that nothing has changed on the computer. What is the likely problem?
The DNS server is down or not reachable.
What would be the result of the following command? host www.somedom.com
The IP address and A record name of the computer www.somedom.com would be displayed.
While reading about file system permissions in Linux you discover that the default permissions assigned to new files when they are created are rw-rw-rw- (666 octal) and new directories are rwxrwxrwx (777 octal). However, when you create a new file in the directory called /data the permissions assigned are rw-r--r--. Why is this?
The umask must be set to 0022 and therefore block the write permissions for the group owner and everyone else.
What information about print jobs does the utility lpq display?
The username of the person who submitted the job / A numerical job ID that can be used to manipulate the job from other utilities
Observe the following command: ssh -f -N -L 2345:mail.mydomain.com:110 [email protected],com
To ensure that SSH does not execute a remote command
What is the main purpose of the xinetd service?
To listen on behalf of different network services and to start and stop them on demand
You need to create a large number of files and would like to ensure that you, the user owner, are the only one that had read and write permissions to the files. The files will be located in a number of different directories that already contain files that you don't want their permissions modified. How could you create these files with the correct permissions using the least amount of effort?
Type umask 0066 to change your umask
How many logical partitions can you create on an extended partition?
Unlimited
You suspect some corruption of files in the /bin directory. What is the most proper course to determine if any of the files in /bin are corrupt?
Use an integrity checking program to check the files in /bin.
Which parameter of the /etc/inetd.conf file determines the user permissions when network daemons access the file system?
User
Which file system is a FAT32 filesystem for Linux?
VFAT
Which clause should you add to the SELECT command to filter results from an SQL database?
WHERE
What is the result of the nohup gedit & command?
gedit will start in the background and persist in the background after logging out of the shell.
You have put a new hard disk in your system and created two primary partitions (sbd1 and sbd2) and one extended partition (sbd3). You have just formatted sbd1 with ext3 and sdb2 as a swap area. When you try to format sbd3 as a swap area, you are unable to. What is the problem?
You cannot format an extended partition.
You wrote the following script: #! /bin/bash NUM1=7 NUM2=5 TOTAL=$NUM1+$NUM2 echo $TOTAL exit 0 Which of the following statements are true?
You need to declare the variables as integers to correctly add NUM1 and NUM2 & The script gives an output of 7 + 5
Which utility should you use to encrypt emails, digitally sign emails, and encrypt docs?
gpg
Which of the following commands removes a job from the at queue?
at -d / atrm
Which command should you use to remove tasks 2 and 3 in the AT queue?
at -d 2,3
Which daemon must be running if you want to use the at command?
atd
Which command should you use to list the tasks in the at queue for the current user?
atq
You are using awk to print a sorted list of the user names in /etc/passwd. Which command will accomplish the sorted output?
awk -F: '{print $1}' /etc/passwd | sort
You have a gedit process with a job ID of 6. What command will send the process to the background?
bg 6
Which of the following commands removes print job 11 from the hp7 printer?
cancel -P hp7 11
What chage command should you use to set the password for jsmith to expire after 60 days and gives a warning 10 days before it expires?
chage -M 60 -W 10 jsmith
Which command will change the group ownership for the devstyle.txt file to rand in the present working directory?
chgrp rand devstyle.txt
Which command should you use to set the SUID bit on a script?
chmod
You are the team lead for a marketing project. Only the members of the team3 group should have read/write permissions to a document called project_data.doc however you want to ensure that no one on the team will delete the document by accident. You user name is bsmith. A long listing of the file is as follows: -rwxr-xr-x 1 bsmith team3 7260 June 22 2004 project_data.doc Which of the following commands would accomplish this?
chmod 1664 project_data.doc
You need to set the SUID permission on a file named rider. Which of the following commands will accomplish this?
chmod 4777 rider
You must change ownership of a script called myscript so that only the user owner has read/write access to it and only the user owner and group owner have execute permissions. Which of the following commands would accomplish this?
chmod 750 myscript
A file named acctg needs to have the SGID permission set on it while keeping all other permissions at their present value. Which of the following commands will accomplish this?
chmod g+s acctg
There is a directory called projects owned by the user cmarcela and the group rd. cmarcela has left the company, so you need to give ownership of the projects directory, its files, and subdirectories to the user ebates, who is a member of the mgmt group. Which command should you use to change the user ownership?
chown -R ebates projects
Which of the following commands make sales the group owner of the /sales/report file?
chown .sales /sales/report chown :sales /sales/report
Which database object in an SQL table represents attributes?
columns
You want to restore files with the extension .cfg from an archive called configs.cpio. Which command will perform the restore?
cpio -ivd "*.cfg" < /mnt/hdd2.configs.cpio
Which crontab option should you use to edit the contents of the crontab file for the current user?
crontab -e
Which crontab option should you use to display the contents of the crontab file for the current user?
crontab -l
Which command could you use to verify if a crontab file exists for user thobbs?
crontab -l -u - thobbs
After logging in as root, you need to manage the crontab files for your linux system. Which command should you use to edit the crontab file for the gshant user?
crontab -ue gshant
You are configuring the /etc/cups/cupsd.conf file. Which command should you use to prevent remote remote printers from being displayed on the local system?
cupsctl --no-remote-printers
You need to obtain specific info found in the columns of ~/smarts. Which of the following commands should you use?
cut -f ~/smarts
Which utility allows you to make an exact copy of a file?
dd
Which command declares functions in a script?
declare -f
You are requested to help a user who reports that he has no more local storage space. You go to his system and log in as root user. Which command will display the available disk space on all partitions?
df df -h
You have created a separate partition for the sales team and mounted it to the /sales directory. The team is about to begin a new project, and they want to make sure there is enough disk space to hold upcoming files. Which command will show you the amount of free space?
df /sales
You are trying to troubleshoot intermittent errors that are occuring while continuing to work on other projects. Which command?
dmesg -n 1
Which of the following begin and finish a while loop?
do & done
Which command will list all files and directories in the badams home directory along with a file size and a total amount of space taken up by the directory?
du /home/badams
Which command allows you to use an alternative superblock when the primary superblock has been corrupted?
e2fsck -b 16385 /dev/sda1
Which of the following commands will open the quota file for a specific user?
edquota -u
Which command should you use to change the quota settings for the gshant user?
edquota -u gshant
You have used su to become another user and fix problems with the user account. You now want to revert back to your regular account? Which command?
exit
You need to change how the formatting displays the /home/varstown file. Specifically, you need to replace each tab character with 3 spaces when you print the file to the screen. What command should you use>
expand -t 3 /home/varstown
You want to view partition information for your sda device. Which commands could you use to view the partitions defined on sda?
fdisk /dev/sda, then press p fdisk -l
You have a system with a single hard disk. You add a new hard drive to your system. Which of the following commands would you use to partition the new drive?
fdisk /dev/sdb
You have added a second hard disk to your Linux system. Which of the following commands will allow you to partition the new drive?
fdisk /dev/sdb
You have several process running the background as shown from the jobs command below: [1]+ Running gedit & [2]+ Stopped crontab e What command will bring the gedit program to the foreground?
fg 1
A user calls with a problem. He is trying to create a simple shell script to simplify a task, and has programmed an if-then scenario. When he runs the script, an error occurs indicating that not all of the if-then requirements are present. What is needed in every if-then routine?
fi
You are accessing the /home/shants/depsmark text file through a terminal connection ....
fmt /home/shants/depsmark
You believe your GnuPG key pair has been compromised and should no longer be used. What command should you use to create a key revocation cert for the key pair?
gpg --gen-revoke
Which of the following commands displays all lines in ~/smarts, omitting the last 10 lines?
head -n -10 ~smarts
Which command should you use to find the IP address for the xyzcomp.com domain?
host xyzcomp.com
Your site is dependent upon the use of the rlogin utility for remote access. For security reasons, you want to prevent the hosts in the marketing department from accessing the payroll server, but allow all others to do so. Which file should you use to create this restriction?
hosts.deny
You want to config your CUPS from a Web browser. What URL address and port should you enter within the Web browser's address field?
http://localhost:631
You need to set the hardware clock to the same value as the system clock. Which command should you use?
hwclock -w
Which keys are generated when you execute the ssh-keygen command with no options?
id_rsa & id_rsa.pub
Which command displays the IP address and subnet mask values configured on a workstation?
ifconfig
Which command would you use to configure the IP address of 192.168.0.123 for the first Ethernet car in a host?
ifconfig eth0 192.168.0.123
You need to temporarily change the IP address of your first Ethernet interface (eth0) to 192.168.1.50 where it is currently set to 10.0.1.50. Which command would achieve the desired result?
ifconfig eth0 192.168.1.50
You need to set the IP address for eth1 to 192.168.15.2 with a subnet mask of 255.255.255.0. Which command is correct?
ifconfig eth1 192.168.15.2 netmask 255.255.255.0
The Eth1 interface is currently down. Which command will start the Eth1 interface?
ifup eth1
You need to send a process to the foreground. Which command should you enter to identify the job ID for the process?
jobs
Which command will merge two files based on identical fields of text?
join
A developer calls with a problem. They were trying to debug a new daemon and mistakenly placed it on the production machine instead of on a lab machine. It had now entered runaway mode. The PID number is 2345 and attempts have been made to remove it with the standard kill command but it will not stop. Which command would you use to be assured that the process will terminate?
kill -9 2345
Which command should you use to change the time zone (TZ) environment variable?
tzconfig / tzselect
You have been called in to a remote site to troubleshoot a problem with a process that needs to be terminated. You are taken to the workstation having the problem and immediately realize that it is an implementation of Linux you have never worked with before. Which option would you use with the kill utility to see the valid signals available?
kill -l
A service specialist from your company calls you from a customer's site. They are attempting to install an upgrade to the software, but it will not install, reporting that it cannot do so until all non-core services are stopped. You cannot remotely access the machine, but the representative tells you that there are only four processes running, and their PID numbers are 1, 10, 100, and 1000. With no further information available, which command would you recommend the representative run?
kill 1000
After a severe lightning strike nearby, a number of processes seem to be running of the server in runaway mode. Which itility terminates these processes by name, and not just by process ID number?
killall
You want to review all failed login attempts on the system in the /var/log/btmp binary file. Which of the following commands should you use?
lastb
Which of the following commands would allow you to determine if a service or driver failed to load during boot up?
less /var/log/dmesg & dmesg
You need to create a symbolic link to the /usr/share/zoneinfo/EST time zone file that permanently alters the time zone for the system. What command should you use?
ln -s /usr/share/zoneinfo/EST /etc/localtime
You are performing routine troubleshooting on a system and want to change the message severity. Which utility would you use?
logger
You have found that the error logs are taking up considerable disk space and want to delete older entries within them. Which utility would you use?
logrotate
Which of the following commands will remove all files from the print queue?
lpc clean
Which command should you use to create the CUPS root user and password?
lppasswd
Which command will show the contents of all the print queues on your Linux system?
lpq -a
You want to send the yearend.txt file to the acctg printer. Which command would you use?
lpr -P acctg yearend.txt
Which command should you use to print 23 copies of the comparables file on the homeprint printer?
lpr -P homeprint -#23 comparables
A directory intended to be used only by admins keeps filling with files. Which of the following commands would you use to see only the names of the users saving files in the directory?
ls -l | cut -d ** -f5
You want to archive some configuration files to the floppy drive. You are using the cpio utility. Which line will create the archive on the floppy?
ls /etc/*.conf | cpio -ovd > /dev/rfd0
You are using LVM on your Linux system to manage the existing volumes. What commands scans for logical volumes on the system?
lvscan
Which command will display the contents of a sendmail mail queue?
mailq / sendmail -bp
You have successfully partitioned the fourth hard drive into 2 primary partitions. You need to format the second partitions with the ext3 filesystem. Which command will work?
mke2fs -j /dev/sdd2
Which of the following commands will create an ext2 filesystem on the first primary partition of the third hard drive?
mkfs -t ext2 /dev/sdc1 mke2fs /dev/sdc1
You need to create an ext4 file system on the first partition on the second hard disk drive. What command should you use?
mkfs.ext4 /dev/sdb1 or mke2fs -t ext4 /dev/sdb1 or mkfs -t ext4 /dev/sdb1
A user is trying to access a file system mounted at /mnt/sdb1 but receives an error No such file or directory. Which commands can you use to see the current mount points?
mount df
A number of new filesystems have been added to the server and you want them to be active now. You also do not want to bring the server down. Which command makes the changes active?
mount -a
You need to mount the CD-ROM device to the /media/cdrom directory. What command should you use?
mount /dev/cdrom /media/cdrom
You have partitioned and formatted a new hard drive, sdc. You want to mount the first partition on sdc to directory /mnt/newdisk. Which command will perform the mount correctly?
mount /dev/sdc1 /mnt/newdisk
Which of the following commands will set the system time to match the time server on the network at 192.168.1.10?
netdate
Which command should you use too display both listening and non-listening sockets on your Linux system?
netstat -a
Recently, you updated the /etc/aliases file with several email aliases. Which command should you use to update /etc/aliases.db file?
newaliases
Which of the following commands starts the gedit program with a priority 1 above the default nice priority?
nice -n -1 gedit
What command will start the gedit process with a highest priority possible?
nice -n -20 gedit
Which of the following statements best describes the nl -s *.* myfile command?
nl adds the number, a colon, and a space to the front
You need to increase the security of your Linux system by finding and closing open ports. Which of the following commands should you use to locate open ports?
nmap
Which command should you use to scan for open TCP ports on your Linux system?
nmap -sT
Which of the following commands manage the NTP daemon from the command line?
ntpd
Which of the following NTP configuration utilities is deprecated and should be avoided when possible?
ntpdate
You want to display the contents of ~/franksdep in hex. Which command should you use?
od -x franksdep
Which command will merge two files on a line-by-line basis, and separate each line with a tab?
paste
You need to allow Peter and Paul access to execute any programs in the /bin or /sbin directories without needing to su to root. Which command line added to the sudoers file will work?
peter, paul ALL = /sbin/, /usr/bin
Which of the following represent a cluster of NTP time providers?
pool.ntp.org
You want to change the port that SSH listens on. You are going to edit the /etc/ssh/sshd_config file. Which line, when added to the file, will change the listening port to 1066?
port 1066
You need to change the formatting of the /home/varstown file as it prints. Specifically, you need to add double-spacing to each line in the file. What command should you use?
pr -d /home/varstown
You answer a call from a number of users who cannot access the mail server. Which utility would you use to quickly see if the sendmail service is running?
ps
You want to view all currently-running processes that include getty in the process name. Which command would you use?
ps -A | grep getty
Which command displays in the most detail all the processes that are running?
ps -ef
Which command displays the PPID?
ps -f
You are preparing to use a logical volume with LVM. Which of the following commands initializes a physical volume?
pvcreate
Which of the following MTAs use the QMQP and QMTP protocols?
qmail
Which of the following MTAs are modular?
qmail / postfix
Which command should you use to display the current user's quota limits and disk usage?
quota
Which command will display the disk usage and quota limits for the development group?
quota -g development
You need to enable quotas for the file system mounted as the /home directory?
quotaon /home
Which set of permissions represent the minimal permissions required to allow a user to list the contents of a directory?
r-x
Which SQL database object represents a single entity or item?
record
Which of these Linux filesystems support journaling?
reiserFS Ext4 XFS Ext3
Which command would you use to assign a new priority to a process that had already started?
renice
A developer calls with a problem. They were trying to debug a new daemon and mistakenly placed it on the production machine instead of on a lab machine. To ensure the CPU gives preference to other processes, you need to lower the daemon's priority. The PID number is 2345. Which command would you use to decrease the daemon's priority?
renice -n 10 2345
You are limiting the total amount of mem a user can use when they use the X windows system. which of the following limit keywords should you use?
rss
Which sed flag allows you to exchange one string of characters for another string of characters in a file?
s
Which of the following utilities will substitute an existing string with a new string within a file?
sed
Which command should you use to start the sendmail daemon?q
sendmail -bd
You have several messages in the sendmail queue. Which command should you use to deliver the message?
sendmail -q
Which command will create a sequence of numbers in a script control structure?
seq
You want to configure the NTP daemon to receive time from pool.ntp.org - what entry should you place in the /etc/ntp.conf file?
server pool.ntp.org
Which of the following commands should you use to implement changes in the /etc/ntp.conf file?
service ntpd start
Which command will display each line in a text file based on the alphabetic characters?
sort
Which ssh option should you use to set up
ssh -X
You need to connect to a remote system whose host name is abc.def.com and execute a shell script called daily-backup.sh that backs... Which command should you run to make the connection?
ssh -l bubba abc.def.com
As you configure your client for public key authentication, you decide to generate the DSA key pair.
ssh-add ~/.ssh/id_dsa
When configuring public key authentication on your client system, which command enables the passphrase agent?
ssh-agent bash
When using DSA to establish an SSH session, what is the name of the key that the SSH server will send to the client?
ssh_host_dsa_key.pub
Which of the following public keys is sent from the SSH server to the SSH client when they are in the process of est...
ssh_host_key.pub
You are currently logged in using the badams account. You want to view the contents of the /etc/inittab file, but you are not allowed to with the badams account. Which command could you use to view file?
su -c "cat /etc/inittab" -l
You have logged in as a regular user when a frantic phone call comes in. The ABCD process must be started on the server now, but can only be run by root. Which command would you use to start this process?
sudo ABCD
You have a Linux system with two activated swap partitions: sda3 and sdb2. Which of the following commands can you use to deactivate the sda3 swap partitions?
swapoff /dev/sda3
You created a swap area on sda 3, but its not activated. Which command should you use to activate the swap partition?
swapon /dev/sda3
You need to backup Jane's files in her /home/user/jane directory. Which command will create an archive in the /root directory?
tar -cvf /root/jane.tar /home/user/jane tar -czvf /root/jane.tgz /home/user/jane
You have a tape archive mounted in /dev/mt12. You need to get a list of the file contents. Which command will list the contents?
tar -tf /dev/mt12
You have a SCSI tape drive st0. You want to backup the contents of /var/oracle. Which command will perform the backup?
tar -vcf /dev/st0 /var/oracle
You need to restore a file, yearend.xfs, from the archive 013004.tar.gz in the backup directory. The file needs to be restored to /home/accounting. Which command will perform the restore?
tar -xzvf /backup/013004.tar.gz /home/accounting/yearend.xls
Which command should you use to check the TCP wrapper configuration on your system?
tcpdchk
Which script control structure tests whether a directory exists?
test
Which command would you use to look for a potential resource hog on a workstation?
top
You need to determine the priority of several processes. Which command should you enter to identify the process ID and nice value for each process?
top
You need to see a listing of running processes and system status such as memory and CPU usage. Which command will produce the listing?
top
Which command transposes characters in a text stream?
tr
Which utility is similar to traceroute but does not require elevated priviledges? (enter the command as if at the command prompt)
tracepath
You need to convert the filesystem of /dev/sdb3 from ext2 to ext3 without affecting the data on the drive. What comman and option should you use?
tune2fs -j /dev/sdb3
Which command will prevent the shell from using too much of the system's resources?
ulimit
A user calls the help desk. Each time he creates a new text file, permissions of 640 are applied to the file and he must use chmod to set them to 644. What command should you enter in the user's profile to set the default permissions for newly created files to 644?
umask 0022
Partition /dev/sdb2 is mounted to /mnt/temp. You need to unmount /dev/sdb2. Which commands would you use?
umount /mnt/temp umount /dev/sdb2
You need to change how the /home/varstown file is displayed. Specifically, you need to replace 4 consecutive spaces with a tab when you print the file to the screen. What command should you use?
unexpand -t 4 /home/varstown
Which text stream processing command filters identical, adjacent lines from a single file?
uniq
You are preparing to use a logical volume with LVM. Which of the following commands creates a volume group named backup on the third disk in the system?
vgcreate backup /dev/sdc
You are using LVM on your Linux system to manage the existing volumes. After adding and initializing the fourth hard drive to the system and creating a physical volume, you need to add it to the backup volume group. What command should you use?
vgextend backup /dev/sdd
Which command should you use to edit the /etc/sudoers file?
visudo
You need to block all users from logging in to the Linux system while you resolve a serious issue. You first need to force all active users to logout. Which command will display a list of all active users?
w
Which command will print the line count, word count and byte count respectively in the /home/gshant/servepath file?
wc /home/gshant/servepath
Which type of looping script executes while a condition is true?
while
You have an xfs file system in your Linux computer. You need to display the XFS file system parameters, such as the block size and inode data structures. Which of the following commands should you use?
xfs_growfs -n xfs_info
You have an XFS filesystem in your Linux system represented by /dev/sdb1. You need to copy all the file names on the drive to the /reviewxfs file. You must be able to read the filenames in the /reviewxfs file. Which of the following commands should you use?
xfs_metadump -o /dev/sdb1 /reviewxfs
Which super daemon is most commonly found in modern Linux distributions?
xinetd
Which of the following is an advantage of xinetd over inetd?
xinetd uses separate configuration files for each managed service
You are logged in as gshant, and you want to forward your mail to the dwant user on the local network
~/.forward