LX0-104 · Question #126
Which option below shows the correct command line to list the shares exported by the Samba server called NAME?
The correct answer is C. smbclient -L NAME. To list the shares exported by a Samba server named NAME, the smbclient -L NAME command is used. This command queries the specified Samba server for its available shares.
Question
Options
- Asmbcontrol -L
- Bsmbclient -N NAME
- Csmbclient -L NAME
- Dsmbmount -L NAME
How the community answered
(60 responses)- A3% (2)
- B2% (1)
- C90% (54)
- D5% (3)
Why each option
To list the shares exported by a Samba server named NAME, the `smbclient -L NAME` command is used. This command queries the specified Samba server for its available shares.
`smbcontrol` is used to send commands to `smbd` or `nmbd` daemons, not to list shares from a remote server.
`smbclient -N NAME` would attempt to connect to the server 'NAME' without a password, but it would not list the shares; the `-L` option is necessary for listing.
The `smbclient -L NAME` command is the correct way to list the shares exported by a Samba server named 'NAME'. The `-L` option specifically requests a list of services (shares) from the target host.
`smbmount` is a command used to mount Samba shares on a Linux system, not to list them.
Concept tested: Listing Samba shares
Source: https://www.samba.org/samba/docs/current/manpages/smbclient.1.html
Topics
Community Discussion
No community discussion yet for this question.