 |
 |
Create new user account with Applescript or app?
|
 |
|
 |
|
Grizzled Veteran
Join Date: Sep 2000
Location: The Basement
Status:
Offline
|
|
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
|
|
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
|
|
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
|
|
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?
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Sep 2000
Location: The Basement
Status:
Offline
|
|
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?
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
|
|
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
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |