View Single Post
  #1  
Old July 11th, 2005, 01:08 PM
Tarz Tarz is offline
Registered User
 
Join Date: Jul 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Tarz is on a distinguished road
[How To] Create a User Account on a Remote Machine via SSH and the Command Line

Being a lazy Mac Admin, I prefer not to have to visit users' machines in order to get relatively simple tasks done. For example, if I needed to setup a local account on someone's Mac so that someone else could use it, I wouldn't want to have to walk over to another building to do that. I also wouldn't want to have to even use Timbuktu to remote control the machine if it wasn't necessary, since I might accidentally remote in at the time someone's reading email or whatever. So figured out how to script the creation of a new account from the command line. Then I pushed that script out to the machines on the network. Now if I need to create a user account, all I need to do is SSH to the other machine and type a single command on the command line. After I fill in some information the script needs, the account is automagically created for me.

The script I used to do this is available here:
http://mikesalsbury.com/mambo/content/view/130/2/

The script will create administrator and non-administrator accounts, and will also setup the user's home directory (i.e., "/Users/<newuser>").

While I've tested this script on OS X 10.3 and it seems to work (I don't have 10.4 yet to confirm that it works with 10.4), your mileage may vary. As with any freebie, use at your own risk.

Last edited by Tarz; July 11th, 2005 at 01:09 PM. Reason: (missed a step in the how-to section)
Reply With Quote