Home Forums Software InstaDMG Createuser pkg — what am I doing wrong??

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #376542
    andyinindy
    Participant

    I cannot seem to figure out the createuser script/package. It creates a user, but it creates it on the machine that I am using to create the image, not in the image! Here is my script, which I use packagemaker to wrap into a pkg:

    [code]
    #!/bin/bash

    dscl . -create Users/infores
    dscl . -create Users/infores home /Users/infores
    dscl . -create Users/infores name infores
    dscl . -create Users/infores realname “Information Resources”
    dscl . -create Users/infores shell /bin/bash
    dscl . -create Users/infores uid 501
    dscl . -create Users/infores gid 501
    dscl . -passwd Users/infores “password”

    dseditgroup -o edit -a infores -t user -n /Local/Default admin

    ditto -rsrcFork “/System/Library/User Template/English.lproj/” “/Users/infores”
    chown -R infores:admin /Users/infores

    exit 0
    [/code]

    Please help!

    #376543
    larkost
    Participant

    Why not use the one that comes with InstaDMG? That one already has all of this figured out for you.

    #376544
    andyinindy
    Participant

    I can’t seem to find it. Where is this script??

    #376545
    larkost
    Participant

    Assuming you are using a relatively recent version of InstaDMG, then it is in InstaDMG/AddOns/createUser.

    #376546
    andyinindy
    Participant

    I am using 1.4b4 and do not see this… have I somehow downloaded the wrong version??

    #376547
    Rusty Myers
    Participant

    You are correct, it wasn’t included, here is the link
    [url]https://www.afp548.com/filemgmt/index.php?id=76[/url]
    Rusty

    #376813
    Jaimegago
    Participant

    And if you want to know what was wrong in your script, you need to use $3 as your mount point of your destination volume not / which is the booted volume. So your script should have look like this
    dscl . -create $3/Users/infores
    dscl . -create $3/Users/infores home $3/Users/infores

    When you install a script via a package the target voilume of your package is passed by the installer to your script as $3.

    Much more info here http://s.sudre.free.fr/Stuff/PackageMaker_Howto.html

    Give a man a fish…

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

Comments are closed