MacUzr

Q: Pushing Out User Account Using ARD

Does anyone know if it is possible to push an entire user account from the administrative computer to a client computer? I am trying to come up with an easy way to create a new user account on 35 student computers in a lab setting. Thanks

iMac, Mac OS X (10.6.5)

Posted on Nov 20, 2010 7:15 PM

Close

Q: Pushing Out User Account Using ARD

  • All replies
  • Helpful answers

  • by Antonio Rocco,

    Antonio Rocco Antonio Rocco Nov 21, 2010 1:54 AM in response to MacUzr
    Level 6 (10,606 points)
    Desktops
    Nov 21, 2010 1:54 AM in response to MacUzr
    Hi

    You should be able to achieve this using the command line? The commands that follow need to be run as root. As an example let's use one of Apple's 'favourite' test users - Howie Doitt.

    Create a new entry in the local domain under the category /Users

    dscl . -create /Users/howiedoitt


    Create and set the shell property

    dscl . -create /Users/howiedoitt UserShell /bin/bash


    Create and set the user’s full name

    dscl . -create /Users/howiedoitt RealName "Howie Doitt"


    Create and set the user’s ID (assuming only one account?)

    dscl . -create /Users/howiedoitt UniqueID 510


    Create and set the user’s group ID (the default staff group)

    dscl . -create /Users/howiedoitt PrimaryGroupID 20


    Create and set the user home directory

    dscl . -create /Users/howiedoitt NFSHomeDirectory /Local/Users/howiedoitt


    Set the password - if desired?

    dscl . -passwd /Users/howiedoitt whateverpasswordyouwant


    If you would like howiedoitt to be able to perform administrative duties

    dscl . -append /Groups/admin GroupMembership howiedoitt


    Restart the workstation(s) or log out the current user and log in again as the new user for changes to take effect. If there was no home folder created it will be created on successful login with the appropriate POSIX permissions set. You could pre-create the home folder in /Users using the mkdir command making sure you define that folder's name as the created user's shortname.

    There are a number of ways of doing the above using ARD. You could do it command by command applied to a selected list of computers. Or combine the whole lot into a script and run the script. You could even schedule when the script can be run.

    Tony
  • by AppleJason,

    AppleJason AppleJason Jan 24, 2011 8:59 PM in response to Antonio Rocco
    Level 1 (13 points)
    Jan 24, 2011 8:59 PM in response to Antonio Rocco
    Hi Antonio - did you actually try this? On Leopard/SL it doesn't work.
  • by Antonio Rocco,

    Antonio Rocco Antonio Rocco Jan 25, 2011 11:29 AM in response to AppleJason
    Level 6 (10,606 points)
    Desktops
    Jan 25, 2011 11:29 AM in response to AppleJason
    AppleJason

    I would not offer anything unless I've done it myself and know it works. Otherwise there's no point is there? Perhaps the problem is elsewhere?

    Tony
  • by AppleJason,

    AppleJason AppleJason Jan 27, 2011 5:38 AM in response to Antonio Rocco
    Level 1 (13 points)
    Jan 27, 2011 5:38 AM in response to Antonio Rocco
    Hi Antonio:

    perhaps I am! that's why I'm here...

    as I've stated, I get an error. right from the start:

    dscl . -create /Users/howiedoitt

    comes up with an error in my own terminal. SL 10.6.6
    my acct is an admin as well....
  • by Templeton Peck,

    Templeton Peck Templeton Peck Jan 27, 2011 7:09 AM in response to AppleJason
    Level 9 (62,070 points)
    Jan 27, 2011 7:09 AM in response to AppleJason
    AppleJason wrote:
    Hi Antonio:

    perhaps I am! that's why I'm here...

    as I've stated, I get an error. right from the start:

    dscl . -create /Users/howiedoitt

    comes up with an error in my own terminal. SL 10.6.6
    my acct is an admin as well....


    You might want to tell him/us what that error is...
  • by Antonio Rocco,

    Antonio Rocco Antonio Rocco Jan 27, 2011 7:33 AM in response to Templeton Peck
    Level 6 (10,606 points)
    Desktops
    Jan 27, 2011 7:33 AM in response to Templeton Peck
    Hi

    A clue regarding the error would be nice, however I'm going to guess the error you're seeing may look something like this?
    <main> attribute status: eDSPermissionError
    <dscl_cmd> DS Error: -14120 (eDSPermissionError)
    <main> attribute status: eDSPermissionError
    <dscl_cmd> DS Error: -14120 (eDSPermissionError)

    If you're doing this locally you need to precede the command with sudo? If doing this remotely you run the command as root.

    Tony
  • by AppleJason,

    AppleJason AppleJason Jan 28, 2011 7:30 AM in response to Antonio Rocco
    Level 1 (13 points)
    Jan 28, 2011 7:30 AM in response to Antonio Rocco
    Yikes! My bad... it was sudo I was lacking..

    Another question,

    How do I know what PrimaryGroupID to set it to? Can I dump the existing groups/id's out from somewhere? server tools maybe?
  • by Antonio Rocco,

    Antonio Rocco Antonio Rocco Jan 28, 2011 3:30 PM in response to AppleJason
    Level 6 (10,606 points)
    Desktops
    Jan 28, 2011 3:30 PM in response to AppleJason
    Hi

    sudo dscl . -list /Groups PrimaryGroupID


    Tony