From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,b0fb8dccff7b5b40 X-Google-Attributes: gidfee84,public From: weaver@alpha.pr1.k12.co.us (Brian Weaver) Subject: Re: useradd -batch mode? Date: 1995/10/08 Message-ID: <457vpg$m0n@alpha.pr1.k12.co.us>#1/1 X-Deja-AN: 117208099 references: <45514n$t8u@lantana.singnet.com.sg> organization: Poudre R1 School District newsgroups: comp.unix.osf.osf1 I've written a program in perl that adds accounts from the command line. It takes care of everything including encrypting the password, and rebuilding the dbm files, although I prefer to rebuild the dbm database after I add all of the accounts, instead of after each one, so you may want to comment the last line out. Anyway, it works with enhanced security, and is very fast at adding account. All you have to type is mkuser username last first group password and the account is added. I actually call it from another program that I wrote to generate student accounts, so it works fine standalone, or called from any program you wish. If you'd like a copy, ftp to ftp.pr1.k12.co.us and get /pub/mkuser/mkuser.pl Please email me any comments/questions. -- Brian ------------------------------------------------------------------------ Brian Weaver weaver@pr1.k12.co.us System Administrator PoudreR1 School District My opinions are my own and not that of the Poudre R1 School District. Mathias Koerber (mathias@merlion.singnet.com.sg) wrote: : Hi, : I am looking into ways to automate account generation. On OSF/1 : this gets difficult for 2 main resaons: : a) the passwords are held in /tcb/auth/files : b) OSF uses dbm style passwd files for fast lookup. : There is an adduser script, but it is interactive and rebuilds : the dbm file every time, which can take quite some time with a huge : passwd file. : We could just add all users to /etc/passwd and then run mkuser, but : we will still have to change each user's passwd in the tcb. : Has anyone done a batch-style user generation program that makes these : easy and fast? : regards : -- : Mathias Koerber mathias@singnet.com.sg : SingNet NOC Mathias_Koerber@POBOX.ORG.SG : Singapore Telecoms : * Eifersucht ist eine Leidenschaft, die mit Eifer sucht was Leiden schafft *