Samba server is a free software of Server Message Block networking protocol. Mainly used for sharing files and print services among the network systems. Samba server contains own user management to access the files, adding a new user, deleting the existing user, enabling user account or deactivate / disable the existing user account are common during our daily work.
In this article, I will guide you to enable user account or deactivate / disable the existing user account in your Samba server easily.
To disable / deactivate the user account:
sudo smbpasswd -d gowri
The -d will perform disable user process
Disabled user gowri.
To enable the user account:
sudo smbpasswd -e gowri
The -e will perform enable user process
Enabled user gowri.
Various option of smbpasswd command:
sudo smbpasswd --help
smbpasswd: invalid option — – When run by root: smbpasswd [options] [username] otherwise: smbpasswd [options] options: -L local mode (must be first option) -h print this usage message -s use stdin for password prompt -c smb.conf file Use the given path to the smb.conf file -D LEVEL debug level -r MACHINE remote machine -U USER remote username extra options when run by root or in local mode: -a add user -d disable user -e enable user -i interdomain trust account -m machine trust account -n set no password -W use stdin ldap admin password -w PASSWORD ldap admin password -x delete user -R ORDER name resolve order