adding new user through shell terminal help

jeffc

Registered
hello all,

i am logged into my x box through ssh and am having problems adding new users to the system through the terminal.

I may be wrong but in linux I use addusr to make a new user. but since this is bsd and I am not all too familar with the differences, I am hoping somone can give me the command line to type for addusr...

thanks in advance!

ps: also how would i then set the password..is it different as well?

thanks

jeffc
 
password should be the same: 'passwd someuser'

adding users is quite different - there is no useradd, you have to use niutil.

there is a good darwin faq that gives all the commands:
http://darwinfo.org/faq.shtml

here is a clip from that page:
"
How do I make a user under Darwin?
Creating a user under Darwin involves creating the user in the netinfo database.
This creates an entry in the database for the user:
niutil -create / /users/bbraun
This sets the shell for the user:
niutil -createprop / /users/bbraun shell /bin/tcsh
This sets the "Real Name" of the user:
niutil -createprop / /users/bbraun realname "Rob Braun"
This sets the uid of the user:
niutil -createprop / /users/bbraun uid 1000
This sets the gid of the user:
niutil -createprop / /users/bbraun gid 1000
This sets the home directory of the user:
niutil -createprop / /users/bbraun home /Local/Users/bbraun
This creates an entry in the directory for the password, but doesn't set it:
niutil -createprop / /users/bbraun _shadow_passwd
And finally, you have to set the user's password:
passwd bbraun
"


[Edited by hotani on 09-28-2000 at 03:38 PM]
 
Back
Top