Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Create new user account with Applescript or app?

Create new user account with Applescript or app?
Thread Tools
Grizzled Veteran
Join Date: Sep 2000
Location: The Basement
Status: Offline
Reply With Quote
Sep 19, 2003, 03:37 AM
 
Does anybody have an applescript that would create a new OS X user account? Or possible a realbasic plugin that you know of? How could I create a user account with the command line? I could use the RB command line plugin to have it do this with a GUI.

The reason is I monitor and maintain many of my clients machines. I'd like to create an installer package of some sort that they download from me and have it run to create a user account and some directories.

It's fine if they have to authenticate to have it create (obviously) they would know their own password.
     
Grizzled Veteran
Join Date: Sep 2000
Location: The Basement
Status: Offline
Reply With Quote
Sep 19, 2003, 03:39 AM
 
it would also be good if I could have it set me to the proper will group.
     
Grizzled Veteran
Join Date: Sep 2000
Location: The Basement
Status: Offline
Reply With Quote
Sep 20, 2003, 02:10 PM
 
Does anybody even know how to do this from the command line? "adduser" doesn't work in Mac OS X bash. Help!
     
Grizzled Veteran
Join Date: Sep 2000
Location: The Basement
Status: Offline
Reply With Quote
Sep 20, 2003, 06:21 PM
 
This creates the user bob with a low uid 006. It assumes that no other program on my clients computers will have 006 as there user ID. This prevents the user from showing up in the Mac OS X login window.

Code:
sudo niutil -create / /users/bob sudo niutil -createprop / /users/bob uid 006 sudo niutil -createprop / /users/bob realname "FTP User" sudo niutil -createprop / /users/bob home "/Users/ftpuser" sudo niutil -createprop / /users/bob shell "/bin/tcsh"
I'm not clear on these two commands however. Is this the user ID group? How could I add the person to the administrator group? It appears the test I created can only read files.

Code:
sudo niutil -createprop / /users/bob gid 20
What does this do with the password? Is it setting it?

Code:
sudo niutil -createprop / /users/bob passwd "*"
If the command above sets the password do I really need to do this?

Code:
sudo passwd test
     
Grizzled Veteran
Join Date: Sep 2000
Location: The Basement
Status: Offline
Reply With Quote
Sep 20, 2003, 10:20 PM
 
Originally posted by brainchild2b:
This creates the user bob with a low uid 006. It assumes that no other program on my clients computers will have 006 as there user ID. This prevents the user from showing up in the Mac OS X login window.

Code:
sudo niutil -create / /users/bob sudo niutil -createprop / /users/bob uid 006 sudo niutil -createprop / /users/bob realname "FTP User" sudo niutil -createprop / /users/bob home "/Users/ftpuser" sudo niutil -createprop / /users/bob shell "/bin/tcsh"
I'm not clear on these two commands however. Is this the user ID group? How could I add the person to the administrator group? It appears the test I created can only read files.

Code:
sudo niutil -createprop / /users/bob gid 20
What does this do with the password? Is it setting it?

Code:
sudo niutil -createprop / /users/bob passwd "*"
If the command above sets the password do I really need to do this?

Code:
sudo passwd test
Here's how to add them to the administrators group

Code:
sudo niutil -appendprop / /groups/admin users bob
     
Dedicated MacNNer
Join Date: Jan 2001
Location: Badfort
Status: Offline
Reply With Quote
Sep 21, 2003, 09:18 AM
 
Hey, if you go to the Appleinsider forums, there's a guy there who'll...wait a minute...
You see, my friends, pirates are the key. - thalo
     
   
Thread Tools
Forum Links
Forum 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 On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 08:32 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2