nerdexam
Linux_Foundation

LFCS · Question #624

Select the TWO correct statements about the smbpasswd command:

The correct answer is B. The -a <user> parameter adds <user> account to the Samba database. If the account already exists, C. The -x <user> parameter removes the <user> account from the Samba database. The smbpasswd command is used for managing user accounts in the Samba database, including adding new users or removing existing ones.

Submitted by ricky.ec· Apr 18, 2026User and Group Management

Question

Select the TWO correct statements about the smbpasswd command:

Options

  • AThe -d <user> parameter deletes the <user> account from Samba database.
  • BThe -a <user> parameter adds <user> account to the Samba database. If the account already exists,
  • CThe -x <user> parameter removes the <user> account from the Samba database.
  • Dthe -e <user> parameter excludes the <user> account from the Samba database.
  • Esmbpasswd enables password changes only on Samba servers and not regular Windows servers.

How the community answered

(25 responses)
  • B
    96% (24)
  • E
    4% (1)

Why each option

The `smbpasswd` command is used for managing user accounts in the Samba database, including adding new users or removing existing ones.

AThe -d <user> parameter deletes the <user> account from Samba database.

The `-d <user>` parameter disables a Samba user account, preventing login, but does not delete the account entry from the database.

BThe -a <user> parameter adds <user> account to the Samba database. If the account already exists,Correct

The `smbpasswd -a <user>` parameter explicitly adds a new user account to Samba's internal password database, preparing it for Samba authentication.

CThe -x <user> parameter removes the <user> account from the Samba database.Correct

The `smbpasswd -x <user>` parameter removes or deletes an existing user account from the Samba password database, effectively revoking their Samba access.

Dthe -e <user> parameter excludes the <user> account from the Samba database.

The `-e <user>` parameter enables a Samba user account that was previously disabled, allowing them to log in again.

Esmbpasswd enables password changes only on Samba servers and not regular Windows servers.

`smbpasswd` is designed to manage passwords for users authenticating against a Samba server, not for directly changing passwords on remote Windows servers.

Concept tested: `smbpasswd` command for user management

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

Topics

#smbpasswd#Samba#User Management#Command Line

Community Discussion

No community discussion yet for this question.

Full LFCS Practice