This is the basic user management for Samba4 Active Directory Domain Controller.
[1] Display domain users list.

[email protected]:~# samba-tool user list 
Administrator
jessie
krbtgt
Guest

[2] Add a domain user.

[email protected]:~# samba-tool user add debian 
New Password:# set password
Retype Password:
User 'debian' created successfully
# see many other options with "samba-tool user add --help"

[3] Delete a domain user.

[email protected]:~# samba-tool user delete debian 
Deleted user debian

[4] Reset password for a user.

[email protected]:~# samba-tool user setpassword debian 
New Password:
Changed password OK

[5] Set expiry for a user.

[email protected]:~# samba-tool user setexpiry debian --days=7 
Expiry for user 'debian' set to 7 days.

[6] Disable/Enable user account.

[email protected]:~# samba-tool user disable debian
[email protected]:~# samba-tool user enable debian 
Enabled user 'debian'

[7] Display domain groups list.

[email protected]:~# samba-tool group list 
Allowed RODC Password Replication Group
Enterprise Read-Only Domain Controllers
Denied RODC Password Replication Group
...
...
DnsAdmins
Guests
Users

[8] Display members in a group.

[email protected]:~# samba-tool group listmembers "Domain Users" 
Administrator
debian
jessie
krbtgt

[9] Add a domain group.

[email protected]:~# samba-tool group add ServerWorld 
Added group ServerWorld
# see many other options with "samba-tool group add --help"

[10] Delete a domain group.

[email protected]:~# samba-tool group delete ServerWorld 
Deleted group ServerWorld

[11] Add/remove a member from a domain group.

[email protected]:~# samba-tool group addmembers ServerWorld debian 
Added members to group ServerWorld
[email protected]:~# samba-tool group removemembers ServerWorld debian 
Removed members from group ServerWorld

 

Articolo precedenteHow To Tune Apache – mpm prefork
Prossimo articoloSamba4 – Remote Server Administration Tools
Founder of Smeretech.com. Sys Admin and IT Manager