Re: adduser without ncurses?
phn_at_icke-reklam.ipsec.nu
Date: 06/20/04
- Next message: Greg Menke: "Re: cpio"
- Previous message: Theorem: "Re: adduser without ncurses?"
- In reply to: Erica: "Re: adduser without ncurses?"
- Next in thread: Richard T. Kus: "Re: adduser without ncurses?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 20 Jun 2004 16:32:02 +0000 (UTC)
In comp.unix.misc Erica <erica@technodyke.com> wrote:
> phn@icke-reklam.ipsec.nu wrote in message news:<cb0s9u$1qdj$3@nyheter.ipsec.se>...
>> In comp.unix.misc Erica <erica@technodyke.com> wrote:
>> > (I may have accidently posted this twice, if so, I apologize)
>>
>> > Hi,
>>
>> > I wrote a script to add a whole bunch of users to a FreeBSD box using input from
>> > a file. However, I need something that works like adduser or useradd
>> > without ncurses, that is, without prompting for input. Something that
>> > allows me to just place all the arguments on a single line so that I can
>> > run it in an awk loop. If anyone knows of such a thing, I would be ever
>> > grateful for your assistance.
>>
>> > --Erica
>>
>> Have you tried 'adduser' ?
>> ADDUSER(8) FreeBSD System Manager's Manual ADDUSER(8)
>>
>> NAME
>> adduser - command for adding new users
>>
>> SYNOPSIS
>> adduser [-check_only] [-class login_class] [-config_create]
>> [-dotdir dotdir] [-group login_group] [-h | -help] [-home home]
>> [-message message_file] [-noconfig] [-shell shell]
>> [-s | -silent | -q | -quiet] [-uid uid_start] [-v | -verbose]
>>
>> DESCRIPTION
>> Adduser is a simple program for adding new users. Adduser checks the
>> passwd, group and shell databases. It creates passwd/group entries, HOME
>> directory, dotfiles and sends the new user a welcome message.
>>
>>
>>
>> adduser is implemented as a perl script, so any changes you feel for
>> are easily done.
> The problem is that adduser prompts for input, and I need to put all
> the arguments on one line so that I can run it in an awk loop. But
> thanks!
As i said, adduser is a perl script, the portion that prompts for
a password is in "new_users_password" ( a part of the script)
so you get every opportunity to adjust "adduser" to your input format.
--
Peter Håkanson
IPSec Sverige ( At Gothenburg Riverside )
Sorry about my e-mail address, but i'm trying to keep spam out,
remove "icke-reklam" if you feel for mailing me. Thanx.
- Next message: Greg Menke: "Re: cpio"
- Previous message: Theorem: "Re: adduser without ncurses?"
- In reply to: Erica: "Re: adduser without ncurses?"
- Next in thread: Richard T. Kus: "Re: adduser without ncurses?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|