-
All replies
-
Helpful answers
-
Nov 21, 2010 1:54 AM in response to MacUzrby Antonio Rocco,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 /Usersdscl . -create /Users/howiedoitt
Create and set the shell propertydscl . -create /Users/howiedoitt UserShell /bin/bash
Create and set the user’s full namedscl . -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 directorydscl . -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 dutiesdscl . -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 -
Jan 24, 2011 8:59 PM in response to Antonio Roccoby AppleJason,Hi Antonio - did you actually try this? On Leopard/SL it doesn't work. -
Jan 25, 2011 11:29 AM in response to AppleJasonby Antonio Rocco,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 -
Jan 27, 2011 5:38 AM in response to Antonio Roccoby AppleJason,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.... -
Jan 27, 2011 7:09 AM in response to AppleJasonby Templeton Peck,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... -
Jan 27, 2011 7:33 AM in response to Templeton Peckby Antonio Rocco,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 -
Jan 28, 2011 7:30 AM in response to Antonio Roccoby AppleJason,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? -
Jan 28, 2011 3:30 PM in response to AppleJasonby Antonio Rocco,Hisudo dscl . -list /Groups PrimaryGroupID
Tony