Samba4 related commands

If you are using samba4 then you might notice that the samba3 commands would not work with samba4 as you are manually compiling your machine with samba4 package so the commands will vary. 

Here I will show you some of the examples of Samba4 commands.

samba-tool is used to change the Account settings of the domain users.# samba-tool domain passwordsettings show
# samba-tool domain passwordsettings set --help
--complexity
--store-plaintext
--history-length
--min-pwd-length
--min-pwd-age
--max-pwd-age
# samba-tool domain passwordsettings set --complexity on
# samba-tool domain passwordsettings set --history-length 8
# samba-tool domain passwordsettings set --min-pwd-length 10
# samba-tool domain passwordsettings set --min-pwd-age 30
# samba-tool domain passwordsettings set --max-pwd-age 90

To view the Account related settings:
# samba-tool domain passwordsettings show
To take a backup of Samba4 Domain server# cd /root/samba-master/source4/scripting/bin
#./samba_backup

This will create a backup and save it inside /usr/local/backup

To inspect the allocated UID and SID to and user or group# wbinfo --name-to-SID "username"
# wbinfo --sid-to-uid "SID"

Related Articles


Follow the below links for more tutorials

Leave a Comment

close button