> For the complete documentation index, see [llms.txt](https://alexanderbittner.gitbook.io/pentest-resources/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alexanderbittner.gitbook.io/pentest-resources/general/os-basics/users/user-info.md).

# User info

### What users are there?

{% tabs %}
{% tab title="Windows" %}
List users like this:

`net users`
{% endtab %}

{% tab title="Linux" %}
Query the /etc/passwd file directly:

`cat /etc/passwd`

Or use getent:

`getent passwd`

Grep for a certain user:

`cat /etc/passwd | grep username`\
`getent passwd | grep username`
{% endtab %}
{% endtabs %}

### What groups are there?

{% tabs %}
{% tab title="Windows" %}
List groups:

`net localgroup`
{% endtab %}

{% tab title="Linux" %}
simple command:

`groups`

See entire group list:

`cut -d: -f1 /etc/group | sort`
{% endtab %}
{% endtabs %}
