Created
December 25, 2012 03:08
-
-
Save geta6/4371494 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| prompt = require 'prompt' | |
| unixlib = require 'unixlib' | |
| schema = | |
| properties: | |
| user: | |
| message: 'Username' | |
| requireed: yes | |
| pass: | |
| message: 'Password' | |
| hidden: yes | |
| prompt.start() | |
| prompt.get schema, (e, res) -> | |
| unixlib.pamauth 'chkpasswd', res.user, res.pass, (success) -> | |
| console.log res.user, success |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment