nerdexam
LPI

117-102 · Question #744

Why is the xhost program considered dangerous to use?

The correct answer is B. It allows easy access to your X server by other users. See the full explanation below for the reasoning.

Question

Why is the xhost program considered dangerous to use?

Options

  • AIt makes it difficult to uniquely identify a computer on the network.
  • BIt allows easy access to your X server by other users.
  • CIt logs sensitive information to syslog.
  • DIt makes your computer share network resources without any authentication.
  • EIt is a graphical DNS tool with known exploits.

How the community answered

(31 responses)
  • A
    10% (3)
  • B
    84% (26)
  • C
    3% (1)
  • E
    3% (1)

Community Discussion

3
Lena V.Lena V.Jan 18, 2026

B is correct. xhost + disables access control on your X server entirely, meaning any user on any host can connect to your display and do things like capture keystrokes, inject input, or read screen contents, which is why you avoid it on any multi-user or networked system.

25
Devraj B.Devraj B.Dec 31, 2025

This one is straightforward once you know what xhost actually does, and the answer is B. The classic trap here is D, because "no authentication" sounds like it describes the same problem, but D is talking about sharing network resources broadly, which is not what xhost touches at all. xhost is specifically an access control list tool for the X display server, and running "xhost +" with a plus sign and no argument opens your X socket to literally anyone who can reach it over the network, meaning they can inject keystrokes, read your screen, and hijack your graphical session completely. That is why this maps to LPI objective 106.1 on X11 installation and configuration, which carries a weight of 2 and treats xhost as a known footgun that you should replace with xauth and MIT-MAGIC-COOKIE-based authentication. Memory hook: think "xhost plus equals full access," and whenever you see a plus sign with no qualifier, that is your red flag that the door is wide open.

0
Hiroshi T.Hiroshi T.Jan 7, 2026

I almost picked D, but xhost literally grants X server access with no user auth check.

0
Full 117-102 Practice