New Year Special Sale - Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: mxmas70

Home > LPI > LPIC Level 1 > 102-500

102-500 LPIC-1 Exam 102, Part 2 of 2, version 5.0 Question and Answers

Question # 4

To prevent a specific user from scheduling tasks with at, what should the administrator do?

A.

Add the specific user to /etc/at.allow file.

B.

Add the specific user to [deny] section in the /etc/atd.conf file.

C.

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

D.

Add the specific user to nojobs group.

E.

Run the following: atd --deny [user].

Full Access
Question # 5

Which of the following steps prevents a user from obtaining an interactive login session?

A.

Run the command chsh -s /bin/false with the user name.

B.

Set the UID for the user to 0.

C.

Remove the user from the group staff.

D.

Add the user to /etc/noaccess.

E.

Create a .nologin file in the user's home directory.

Full Access
Question # 6

Which of the following can the chage command NOT change?

A.

The number of days since January 1, 1970 after which the user's account will no longer be accessible.

B.

The number of days since January 1, 1970 after which the password can change.

C.

The number of days since January 1, 1970 since the password was last changed.

D.

The maximum number of days during which a password is valid.

E.

The number of days of inactivity after a password has expired before the account is locked.

Full Access
Question # 7

Why is /etc/shadow not world readable if the passwords are stored in an encrypted fashion?

A.

The encrypted passwords are still subject to brute force attacks.

B.

This is just for historical reasons.

C.

There is other information in the file that needs to be kept secret.

D.

The passwords can be decrypted by anyone with root access.

Full Access
Question # 8

In which file, if present, must all users be listed that are allowed to use the cron scheduling system? (Specify the full name of the file, including path.)

Full Access
Question # 9

To exclude all log messages of a given logging facility, you should use a logging priority of _____ .

Full Access
Question # 10

Which file, when using Sendmail or a similar MTA system, will allow a user to redirect all their mail to another address and is configurable by the user themselves?

A.

/etc/alias

B.

~/.alias

C.

/etc/mail/forwarders

D.

~/.forward

E.

~/.vacation

Full Access
Question # 11

What is true regarding the command sendmail?

A.

With any MTA, the sendmail command must be run periodically by the cron daemon.

B.

All MTAs, including Postfix and Exim, provide a sendmail command.

C.

The sendmail command prints the MTAs queue history of which mails have been sent successfully.

D.

It is only available when the sendmail MTA is installed.

Full Access
Question # 12

What entry can be added to the syslog.conf file to have all syslog messages generated by a system displayed on console 12?

A.

*.* /dev/tty12

B.

/var/log/messages | /dev/tty12

C.

| /dev/tty12

D.

syslog tty12

E.

mail.* /dev/tty12

Full Access
Question # 13

What command should be used to print a listing of email in the system's mail queue?

A.

lpq

B.

mailq

C.

mlq

D.

sendmail –l

Full Access
Question # 14

What is true regarding the file ~/.forward?

A.

As it is owned by the MTA and not writable by the user, it must be edited using the editaliases command.

B.

After editing ~/.forward the user must run newaliases to make the mail server aware of the changes.

C.

Using ~/.forward, root may configure any email address whereas all other users may configure only their own addresses.

D.

When configured correctly, ~/.forward can be used to forward each incoming mail to more than one other recipient.

Full Access
Question # 15

What command can be used to generate syslog entries of any facility and priority? (supply just the command name without a path)

Full Access
Question # 16

Please specify the top directory containing the configuration files for the CUPS printing system. (Specify the full path to the directory.)

Full Access
Question # 17

Which of the following parameters are used for journalctl to limit the time frame of the output? (Choose TWO correct answers.)

A.

--from=

B.

--since=

C.

--until=

D.

--upto=

E.

--date=

Full Access
Question # 18

Which of the following are commonly used Mail Transfer Agent (MTA) applications? (Choose THREE correct answers.)

A.

Postfix

B.

Procmail

C.

Sendmail

D.

Exim

E.

SMTPd

Full Access
Question # 19

Which command is used to sync the hardware clock to the system clock? (Specify ONLY the command without any path or parameters.)

Full Access
Question # 20

On a system using shadowed passwords, the most correct permissions for /etc/passwd are ___ and the most correct permissions for /etc/shadow are _________.

A.

-rw-r-----, -r--------

B.

-rw-r--r--, -r--r--r--

C.

-rw-r--r--, -r--------

D.

-rw-r--rw-, -r-----r--

E.

