chpasswd
v1.0.0
Published
This module changes password with "chpasswd"
Downloads
4
Maintainers
Readme
chpasswd
This module changes password with "chpasswd"
Install
npm i chpasswd --save
Usage
const { chpasswd, chpasswdSync } = require('../index')
const password = require('./password')
// Async
chpasswd(password.old, password.new, function (error) {
if (error) {
console.log('Error ! ', error)
} else {
console.log('Success !')
}
})
// Sync
var result = chpasswdSync(password.old, password.new)
console.log(result ? 'Success !' : 'Error !')