Lite tips iallafall
pw useradd -n <login> -g <grupp> -s <shell> -m /home/<login>
-h fd
This option provides a special interface by which interac_
tive scripts can set an account password using pw. Because
the command line and environment are fundamentally insecure
mechanisms by which programs can accept information, pw
will only allow setting of account and group passwords via
a file descriptor (usually a pipe between an interactive
script and the program). sh, bash, ksh and perl all pos_
sess mechanisms by which this can be done. Alternatively,
pw will prompt for the user's password if -h 0 is given,
nominating stdin as the file descriptor on which to read
the password. Note that this password will be read only
once and is intended for use by a script rather than for
interactive use. If you wish to have new password confir_
mation along the lines of passwd(1), this must be imple_
mented as part of an interactive script that calls pw.If a value of \`-' is given as the argument fd, then the password will be set to \`\*', rendering the account inacces\_ sible via password-based login.
likväl:
-w method The -w option sets the default method used to set passwords
for newly created user accounts. method is one of:no disable login on newly created accounts yes force the password to be the account name none force a blank password random generate a random password The \`random' or \`no' methods are the most secure; in the former case, pw generates a password and prints it to std\_ out, which is suitable where you issue users with passwords to access their accounts rather than having the user nomi\_ nate their own (possibly poorly chosen) password. The \`no' method requires that the superuser use passwd(1) to render the account accessible with a password.
Lite problem med lösenordet då måste tyvärr skriva ett eget script extra där som du ser, men ifall du gör det får du gärna dela med dej ;) §jr
Och http://www.freebsd.org/cgi/man.cgi?query=pw&apropos=0&sektion=0&manpath=FreeBSD+4.7-RELEASE&format=html här har du MAN sidan för pw :e
