LinuxCommandLibrary

smbpasswd

Manage Samba user passwords and accounts

TLDR

Change current user's SMB password

$ smbpasswd
copy
Add a user to Samba and set password
$ sudo smbpasswd -a [username]
copy
Modify an existing Samba user's password
$ sudo smbpasswd [username]
copy
Delete a Samba user
$ sudo smbpasswd -x [username]
copy
Enable a Samba user
$ sudo smbpasswd -e [username]
copy
Disable a Samba user
$ sudo smbpasswd -d [username]
copy

SYNOPSIS

smbpasswd [options] [username]

DESCRIPTION

smbpasswd manages Samba user passwords. It allows users to change their own SMB password, and administrators to add, remove, or modify Samba user accounts.
Samba users must have an existing local Unix account before being added. The Samba password database is separate from the system password.

PARAMETERS

-a

Add a new Samba user
-x
Delete a Samba user
-d
Disable a Samba user account
-e
Enable a previously disabled account
-n
Set null password (requires null passwords enabled)
-r _machine_
Change password on remote machine
-U _username_
Use specified username on remote machine
-s
Read password from stdin (silent mode)

CAVEATS

Users must exist in the Unix system before being added to Samba. If a Unix account is deleted before the Samba account, use pdbedit instead to remove the Samba entry.

SEE ALSO

pdbedit(8), samba(7), smb.conf(5)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community