image
image

Go Back   macosx.com > Mac Help Forums > HOWTO & FAQs

Reply
 
LinkBack Thread Tools
  #1  
Old July 11th, 2005, 01:08 PM
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
  #2  
Old August 23rd, 2005, 10:39 PM
Registered User
 
Join Date: Aug 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
mgruene is on a distinguished road
That script looks nice. Will try it out when i get home.
Do you know if there's a way around chosing a numerical UID in OS X and let the system use the next available UID?
Reply With Quote
  #3  
Old August 24th, 2005, 01:40 PM
fryke's Avatar
Super Moderator
 
Join Date: Sep 2000
Location: macosx.com
Posts: 14,071
Thanks: 13
Thanked 89 Times in 84 Posts
fryke is a jewel in the roughfryke is a jewel in the roughfryke is a jewel in the roughfryke is a jewel in the rough
Nice find. And yes, what mgruene asks for would be great - and more similar to what SysPrefs does if you add a user.
__________________
iMac 24" 2.4 GHz, 4 GB RAM, 320 GB HD. Mac OS X 10.6.1
MacBook Air 13" 1.6 GHz, 2 GB RAM, 80 GB HD. Mac OS X 10.6.1
Mac mini 1.83 GHz, 2 GB RAM, 80 GB HD. Mac OS X 10.6.1
MacBook nano (Lenovo S10e white) 1.6 GHz, 2 GB RAM, 250 GB HD. Mac OS X 10.5.7
iPhone 3GS 32 GB white.

Mac user since 1987, Apple Sales Professional 2009, Apple Product Professional 2007-2009, Apple Certified Support Professional 10.5, Apple Certified Pro Aperture 2 (Level 1)
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump


All times are GMT -5. The time now is 06:52 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC1
Copyright 2000-2010 DigitalCrowd, Inc.