300-300 practice question 5 of 15

Which smbclient invocation displays a list of the available SMB shares on the remote Samba server FileSrv1?

Full set: 53 questions
Answer options
A: smbcontrol -L FileSrv1
B: smbshares --server FileSrv1
C: smbstatus -S FileSrv1
D: smbmount -L FileSrv1
E: smbclient -L FileSrv1 Correct answer
Correct Answer:
E. smbclient -L FileSrv1
Explanation

The smbclient utility is the primary command-line tool for accessing SMB/CIFS resources from a Linux client. The -L (or --list) option is specifically designed to query a remote host and retrieve a list of its available services, which includes shared directories (shares) and printers. When invoked as smbclient -L FileSrv1, the command attempts to connect to the server named FileSrv1 and requests its "browse list," effectively listing all advertised shares that the user has permission to see.

Why Incorrect

A. smbcontrol is a utility for sending control messages to local smbd, nmbd, or winbindd daemons, not for querying remote servers.
B. smbshares is not a standard command in the Samba software suite.
C. smbstatus is a server-side tool used to report on current connections and locked files on the local Samba server.
D. smbmount is an obsolete command for mounting SMB filesystems, superseded by mount.cifs, and it does not list shares.

References

1. Samba Official Documentation (Man Page): The smbclient(1) man page explicitly details the function of the -L option.

Source: Samba.org, smbclient(1) Man Page.

Reference: Under the "OPTIONS" section, it states: -L|--list=HOST "This option allows you to get a list of shares available on a host."

Link: https://www.samba.org/samba/docs/current/man-html/smbclient.1.html

2. University Courseware: Course materials for system administration frequently cover Samba and its utilities.

Source: Rochester Institute of Technology, CSEC-464: Network Services and Security Lab Manual.

Reference: Lab 04: Samba, Section "Enumerating Samba". The document instructs: "To list the shares on a server, use the -L option: smbclient -L ".

Link: https://www.cs.rit.edu/~csec464/lab/04samba.html

3. Samba Official Documentation (Man Page): The smbstatus(1) man page clarifies its purpose, distinguishing it from smbclient.

Source: Samba.org, smbstatus(1) Man Page.

Reference: The description states, "smbstatus is a very simple program to list the current Samba connections." This confirms it is a server-side status tool.

Link: https://www.samba.org/samba/docs/current/man-html/smbstatus.1.html

Scroll to Top