nerdexam
Linux_Foundation

LFCS · Question #775

If the path parameter is not set for a share in the smb.conf file, the share will refer to which of the following directories?

The correct answer is E. ~/.samba. If the path parameter is omitted for a share in smb.conf, Samba defaults to using a hidden directory named .samba within the user's home directory.

Submitted by chen.hong· Apr 18, 2026Service Configuration

Question

If the path parameter is not set for a share in the smb.conf file, the share will refer to which of the following directories?

Options

  • A/var/samba
  • B/var/smb/tmp
  • C/var/spool/samba
  • D/tmp
  • E~/.samba

How the community answered

(37 responses)
  • B
    3% (1)
  • C
    5% (2)
  • D
    5% (2)
  • E
    86% (32)

Why each option

If the `path` parameter is omitted for a share in `smb.conf`, Samba defaults to using a hidden directory named `.samba` within the user's home directory.

A/var/samba

`/var/samba` is not a default path for Samba shares; it might be used for specific share configurations, but not implicitly.

B/var/smb/tmp

`/var/smb/tmp` is not a default path for Samba shares and is not used when the `path` parameter is absent.

C/var/spool/samba

`/var/spool/samba` is typically used for print spooling or other internal Samba operations, not as a default share path.

D/tmp

`/tmp` is a system-wide temporary directory and is not the default implicit path for user-specific Samba shares.

E~/.sambaCorrect

According to Samba's `smb.conf` documentation, if the `path` parameter is not explicitly defined for a share, the default directory that Samba will serve is `~/.samba`. This means a subdirectory named `.samba` inside the connecting user's home directory.

Concept tested: Samba share configuration defaults

Source: https://www.samba.org/samba/docs/current/manpages-html/smb.conf.5.html

Topics

#Samba configuration#smb.conf#Default paths#Network shares

Community Discussion

No community discussion yet for this question.

Full LFCS Practice