{"name":"passwd-user","version":"4.0.0","description":"Get the passwd user entry from a username or user identifier (UID)","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/passwd-user.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava && tsd"},"keywords":["passwd","linux","macos","osx","uid","gid","pw","getpwuid","posix","unix","shell","home","dir","username","user","etc","password","passwords","identifier"],"dependencies":{"execa":"^5.1.1"},"devDependencies":{"ava":"^3.15.0","tsd":"^0.18.0","xo":"^0.46.4"},"types":"./index.d.ts","gitHead":"c8e442a0f5ab563c60d785bb48e12df80d782bc3","bugs":{"url":"https://github.com/sindresorhus/passwd-user/issues"},"homepage":"https://github.com/sindresorhus/passwd-user#readme","_id":"passwd-user@4.0.0","_nodeVersion":"12.22.1","_npmVersion":"8.1.0","dist":{"integrity":"sha512-Y0hVgYTHsWRkOF/lG2ciRChuD1kiQCGbmg9hQuyxRrszz2B9779U8nUa90NVJ089UTCFIcvfQ6zgmbXj/YoIYg==","shasum":"426d2deef874fc036deb1dc2d21434b0d7b94c27","tarball":"http://registry-npm.ywwl.com/passwd-user/download/passwd-user-4.0.0.tgz","fileCount":5,"unpackedSize":9083,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh22WBCRA9TVsSAnZWagAAlQ8P/0FcoAWsEu8fhtpSfWjB\nquAZ0RIJjFrj7e8xdf9ugHTuAsUSGhz6SSD1HM/4qaWGdmP6+BXP5G9Lksli\n0QVZ/bwKoN2uPw+P0jgxoWJksaJb9X1xja5OdWjt6LrQ0w/XGkU7CGQGgoif\nufWkDJnnJYCsHwl7DaOM1eXU6lHZvkZNysPEvwoX+GI57k67E+YQcJNepLbL\nWUzqS0zZ7SzvvBW464wfNoi7r2DNZ93GhgnnsrNfCTb7f//wmdyLGLVPW9iM\nLbLTDrtxzob68qBS/K0EdS8buJdlHOhgmq5hqqJSQGLXvEz4dB+22R+G9kbN\n7ZqaBQmyMZHh8l+0XtEqM7FjoJ/DupIP92FaR5SX2r/AyDTtIFeVBXgz5ZYF\nP+hHHS02P4m2wuQErdir47D4vJ3nY2frJk92jDi0mT/6BNWOKd60Lc3HHf9p\ntN+JAE3UiRTVNr77ThB5PJabqBflq2KMC3rbngyYWOeazozNd+Tg9b/dbEOV\n0fdbBBE1iiU/wv/0porK29TwkpTyGQ70Tap+cQv8745QjxbafdxdoR1xVwlr\nE1eAgj2TzXmxJ+VtncUC35MN6rYbvr9NVhdFKFFGTFDdwK0tor3BUPW0G+Ht\nN4Z0r6/JYFPMV9cevo2yKoAu9pXES21gQm10lBRFijlC6B+Fg00jLaT5C5LX\nNMfQ\r\n=Ku5F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDQna0zJzn+7uDR6bV3GxsN3lXZgXk7BY/e65seuy9xrAiEAwkuEljAOiTMoPWnqRNCKke1rK/V06UjQopxRbhqAoco="}],"size":3009,"noattachment":false,"key":"/passwd-user/-/passwd-user-4.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/passwd-user_4.0.0_1636031617945_0.5458595231259147"},"_hasShrinkwrap":false,"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":1636031618070,"_cnpm_publish_time":1636031618070,"dist-tags":{"latest":"4.0.0"}}