Thursday, July 7, 2016

Active Directory ds Commands for user add,delete and for hack.

Here I'm not going to talk about how to install Domain Service in your server or How to interact with Active Directory Users and Computers application. I'm going to make some simple note how to add users in a domain and how to add that users in to different groups.

add a user in Domain Controller.

command:

dsadd user "cn=firday, cn=users, dc=week, dc=local" -pwd Friday@123 -disabled no

This will add the user "friday" in "users" container on "week" domain. The password is going to be "Friday@123". "-disabled no" option will enable the user account.

Change password of the user.

 dsmod user "cn=firday, cn=users, dc=week, dc=local" -pwd abc@123

In this case we are changing the previous user's password to "abc@123"

Add a user to an Admin group.

There may be several admin groups in your domain like itadmin, domain admin, built-in administrators ...



So to select the relevant group use the following command.

dsquery group "dc=week, dc=local"

Then it will show all the groups in your domain.
Copy  the domain you are going to add the user.

So here's how to add the user "firday" in to "domain admins" group.

dsmod group "cn=domain admins, cn=users, dc=week, dc=local" -addmbr "cn=friday, cn=users, dc=week, dc=local"


These are the things you should know to hack a domain server when you have physical access.

Happy Hacking...!

No comments:

Post a Comment