Giter VIP home page Giter VIP logo

createuser's Introduction

createUser

Small utility to create users and to update the shadow hash data in a user record via the Open Directory APIs.

This has been tested with macOS Mojave where it solves the problem of being unable to create a new user by creating the raw plist files in the local OD node.

MacDevOps 2018 Hack Night Project

Thanks to everyone that helped on this project!

See you next year in Why Why Zed!

Use

createUser takes a number of options, only one is required -u the other options determine if the user is created and/or the password hash is updated.

-u user Determines the user name to create or to update the hash

User creation options

-f first First name of the user -l last Last name of the user -uid uid UID of the user -gid gid GID of the user -guid guid GUID of the user -admin Determines if the user is an admin or not -pass pass Sets the password of the user

Password hash options

-i iterations Iterations of the hash -e entropy Entropy of the hash -s salt Salt of the hash

Other options

-h Returns the help statement -p Prints the current hash of the user specified

Examples:

Create a new user

createUser -u joel -f Joel -l Rennich -uid 510 -gid 20 -admin

Will create a new user with the specified attributes. If no password is set you will not be able to authenticate as this user.

createUser -u joel -e Tf5e5HovnQ/MQoG3XNxpfP19bDxMSsdfsdfsdfXOq05vac1e8taMEl23hqvPHCtw+e7qGjty6aaEc1E8jywnO0= -i 2343 -s FwnfiVOsdfaseP6fEr21O05jiZEBVCrSBCDt3hzbk=

Will update the hash for the user with the specified attributes.

createuser's People

Contributors

og-joel avatar

Watchers

James Cloos avatar Bikramjeet Singh 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.