nerdexam
LPI

102-500 · Question #204

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
    3% (1)
  • B
    71% (22)
  • C
    16% (5)
  • D
    6% (2)
  • E
    3% (1)

Community Discussion

3
Hiroshi T.Hiroshi T.Mar 4, 2026

B is correct. The xhost program controls access to the X display server, and using it carelessly (especially xhost + to allow all hosts) grants any user on the network the ability to connect to your X server, which means they can capture keystrokes, read screen contents, and inject input into your graphical session with no authentication required.

9
Prof. SaraProf. SaraFeb 19, 2026

I initially gravitated toward D because "no authentication" sounds like the classic security horror story, but D describes anonymous file sharing, not X access. The pivot came when I remembered what xhost actually does: it disables X server access control entirely, meaning any user on any listed host can connect to your display and do whatever they want with your GUI session, which is exactly what B states.

0
Anjali D.Anjali D.Feb 25, 2026

Saw this one on my actual exam and almost second-guessed myself because D sounds scary too, but the answer is B, xhost allows other users to connect to your X server without needing to authenticate at all, which means anyone on the network can potentially display or intercept your graphical applications. Once I remembered that xhost basically opens the door with no lock, it clicked.

0
Full 102-500 Practice