{"name":"passwd-user","version":"1.2.0","description":"Get the passwd user entry from a username or uid","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/passwd-user"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["passwd","linux","osx","uid","gid","pw","getpwuid","posix","unix","shell","home","dir","username","user","etc","password","passwords"],"dependencies":{"exec-file-sync":"^1.0.0"},"devDependencies":{"mocha":"*"},"gitHead":"2ca9e846e8acb8df179dc91815b9c88ccb3046c4","bugs":{"url":"https://github.com/sindresorhus/passwd-user/issues"},"homepage":"https://github.com/sindresorhus/passwd-user","_id":"passwd-user@1.2.0","_shasum":"5f60ee247209cb0b432092844d0fd5fc184e9c42","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"5f60ee247209cb0b432092844d0fd5fc184e9c42","tarball":"http://registry-npm.ywwl.com/passwd-user/download/passwd-user-1.2.0.tgz","integrity":"sha512-McCfoxASyLWpnRlKVwZLz7P8ZokMbuWq9ZA07896cZY5Bx+GAWX05R0+/ANldGmPYiIxBcrbgwDnLxWH81FnDQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCUEldHs704+3sqh2NC8C1gZpfyzE5dS6uRciNR/57bdAIhAMRh9OJyAWv4k73gR335MSgSoR+z0v+dpB6TDGCulH+W"}],"size":2559,"noattachment":false,"key":"/passwd-user/-/passwd-user-1.2.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"readme":"# passwd-user\n\n> Get the [passwd](https://en.wikipedia.org/wiki/Passwd) user entry from a username or [user identifier (UID)](https://en.wikipedia.org/wiki/User_identifier_(Unix))\n\nWorks on macOS and Linux. See [`user-info`](https://github.com/sindresorhus/user-info) if you need cross-platform support.\n\n## Install\n\n```sh\nnpm install passwd-user\n```\n\n## Usage\n\n```js\nimport {passwdUser} from 'passwd-user';\n\nconsole.log(await passwdUser('sindresorhus'));\n/*\n{\n\tusername: 'sindresorhus',\n\tpassword: '*',\n\tuserIdentifier: 501,\n\tgroupIdentifier: 20,\n\tfullName: 'Sindre Sorhus',\n\thomeDirectory: '/home/sindresorhus',\n\tshell: '/bin/zsh'\n}\n*/\n\nawait passwdUser(501);\nconsole.log('Got entry for user 501');\n\nconst user = await passwdUser();\nconsole.log(`Got entry for user ${user.userIdentifier}`);\n```\n\n## API\n\nReturns an object with:\n\n- `username`\n- `password`\n- `userIdentifier`: [UID](https://en.wikipedia.org/wiki/User_identifier)\n- `groupIdentifier`: [GID](https://en.wikipedia.org/wiki/Group_identifier)\n- `fullName`: Name of user\n- `homeDirectory`: Home directory\n- `shell`: Default shell\n\n### passwdUser(username?)\n### passwdUser(userIdentifier?)\n\nReturns a `Promise<object>` with the user entry.\n\n### passwdUserSync(username?)\n### passwdUserSync(userIdentifier?)\n\nReturns an `object` with the user entry.\n\n#### username\n\nType: `string`\n\nThe username to look up.\n\n#### userIdentifier\n\nType: `number`\\\nDefault: [`process.getuid()`](https://nodejs.org/api/process.html#process_process_getuid) (The current user)\n\nThe [user identifier (UID)](https://en.wikipedia.org/wiki/User_identifier) to look up.\n\n## Related\n\n- [username](https://github.com/sindresorhus/username) - Get the user's username *(cross-platform)*\n- [fullname](https://github.com/sindresorhus/fullname) - Get the user's fullname *(cross-platform)*\n","publish_time":1433527393383,"_cnpm_publish_time":1433527393383,"dist-tags":{"latest":"4.0.0"}}