Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

create user

hallo guys
many ask about how 2 create user from terminal

try that

sudo System/Library/ServerSetup/serversetup -createUser test test t

but its only admin i cant tell now know how 2 change it 2 standard user..if anyone know what am talkin about plz reply :))

Mac OS X (10.5.6)

Posted on Sep 12, 2009 2:31 PM

Reply
7 replies

Sep 13, 2009 10:47 AM in response to daly_24

serversetup is designed specifically to deal with the admin of the server, including setting the admin account.

Even its own help says that:

/System/Library/ServerSetup/serversetup -help
Usage: serversetup -createUser <full name> <short Name> <passWord>
Create the admin user with <full name>, <short Name>, and <passWord>.
The sequence is important. Return 1 if name exists.


So serversetup is not the tool you want.

To create directory users you should use dscl, the Directory Service Command Line utility, e.g:

dscl / -create /Users/joeschmoe

Sep 13, 2009 2:35 PM in response to daly_24

well i tried ur command


No - you missed a parameter

dscl / -create /Users/test macuser


The first parameter indicates the directory you want to manage - dscl can either manage the local directory (/) or a remote directory (e.g. /LDAPv3/ldap.server.address/) and it needs to know which one you're trying to edit.

Sep 13, 2009 5:08 PM in response to daly_24


dscl . create /Users/testuser uid 5000
sudo dscl . create /Users/testuser gid 5000
sudo dscl . create /Users/testuser shell /bin/bash
sudo dscl . create /Users/testuser home /Users/testuser
sudo dscl . create /Users/testuser realname "testuser"
sudo dscl . create /Groups/testuser gid 5000
sudo dscl . create /Groups/testuser passwd *
sudo passwd testuser
sudo cp -R "/System/Library/User Template/English.lproj" /Users/testuser
sudo chown -R testuser:testuser /Users/testuser
sudo dscl . -read /Users/testuser
AppleMetaNodeLocation: /Local/Default
GeneratedUID: 64F19F73-12D3-4EAF-942F-7038025A412D
NFSHomeDirectory: /Users/testuser
PrimaryGroupID: 5000
RealName: testuser
RecordName: testuser
RecordType: dsRecTypeStandard:Users
UniqueID: 5000
UserShell: /bin/bash


Message was edited by: Nils C. Anderson

create user

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.