Forrest logo
back to the pdbedit tool

pdbedit:tldr:2ecfb

pdbedit: Add an existing Unix user to Samba (will prompt for password).
$ sudo pdbedit --user ${username} --create
try on your machine

The command "sudo pdbedit --user ${username} --create" is used to create a new user account in the system's password database. Here's an explanation of the various components of this command:

  1. "sudo": It is used to run the following command with elevated privileges, typically requiring administrator or root access. The user running this command must have the necessary permissions to create a new user.

  2. "pdbedit": It is a command-line tool for managing the Samba password database. Samba is an open-source implementation of the SMB/CIFS networking protocol used for file and printer sharing between different operating systems.

  3. "--user ${username}": This option specifies the username for which the account needs to be created. The "${username}" is a placeholder that should be replaced with the actual desired username.

  4. "--create": This flag instructs the "pdbedit" command to create a new user account in the password database. By using this flag, you indicate that you want to add a user rather than modifying an existing account.

Overall, this command allows you to create a new user account using the "pdbedit" tool with elevated privileges.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the pdbedit tool