AFP548 Changing the world one server at a time.

Blank password in createuser

Home › Forums › Software › InstaDMG › Blank password in createuser

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #375355
    hetjan
    Participant

    I’m trying to create a user in my build train with a blank password. So far I’ve tried

    password=""

    and

    password=''

    and many variations on

    ./shadowHash "">password_hash 

    All variations of running ./shadowHash to get the desired result have resulted in a password_hash file containing “Invalid password”. Reading the shadowHash script I found these lines:

    if (empty($password)) {
            die("Invalid password");

    so I’m guessing shadowHash isn’t the way to go. Is there another way to get the desired result?

    #375363
    Rusty Myers
    Participant

    Did you try?

    password=

    Rusty

    #375369
    hetjan
    Participant

    Yes, of course.

    #375371
    Patrick Fergus
    Participant

    Try the following as a postflight in a payload-free pkg in your CustomPKGs:

    sudo "$3"/usr/bin/dscl -f "$3"/var/db/dslocal/nodes/Default localonly -passwd /Local/Target/Users/<username> ''

    I tried a slightly easier version of this:

    sudo /usr/bin/dscl . -passwd /Users/<username> ''

    and it gave me a one-click login (if the Login Window shows a list of users), which I’m guessing may be one of your goals.

    Note that I haven’t tried the first command, it’s just a collection of pieces of how to address dslocal via dscl on a non-startup disk. I think it’s syntactically correct, but I could be wrong and I don’t have the time to test it right now.

    – Patrick

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.