-rw-------, -r--------

Full Access
Question # 21

What is true about the file .profile in a user's home directory?

A.

It must be executable.

B.

It must call the binary of the login shell.

C.

It must use a valid shell script syntax.

D.

It must start with a shebang.

E.

It must be readable for its owner only.

Full Access
Question # 22

Which of the following comparison operators for test work on elements in the file system? (Choose two.)

A.

–z

B.

–eq

C.

–d

D.

–f

E.

–lt

Full Access
Question # 23

What entry can you add to syslog.conf file to have all syslog messages generated by your system go to virtual console 12?

A.

*.* /dev/tty12

B.

/var/log/messages | /dev/tty12

C.

| /dev/tty12

D.

syslog tty12

E.

mail.* /dev/tty12

Full Access
Question # 24

After editing the TCP wrapper configuration to grant specific hosts access to a service. When do these changes become effective?

A.

The new configuration becomes effective after restarting the respective service.

B.

The new configuration becomes effective at the next system reboot.

C.

The new configuration becomes effective when the last established connection to the service is closed.

D.

The new configuration becomes effective after restarting the tcpd service.

E.

The new configuration becomes effective immediately for all new connections.

Full Access
Question # 25

Where is the system journal stored?

A.

/var/ jlog/ and /var/jlogd/

B.

/proc/log and /proc/klog

C.

/run/Iog/journal/or/var/log/journal/

D.

/var/log/syslog.bin or /var/log/syslog-jrn

E.

/etc/system/journal / or /usr/1ib/sysLend/journal/

Full Access
Question # 26

Which parameter of the ssh command specifies the location of the private key used for login attempts? (Specify ONLY the option name without any values or parameters.)

Full Access
Question # 27

Which of the following commands should be executed when starting a login shell in order to change the language of messages for an internationalized program to Portuguese (pt)?

A.

export LANGUAGE=“pt”

B.

export LC_MESSAGES=“pt”

C.

export UI_MESSAGES=“pt”

D.

export MESSAGE=“pt”

E.

export ALL_MESSAGES=“pt”

Full Access
Question # 28

Which of the following are valid host addresses for the subnet 203.0.113.64/28? (Choose TWO correct answers.)

A.

2030.113.64

B.

2030.113.78

C.

203.0.113.65

D.

203.0.113.80

E.

203.0.113.81

Full Access
Question # 29

