Code Monkey home page Code Monkey logo

passwd-linux's Introduction

passwd-linux

Node.js module for checking and changing Linux user and password

Installation

$  npm install passwd-linux

Features

* Check if user exist.
* Check if password is correct.
* Change password if user exist.

Usage

Check if user exist

passwd.userExist(username, function (err, response) {
    if (err) {
        console.log(err);
    } else {
        if (response) {
            console.log('User exist');
        } else {
            console.log('Unknown user');

        }
    }
});

Check if password is correct

passwd.checkPassword(username, password, function (err, response) {
    if (err) {
        console.log(err);
    } else {
        if (response) {
            console.log('Password correct');
        } else {
            console.log('Password is not correct');
        }
    }
});

Change password if user exist

passwd.changePassword(username, password, function (err, response) {
    if (err) {
        console.log(err);
    } else {
        if (response) {
            console.log('Password successfully changed');
        } else {
            console.log('Error changing password');
        }
    }
}, 6);

Release History

Version Status Functionality
1.0.0 released Initial release
1.0.1 released Bug fixes
1.0.2 released Bug fixes
1.0.3 released Bug fixes
1.0.4 released Bug fixes
1.1.0 released Added checkUser and changePassNV methods
1.2.0 released Added checkPassMD5 method
1.2.1 released Bug fixes for: changePassNV and checkUser
1.2.2 released Bug fixes for: changePass
1.2.3 released Added support for MD5 to the change password method
1.2.4 released Bug fixes
1.2.5 released Bug fixes
1.3.0 released Combine checkPassMD5 and checkPassSHA512 to single method: checkPass
1.3.1 released Bug fixes: Now changePass and checkPass return unknownUser
2.0.0 released Rewrite all methods to satisfy 2 open issues

Todo

  • Change method checkPassMD5 from OpenSSL check (using ("child_process").exec) to javascript.

License

MIT

passwd-linux's People

Contributors

adriangherasim avatar andersevenrud avatar fxkai avatar gherasima avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.