nerdexam
Linux_Foundation

LFCS · Question #636

While attempting to create a user in the Samba database, the following message appeared: # smbpasswd -a john New SMB password: Retype new SMB password: ... Failed to initialise SAM_ACCOUNT for user…

The correct answer is A. The user john must be created in the Linux environment before it can be added to the Samba database. This error message indicates that Samba's smbpasswd -a command requires the user to first exist in the underlying UNIX/Linux password database before it can be added to the Samba password database.

Submitted by kim_seoul· Apr 18, 2026User and Group Management

Question

While attempting to create a user in the Samba database, the following message appeared: # smbpasswd -a john New SMB password: Retype new SMB password: ... Failed to initialise SAM_ACCOUNT for user john. Does this user exist in the UNIX password database? Failed to modify password entry for user john Select the correct explanation for why this error occurred.

Options

  • AThe user john must be created in the Linux environment before it can be added to the Samba database.
  • BThe Samba database is not compatible with the Linux backend.
  • CThe account user synchronization of Samba and Linux was not properly done.
  • DThe SAM_ACCOUNT script could not be started properly because the user running the smbpasswd

How the community answered

(61 responses)
  • A
    90% (55)
  • B
    5% (3)
  • C
    3% (2)
  • D
    2% (1)

Why each option

This error message indicates that Samba's `smbpasswd -a` command requires the user to first exist in the underlying UNIX/Linux password database before it can be added to the Samba password database.

AThe user john must be created in the Linux environment before it can be added to the Samba database.Correct

The `smbpasswd -a` command in Samba is used to add a user to the Samba password database. For this operation to succeed, the specified user (`john` in this case) must first have a valid entry in the system's local UNIX/Linux password database (e.g., `/etc/passwd`). Samba often relies on the existence of these local accounts for identity resolution before managing their SMB-specific password hashes.

BThe Samba database is not compatible with the Linux backend.

Samba is specifically designed to be compatible with Linux backends, making a general incompatibility statement incorrect.

CThe account user synchronization of Samba and Linux was not properly done.

While synchronization is important in Samba, the immediate error message 'Does this user exist in the UNIX password database?' directly points to the *absence* of the UNIX account, not a synchronization issue with an already existing account.

DThe SAM_ACCOUNT script could not be started properly because the user running the smbpasswd

The error message clearly points to the user's existence in the UNIX password database, not a problem with starting a `SAM_ACCOUNT` script or the privileges of the user running `smbpasswd`.

Concept tested: Samba user account creation prerequisites

Source: https://www.samba.org/samba/docs/current/manpages/smbpasswd.8.html

Topics

#Samba#User Management#Error Troubleshooting#Service Configuration

Community Discussion

No community discussion yet for this question.

Full LFCS Practice