|
#1
| |||
| |||
| [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) |
|
#2
| |||
| |||
| 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? |
|
#3
| ||||
| ||||
| 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. |