help on adduser

Marc Silver marcs at draenor.org
Wed Feb 11 09:10:12 UTC 2004


On Wed, Feb 11, 2004 at 12:48:13AM -0800, zzerver at hotmail.com wrote:
> i got a free shells server on freebsd, i offer free access to my
> server to enyone, the amount of request for new shells has been to
> heavy for me and i can keep up with adding new users automaticly, i
> write a shell (sh) script that takes care of everything for me, i
> create a new user 'newuser' ...i promote 'newuser' to 'wheel' ...then
> i try to assign 'free.sh' as default shell for 'newuser' so when some
> body logs as 'newuser' runs my script, then my script will create the
> new user on my system ...but unfurtunatly freeBSD do not letme assign
> my script as shell, what am doing wrong? ...if there is any way i can
> let some body or some how automaticly add users to my system....its
> any already made script, program? or ??? please help.

I stand to be corrected, but adding it to /etc/shells should do the
trick.  You should however be aware of the implications of exactly what
you're doing.  Your script is going to need root privileges in order to
add the new account, and as such if your script isn't _perfect_ as well
as completely secure, you'll most likely soon find yourself with a
compromsied machine.

In my opinion, it would be safer to simply add them yourself, or modify
the script for your own use to speed up the user creation process.

Cheers,
Marc



More information about the freebsd-doc mailing list