LFCS · Question #572
Which of the following commands will mount a remote Samba share when the user is Winuser and the password is somepass?
The correct answer is A. mount -t smbfs -o username=Winuser,password=somepass //SERVER/share /media/sambashare. This question asks for the correct mount command syntax to mount a remote Samba share with a specified username and password on a Linux system.
Question
Options
- Amount -t smbfs -o username=Winuser,password=somepass //SERVER/share /media/sambashare
- Bmount -t smbfs -o username=Winuser,password=somepass \SERVER\share /media/sambashare
- Cmount -t smbfs -o Winuser%somepass //SERVER/share /media/sambashare
- Dmount -t smbfs -o username=Winuser%somepass //SERVER/share /media/sambashare
How the community answered
(53 responses)- A70% (37)
- B9% (5)
- C4% (2)
- D17% (9)
Why each option
This question asks for the correct `mount` command syntax to mount a remote Samba share with a specified username and password on a Linux system.
The `mount -t smbfs` (or `cifs`) command uses the `-o` option to specify additional parameters like `username` and `password` in a comma-separated list, and the remote share path is correctly formatted with double slashes `//SERVER/share`.
The remote share path uses backslashes `\SERVER\share`, which is incorrect for specifying a remote host and share in a Linux mount command, typically used in Windows paths.
The username and password are provided in the incorrect format `Winuser%somepass` directly as an option, which is not the standard `username=...` and `password=...` format for the `mount` command.
While `username=` is correct, the password is concatenated with the username using `%` within the `username` option, which is an incorrect syntax for passing credentials to the `mount` command.
Concept tested: Linux command to mount Samba shares
Source: https://www.samba.org/samba/docs/current/manpages/mount.cifs.8.html
Topics
Community Discussion
No community discussion yet for this question.