LFCS · Question #608
Which command will list the shares on the workstation with the NetBIOS name officepc and IP address 192.168.0.3?
The correct answer is B. smbclient -L officepc. To list the available shares on a remote Samba/SMB server, the smbclient command with the -L option followed by the NetBIOS name of the server is used.
Question
Options
- Asmbclient -L -I 192.168.0.3
- Bsmbclient -L officepc
- Csmbclient -l -n officepc
- Dsmbclient -list -I 192.168.0.3
How the community answered
(36 responses)- A3% (1)
- B94% (34)
- C3% (1)
Why each option
To list the available shares on a remote Samba/SMB server, the `smbclient` command with the `-L` option followed by the NetBIOS name of the server is used.
While `smbclient -L` is correct for listing shares, specifying the IP address with `-I` is less commonly used when a NetBIOS name is available, and `smbclient` is designed to resolve NetBIOS names automatically.
The `smbclient` utility is the standard command-line tool for interacting with SMB/CIFS shares. The `-L` option specifically instructs `smbclient` to list the shares available on a specified server, and providing the NetBIOS name `officepc` directs the command to query that particular host for its shared resources.
The `-l` option is not a valid `smbclient` option for listing shares; `-L` is the correct option. The `-n` option sets the local client's NetBIOS name, not the target server's name for listing shares.
The `--list` option is not a valid parameter for `smbclient`; the correct option for listing shares is the single character `-L`.
Concept tested: Listing Samba/SMB shares
Source: https://www.samba.org/samba/docs/current/manpages/smbclient.1.html
Topics
Community Discussion
No community discussion yet for this question.