Samba AD DC : Basic User Management2024/11/29 |
This is the basic user management for Samba4 Active Directory Domain Controller. |
|
[1] | Display domain users list. |
[root@smb ~]# samba-tool user list fedora krbtgt Guest Administrator |
[2] | Add or delete a domain user. |
# add a user [root@smb ~]# samba-tool user create serverworld
New Password: # set password
Retype Password:
User 'serverworld' added successfully
# delete a user [root@smb ~]# samba-tool user delete fedora Deleted user fedora |
[3] | Reset password or set expiry for a user. |
# reset password [root@smb ~]# samba-tool user setpassword fedora New Password: Changed password OK # set expiry [root@smb ~]# samba-tool user setexpiry fedora --days=7 Expiry for user 'fedora' set to 7 days. |
[4] | Disable or Enable a user account. |
[root@smb ~]#
[root@smb ~]# samba-tool user disable fedora
samba-tool user enable fedora Enabled user 'fedora' |
[5] | Display domain groups and members. |
# display group list [root@smb ~]# samba-tool group list Read-only Domain Controllers Group Policy Creator Owners Domain Guests Distributed COM Users Schema Admins Performance Monitor Users Administrators Pre-Windows 2000 Compatible Access ..... ..... # display members in a group [root@smb ~]# samba-tool group listmembers "Domain Users" krbtgt Administrator serverworld fedora |
[6] | Add or delete a domain group. |
[root@smb ~]#
[root@smb ~]# samba-tool group add SecAdmin Added group SecAdmin samba-tool group delete SecAdmin Deleted group SecAdmin |
[7] | Add or delete a member from a domain group. |
[root@smb ~]#
[root@smb ~]# samba-tool group addmembers SecAdmin fedora Added members to group SecAdmin samba-tool group removemembers SecAdmin fedora Removed members from group SecAdmin |
[8] | Display OU or OU object list. |
[root@smb ~]#
[root@smb ~]# samba-tool ou list OU=Domain Controllers samba-tool ou listobjects 'OU=Domain Controllers' CN=SMB,OU=Domain Controllers |
[9] | Add or delete an OU. |
[root@smb ~]#
samba-tool ou add 'ou=Hiroshima' Added ou "ou=Hiroshima,DC=srv,DC=world"
[root@smb ~]#
[root@smb ~]# samba-tool ou add 'ou=Develop,ou=Hiroshima' Added ou "ou=Develop,ou=Hiroshima,DC=srv,DC=world" samba-tool ou list OU=Develop,OU=Hiroshima OU=Hiroshima OU=Domain Controllers |
Sponsored Link |
|