Skip to content

Commit

Permalink
add deleting user from django shell
Browse files Browse the repository at this point in the history
  • Loading branch information
wh1te909 committed May 9, 2024
1 parent 5c95674 commit 3a4ffc1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions docs/management_cmds.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ python manage.py reset_password <username>
python manage.py reset_2fa <username>
```

### Delete a User
```python
python manage.py shell
from accounts.models import User
User.objects.get(username="changeme").delete()
```

### Find All Agents That Have X Software Installed

```bash
Expand All @@ -70,7 +77,8 @@ python manage.py find_services "quickbooks"

### Set a Specific Windows Update to not Install

```bash
```python
python manage.py shell
from winupdate.models import WinUpdate
WinUpdate.objects.filter(kb="KB5007186").update(action="ignore", date_installed=None)
```
Expand All @@ -89,7 +97,7 @@ python manage.py delete_tokens

### Reset All Auth Tokens for Install Agents and Web Sessions

```bash
```python
python manage.py shell
from knox.models import AuthToken
AuthToken.objects.all().delete()
Expand Down

0 comments on commit 3a4ffc1

Please sign in to comment.