Samba Commands: Difference between revisions
Created page with "These are some useful Samba Commands =Status check commands= <pre> sudo samba-tool ldapcmp -r sudo samba-tool drs showrepl sudo samba-tool visualize uptodateness -r sudo pdbedit -L -v -L sudo samba-tool domain passwordsettings show </pre> =User Management= <pre> sudo samba-tool user create kedar.ap sudo samba-tool user setpassword kedar.ap wbinfo --name-to-sid kedar.ap sudo samba-tool user delete kedar.ap sudo samba-tool..." |
mNo edit summary |
||
Line 29: | Line 29: | ||
* https://wiki.samba.org/index.php/Password_Settings_Objects | * https://wiki.samba.org/index.php/Password_Settings_Objects | ||
* https://wiki.samba.org/index.php/Group_Policy | * https://wiki.samba.org/index.php/Group_Policy | ||
[[Category:How Tos]] |
Latest revision as of 10:26, 20 December 2024
These are some useful Samba Commands
Status check commands
sudo samba-tool ldapcmp -r sudo samba-tool drs showrepl sudo samba-tool visualize uptodateness -r sudo pdbedit -L -v -L sudo samba-tool domain passwordsettings show
User Management
sudo samba-tool user create kedar.ap sudo samba-tool user setpassword kedar.ap wbinfo --name-to-sid kedar.ap sudo samba-tool user delete kedar.ap sudo samba-tool group add testgroup sudo samba-tool group delete testgroup sudo samba-tool group addmembers "testgroup" user[,otheruser[,thirduser[,...]]] sudo samba-tool group removemembers "testgroup" user[,otheruser[,thirduser[,...]]] sudo samba-tool group listmembers "testgroup" | grep username sudo samba-tool user edit kedar.ap (vim is required for tis command to work. Install vim first) sudo samba-tool user list | grep username sudo samba-tool user (press enter to get all options for user management) sudo pdbedit -L -v -L (careful... if there are a lot of users it will take a lot of time and samba will be in hung state) sudo samba-tool domain passwordsettings pso show-user kedar.ap