---
name: "Ns_Uid"
section: "3"
platform: "linux"
package: "aolserver4"
version: "4.0.10-7"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/Ns_Uid"
---

# Ns\_Uid(3)

Get info about users and groups on Unix system

```

```

## NAME

Ns\_GetGid, Ns\_GetUid, Ns\_GetUserGid, Ns\_GetUserHome - Get info about users and groups on Unix system

## SYNOPSIS

```
#include "ns.h"

int
Ns_GetGid(char *group)

int
Ns_GetUid(char *user)

int
Ns_GetUserGid(char *user)

int
Ns_GetUserHome(Ns_DString *pds, char *user)
```

## DESCRIPTION

- **Ns\_GetGid**(*group*)

  Return the running server's Unix group id.

- **Ns\_GetUid**(*user*)

  Return the running server's Unix user id.

- **Ns\_GetUserGid**(*user*)

  Return the Unix group id for the given user.

- **Ns\_GetUserHome**(*pds, user*)

  The Ns\_GetUserHome function returns NS\_TRUE and appends the user's home directory to the Ns\_DString passed in, or it returns NS\_FALSE if the user does not exist.

## SEE ALSO

nsd(1), [info(n)](/info/n.md)

## KEYWORDS