Which directory holds configuration files for xinetd services? (Specify the full path to the directory

Full Access
Question # 30

Which of the following files is not read directly by a Bash login shell?

A.

-/.bashrc

B.

-/.bash_profile

C.

-/.bash_login

D.

-/.profile

E.

/etc/profile

Full Access
Question # 31

Which option in the chrony configuration file changes the initial interval of polls to a NTP server in order to speed up the initial synchronization?

A.

iburst

B.

quickstart

C.

fast

D.

D. fsync

E.

flood

Full Access
Question # 32

Which of the following environment variables can be defined in locale. conf ? (Choose TWO correct answers.)

A.

LC_ALL

B.

LC_USERNAME

C.

LC_U?F8

D.

LC_GEOGRAPHY

E.

LC_TIME

Full Access
Question # 33

Which of the following commands connects to the remote host example.com which has OpenSSH listening on TCP port 2222? (Choose TWO correct answers.)

A.

ssh --port 2222 example.com

B.

ssh -p 2222 example.com

C.

ssh -o Port=2222 example.com

D.

ssh -o GatewayPort=2222 example.com

E.

ssh example.com:2222

Full Access
Question # 34

Why is the xhost program considered dangerous to use?

A.

It makes it difficult to uniquely identify a computer on the network.

B.

It allows easy access to your X server by other users.

C.

It logs sensitive information to syslog.

D.

It makes your computer share network resources without any authentication.

E.

It is a graphical DNS tool with known exploits.

Full Access
Question # 35

For accessibility assistance, which of the following programs is an on-screen keyboard?

A.

xkb

B.

atkb

C.

GOK

D.

xOSK

Full Access
Question # 36

What is the default name of the configuration file for the Xorg X11 server? (Specify the file name only without any path.)

Full Access
Question # 37

Which of the following are tasks handled by a display manager like XDM or KDM? (Choose TWO correct answers.)

A.

Start and prepare the desktop environment for the user.

B.

Configure additional devices like new monitors or projectors when they are attached.

C.

Handle the login of a user.

D.

Lock the screen when the user was inactive for a configurable amount of time.

E.

Create an X11 configuration file for the current graphic devices and monitors.

Full Access
Question # 38

On a system running the KDE Display Manager, when is the /etc/kde4/kdm/Xreset script automatically executed?

A.

When KDM starts

B.

When a user's X session exits

C.

When KDM crashes

D.

When X is restarted

E.

When X crashes

Full Access
Question # 39

Which of the following lines is an example of a correct setting for the DISPLAY environment variable?

A.

hostname:displayname

B.

hostname:displaynumber

C.

hostname/displayname

D.

hostname/displaynumber

E.

hostname

Full Access
Question # 40

What is the purpose of the Sticky Keys feature in X?

A.

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

B.

To prevent repeated input of a single character if the key is held down

C.

To ignore brief keystrokes according to a specified time limit

D.

To repeat the input of a single character

Full Access
Question # 41

Which file used by XDM specifies the default wallpaper?

A.

/etc/X11/xdm/Xsetup

B.

/etc/X11/xdm.conf

C.

/etc/X11/xdm/Defaults

D.

/etc/X11/defaults.conf

Full Access
Question # 42

The X11 configuration file xorg.conf is grouped into sections. How is the content of the section SectionName associated with that section?

A.

It is placed in curly brackets as in Section SectionName { ... }.

B.

It is placed between a line containing Section "SectionName" and a line containing EndSection.

C.

It is placed between the tags

and

D.

It is placed after the row [SectionName].

E.

It is placed after an initial unindented Section "SectionName" and must be indented by exactly one tab character.

Full Access
Question # 43

How is a display manager started?

A.

It is started by a user using the command startx.

B.

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

C.

It is started by inetd when a remote hosts connects to the X11 port.

D.

It is started automatically when a X11 user logs in to the system console.

Full Access
Question # 44

What is the purpose of a screen reader?

A.

It reads text displayed on the screen to blind or visually impaired people.

B.

It reads the parameters of the attached monitors and creates an appropriate X11 configuration.

C.

It displays lines and markers to help people use speed reading techniques.

D.

It manages and displays files that contain e-books.

Full Access
Question # 45

Which command can be used to investigate the properties for a particular window in X by clicking that window? (Specify ONLY the command without any path or parameters.)

Full Access
Question # 46

Which of the following files, when existing, affect the behavior of the Bash shell? (Choose TWO correct answers.)

A.

~/.bashconf

B.

~/.bashrc

C.

~/.bashdefaults

D.

~/.bash_etc

E.

~/.bash_profile

Full Access
Question # 47

Which of the following are requirements in order to run a shell script like a regular command from anywhere in the filesystem? (Choose THREE correct answers.)

A.

The user issuing the command must be in the group script.

B.

The script file must be found in the $PATH.

C.

The script file must have the executable permission bit set.

D.

The script must begin with a shebang-line (#!) that points to the correct interpreter.

E.

The file system on which the script resides must be mounted with the option scripts.

Full Access
Question # 48

Which of the following commands puts the output of the command date into the shell variable mydate?

A.

mydate="$(date)"

B.

mydate="exec date"

C.

mydate="$((date))"

D.

mydate="date"

E.

mydate="${date}"

Full Access
Question # 49

You are looking into a new script you received from your senior administrator. In the very first line you notice a #! followed by a file path. This indicates that:

A.

The file at that location was used to make the script.

B.

This script provides identical functionality as the file at that location.

C.

This script will self-extract into a file at that location.

D.

The program at that location will be used to process the script.

Full Access
Question # 50

Which of the following SQL queries counts the number of occurrences for each value of the field order_type in the table orders?

A.

SELECT order_type,COUNT(*) FROM orders WHERE order_type=order_type;

B.

SELECT order_type,COUNT(*) FROM orders GROUP BY order_type;

C.

COUNT(SELECT order_type FROM orders);

D.

SELECT COUNT(*) FROM orders ORDER BY order_type;

E.

SELECT AUTO_COUNT FROM orders COUNT order_type;

Full Access
Question # 51

What output will the following command sequence produce?

echo '1 2 3 4 5 6' | while read a b c; do

echo result: $c $b $a;

done

A.

result: 3 4 5 6 2 1

B.

result: 1 2 3 4 5 6

C.

result: 6 5 4

D.

result: 6 5 4 3 2 1

E.

result: 3 2 1

Full Access
Question # 52

What output will the following command produce?

seq 1 5 20

A.

1

6

1

1

1

6

B.

1

5

10

15

C.

1

2

3

4

D.

2

3

4

5

E.

5

10

15

20

Full Access
Question # 53

What output will the command seq 10 produce?

A.

A continuous stream of numbers increasing in increments of 10 until stopped.

B.

The numbers 1 through 10 with one number per line.

C.

The numbers 0 through 9 with one number per line.

D.

The number 10 to standard output.

Full Access
Question # 54

When the command echo $$ outputs 12942, what is the meaning of 12942?

A.

It is the process ID of the echo command.

B.

It is the process ID of the current shell.

C.

It is the process ID of the last command executed.

D.

It is the process ID of the last command which has been placed in the background.

Full Access
Question # 55

After issuing:

function myfunction { echo $1 $2 ; }

in Bash, which output does:

myfunction A B C

Produce?

A.

A B

B.

A B C

C.

A C

D.

B C

E.

C B A

Full Access
Question # 56

What benefit does an alias in bash provide?

A.

It provides faster lookups for commands in the system directory.

B.

It creates a local copy of a file from another directory.

C.

It hides what command you are running from others.

D.

It allows a string to be substituted for the first word of a simple command.

Full Access
Question # 57

What is the command to delete the default gateway from the system IP routing table? (Choose TWO correct answers.)

A.

route del default

B.

ifconfig unset default

C.

netstat -r default

D.

ip route del default

E.

sysctl ipv4.default_gw=0

Full Access
Question # 58

Which of the following configuration files should be modified to set default shell variables for all users?

A.

/etc/bashrc

B.

/etc/profile

C.

~/.bash_profile

D.

/etc/.bashrc

Full Access
Question # 59

Which of the following commands can be used to display the local routing table? (Choose TWO correct answers.)

A.

ifconfig

B.

dig

C.

netstat

D.

route

E.

trackroute

Full Access
Question # 60

Which of the following is true about IPv6?

A.

With IPv6, the TCP port numbers of most services have changed.

B.

IPv6 no longer supports broadcast addresses.

C.

IPv4 addresses can be used without any change with IPv6.

D.

IPv6 no longer supports multicast addresses.

E.

For IPv6, UDP and TCP have been replaced by the Rapid Transmission Protocol RTP.

Full Access
Question # 61

Which of the following programs can be used to determine the routing path to a given destination?

A.

dig

B.

netstat

C.

ping

D.

route

E.

traceroute

Full Access
Question # 62

What of the following can be done by the command ifconfig? (Choose TWO correct answers.)

A.

Set a network interface active or inactive.

B.

Specify the kernel module to be used with a network interface.

C.

Allow regular users to change the network configuration of a network interface.

D.

Change the netmask used on a network interface.

E.

Specify which network services are available on a network interface.

Full Access
Question # 63

Which of the following details is NOT provided in any output from the netstat utility?

A.

broadcast services

B.

interface statistics

C.

masquerading connections

D.

network connections

E.

routing tables

Full Access
Question # 64

What is true regarding a default route?

A.

The default route is always used first. When the default route is not available more specific routes are tried.

B.

When a default route is set, all other routes are disabled until the default route is deleted.

C.

The default route is only used if there is not a more specific route to a destination host or network.

D.

Without a default route, no network communication even in directly attached networks is possible.

Full Access
Question # 65

What is the lowest numbered unprivileged TCP port? (Specify the number in digits only.)

Full Access
Question # 66

With IPv6, how many bits have been used for the interface identifier of an unicast address? (Specify the number using digits only.)

Full Access
Question # 67

Which of the following is a valid IPv6 address?

A.

2001:db8:3241::1

B.

2001::db8:4581::1

C.

2001:db8:0g41::1

D.

2001%db8%9990%%1

E.

2001.db8.819f..1

Full Access
Question # 68

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

Full Access
Question # 69

Which of the following lines are valid in the file /etc/hosts? (Choose TWO correct answers.)

A.

2001:db8::15 www.example.com www

B.

www.example.com www 203.0.13.15

C.

203.0.113.15 www.example.com www

D.

www.example.com,www 203.0.13.15,2001:db8::15

E.

2003.0.113.15,2001:db8::15 www.example.com www

Full Access
Question # 70

Which crontab entry could be used to set the system time at regular intervals?

A.

1 0 * * * date $d $t $24

B.

1 0 * * * ntpdate ntp1.digex.net

C.

1 0 * * * date ntp1.digex.net

D.

1 0 * * * runcron date ntp1.digex.net

E.

1 0 * * * settime $d $t $24

Full Access