---
name: "libproc_pw"
section: "3"
platform: "linux"
package: "libproc-dev"
version: "1.12.2"
release: "Debian 1.3 (Bo)"
platforms: ["linux"]
url: "https://new.carta.tech/libproc_pw"
---

# libproc\_pw(3)

lookup ids in /etc/passwd and /etc/group

## NAME

user\_from\_uid, group\_from\_gid - lookup ids in /etc/passwd and /etc/group

## SYNOPSIS

```
#include <proc/ps.h>

char *user_from_uid(uid_t uid);
char *group_from_gid(gid_t gid);
```

## DESCRIPTION

Both functions look up the numeric id and return a pointer to the name corresponding to the id. If they cannot find an entry matching id, they return a pointer to a string containing the id with a leading #.

## AUTHOR

This manpage was written by Helmut Geyer \<Helmut.Geyer@iwr.uni-heidelberg.de\>.
