Skip to content
Convert a username/group name to a uid/gid number
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE readme update Feb 28, 2012
get-uid-gid.js the rest Feb 28, 2012
package.json package: fix repository link Oct 8, 2015
uid-number.js fix confusing variable names Feb 20, 2014

Use this module to convert a username/groupname to a uid/gid number.


npm install uid-number

Then, in your node program:

var uidNumber = require("uid-number")
uidNumber("isaacs", function (er, uid, gid) {
  // gid is null because we didn't ask for a group name
  // uid === 24561 because that's my number.
You can’t perform that action at this time.