LFCS · 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 correct command is smbclient -L NAME.
Question
Options
- Asmbcontrol -L
- Bsmbclient -N NAME
- Csmbclient -L NAME
- Dsmbmount -L NAME
How the community answered
(45 responses)- A2% (1)
- B2% (1)
- C91% (41)
- D4% (2)
Why each option
To list the shares exported by a Samba server named 'NAME', the correct command is `smbclient -L NAME`.
`smbcontrol` is a utility for sending control commands to Samba daemons (smbd, nmbd, winbindd) and is not used for listing network shares.
While `smbclient` is the correct utility, the `-N` option specifies to not ask for a password, and without the `-L` option, it will not list the shares; it expects a share name to connect to.
The `smbclient` utility is used to connect to SMB/CIFS shares, and the `-L` (list) option followed by the server's name (`NAME`) will enumerate all the shares, printers, and available services offered by that Samba server.
`smbmount` (or `mount -t cifs` in modern Linux) is used for mounting a remote Samba share onto the local filesystem, not for listing available shares on a server.
Concept tested: Samba client share listing
Source: https://www.samba.org/samba/docs/current/manpages-3/smbclient.1.html
Topics
Community Discussion
No community discussion yet for this question.