View Single Post
  #6  
Old October 22nd, 2008, 02:41 PM
Giaguara's Avatar
Giaguara Giaguara is offline
Chmod 760
 
Join Date: Nov 2002
Location: ~
Posts: 8,621
Thanks: 7
Thanked 99 Times in 98 Posts
Giaguara is a jewel in the roughGiaguara is a jewel in the roughGiaguara is a jewel in the rough
(old post but) dscl for non-Mac OS X Server was added in 10.5, so for anyone with Tiger or prior, we would need to use other means such as niutil.

passwd shortname

may work, replace shortname with your short name and give the new one.

Otherwise, create a new admin user and log in as that, then change the previous account's password.

So, for Mac OS X 10.4 non-Server

niutil -create . /users/fred
niutil -createprop . /users/fred gid [groupID]
niutil -createprop . /users/fred uid [uniqueNumberOver1000]
niutil -createprop . /users/fred shell /bin/tcsh
niutil -createprop . /users/fred home /Users/fred
niutil -createprop . /users/fred realname "fred jones"
niutil -createprop . /users/fred passwd '*'
mkdir /Users/fred
mkdir /Users/fred/.ssh
chown -R fred /Users/fred
chgrp -R [groupID] /Users/fred
chmod 755 /Users/fred

should do it. Replace all details with the other relevant details. The uid for first created user is 501, so don't specify that or make sure the uid you give isn't in use yet.
__________________
MacBook Pro | Dell Mini Inspiron 9 | Mac Mini | Newton 2000 | iPhone | @Work : Dell D620 & 2x20" + a lot of Macs | Workstation, VC & Fusion
Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do.
~ Samuel Clemens | Rants | Photos
Reply With Quote