Reputation: 175
I'm trying to write a script to add user to FreeBSD. The problem of adduser command in FreeBSD is that it gets information from me, step by step. Like, after i run adduser, it asks for username; after i enter username, it asks for full name, and so on. So now my script needs to give the input, step by step.
Upvotes: 1
Views: 1701
Reputation: 25966
Have you tried useradd
[1]? It works also on FreeBSD using pw
. And if pw
is not accessible from the script directly, you can use full path as /usr/sbin/pw
which should work everywhere
Upvotes: 2