LogoPear Docs
ReferencesBareModules

bare-posix

Reference for bare-posix: POSIX-specific bindings for Bare—user, group, and identity calls.

bare-posix provides POSIX-specific bindings for Bare—the user, group, and identity calls that have no portable Windows equivalent. It's a native addon (POSIX platforms: macOS, Linux, and other Unix systems).

npm i bare-posix

API

User and group IDs

posix.getuid() · posix.setuid(id) · posix.geteuid() · posix.seteuid(id)

Get or set the real and effective user IDs.

posix.getgid() · posix.setgid(id) · posix.getegid() · posix.setegid(id)

Get or set the real and effective group IDs.

posix.getgroups()

Return the supplementary group IDs.

Lookups

posix.getpwnam(name) · posix.getgrnam(name)

Look up a user (passwd) or group entry by name.

See also

On this page