
Product
Rust Support in Socket Is Now Generally Available
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.
getpwuid() binding - returns username, name, home directory, shell, gid from uid
getpwuid() for Node.js - returns username, name, home directory, shell, gid from
uid
If you're creating a reusable module you should probably use passwd-user instead, as it shells out rather than using a native binding.
npm install pwuid
This is a native binding and expects you to have the required toolchain. (ignore the node-gyp install)
getpwuid() is a POSIX function and won't work on Windows.
Use optionalDependencies if you need to include it in a cross-platform environment.
import pwuid from 'pwuid';
console.log(pwuid());
/*
{
name: 'sindresorhus',
uid: 501,
gid: 20,
gecos: 'Sindre Sorhus',
dir: '/Users/sindresorhus',
shell: '/bin/zsh'
}
*/
Accepts a uid number and returns an object with:
name: usernameuid: user ID, same as suppliedgid: group IDgecos: user information, usually the users full namedir: home directoryshell: default shellIt will use the current user process.getuid() if no uid is given.
FAQs
getpwuid() binding - returns username, name, home directory, shell, gid from uid
The npm package pwuid receives a total of 19 weekly downloads. As such, pwuid popularity was classified as not popular.
We found that pwuid demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.

Security News
Chrome 144 introduces the Temporal API, a modern approach to date and time handling designed to fix long-standing issues with JavaScript’s Date object.

Research
Five coordinated Chrome extensions enable session hijacking and block security controls across enterprise HR and ERP platforms.