image
image

|


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

Reply
 
Thread Tools
  #1  
Old July 11th, 2005, 12: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 12:09 PM. Reason: (missed a step in the how-to section)
Reply With Quote
  #2  
Old August 23rd, 2005, 09: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, 12:40 PM
fryke's Avatar
Super Moderator
 
Join Date: Sep 2000
Location: macosx.com
Posts: 13,040
Thanks: 2
Thanked 0 Times in 0 Posts
fryke has a spectacular aura aboutfryke has a spectacular aura about
Nice find. And yes, what mgruene asks for would be great - and more similar to what SysPrefs does if you add a user.
__________________
MacBook Air 13" 1.6 GHz, 2 GB RAM, 80 GB HD. Mac OS X 10.5.4
MacBook 13" 1.83 GHz, 2 GB RAM, 160 GB HD. Mac OS X 10.5.4
Hackintosh Core2Duo 2.4 GHz, 2 GB RAM, 160 GB HD. Mac OS X 10.5.4
iPhone 3G 16 GB (v2), AppleTV 1G 40 GB (v2)

Mac user since 1987, Apple Product Professional 2007, 2008.
Reply With Quote
Reply

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 10:29 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.