.TH ADDUSR 1 "29 Nov 2007" "Project Athena" \" RCSID: $HeadURL: svn+ssh://svn.mit.edu/moira/trunk/moira/man/addusr.1 $ $Id: addusr.1 3956 2010-01-05 20:56:56Z zacheiss $ .SH NAME addusr \- add and/or register users in Moira .SH SYNOPSIS .B addusr [options] .SH DESCRIPTION .I Addusr is a tool for adding users in bulk to the moira database and registering them for accounts. It reads the users from a file (or stdin) rather than the menu-oriented regular moira client. The users are entered in one of two formats, depending on whether or not they will be registered. When users are only being added to the database, the format is: .nf lastname, firstname middlename idnumber .fi The lastname may have spaces in it, as it will continue up until the first comma on the line. The firstname also may have spaces, as it will take up everything but the last two tokens on the line. If only 3 tokens are on the line, the middlename will be assumed to be the empty string. The middlename cannot have spaces in it. The idnumber also cannot have spaces, although it may have hyphens in it. The capitalization of the names is not important as it will be corrected before entering into the database, unless the \fB-n\fR flag has been specified. If the operation specified for .B addusr includes registering users, then there is one additional token on the end of the line: .nf lastname, firstname middlename idnumber loginname .fi .SH OPTIONS .IP \fB-file\ \fIfilename\ \fRor\ \fB-f\ \fIfilename\fR: This specifies the file that will be read for the list of users to operate on. If not specifed, standard input will be used. The file format is described above. .IP \fB-class\ \fIclass\ \fRor\ \fB-c\ \fIclass\fR: This specifies the account class that will be used for all users added in this invocation. If not specified, \fITEMP\fR will be used. .IP \fB-comment\ \fI"comment"\ \fRor\ \fB-C\ \fI"comment"\fR: This specifies the comment that will be stored for all users added in this invocation. If not specified, the comment field will be left blank. Note that the double-quotes are not required by \fBaddusr\fR, but will be parsed out by the shell and are only needed to specify comments with spaces in them. .IP \fB-status\ \fIstatus\ \fRor\ \fB-s\ \fIstatus\fR: This specifies the account status that will be used for all users added in this invocation. If not specified, \fI0 (registerable)\fR will be used. .IP \fB-shell\ \fIshell\ \fRor\ \fB-h\ \fIshell\fR: This specifies the login shell that will be stored for all users added in this invocation. If not specified, a default will be used. At MIT Athena the default is \fI/bin/athena/bash\fR, elsewhere it is likely to be \fI/bin/bash\fR. .IP \fB-winshell\ \fIshell\ \fRor\ \fB-w\ \fIshell\fR: This specifies the Windows console shell that will be used for all users added in this invocation. If not specified, a default value of \fIcmd\fR will be used. .IP \fB-sponsor\ \fIsponsor\ \fRor\ \fB-sp\ \fIsponsor\fR: This specifies the USER, LIST, or KERBEROS that will be listed as the sponsor for all users added in this invocation. This is intended for use with accounts in the GUEST and VOUCH classes. .IP \fB-expiration\ \fIdate\ \fRor\ \fB-e\ \fIdate\fR: This specified the expiration date that will be recorded for all users added in this invocation. This is intended for use with accounts in the GUEST or VOUCH classes. .IP \fB-register\ \fRor\ \fB-R\fR: This instructs \fBaddusr\fR to both add the users to the database and then to immediately register them. The users will be left "half-registered", meaning that they have everything but a Kerberos principal. .IP \fB-reg_only\ \fRor\ \fB-r\fR: This instructs \fBaddusr\fR to (half-) register the users without attempting to add them to the database. They must already exist in the database. .IP \fB-verbose\ \fRor\ \fB-v\fR: This causes \fBaddusr\fR to print messages about each operation as it performs it. .IP \fB-nodupcheck\ \fRor\ \fB-d\fR: Do not attempt to check the database for duplicates before adding users. Normally \fBaddusr\fR will check the database for users with the same name. If it finds any who match in both name and ID number, the user will not be added. If it finds a name match with a different ID number, it will print a warning and add the user anyway. .IP \fB-nocaps\ \fRor\ \fB-n\fR: Do not attempt to normalize the capitalization of first, middle, and last names before adding users. Normally, \fBaddusr\fR will update the capitalization of names based on a set of heuristics. This flag can be used to suppress this behavior if it is inappropriate for certain names. .IP \fB-database\ \fIhost:port\ \fRor\ \fB-db\ \fIhost:port\fR: Use the specified host and port to contact the Moira server instead of the default server. Both may be symbolic names or numbers. If the port is left off, the default Moira server port will be assumed. The server chosen will be the one specified on the command line, specified in the MOIRASERVER environment variable, the hesiod "moira" sloc entry, or the compiled in default, in that order or preference. .IP \fB-secure\ \fRor\ \fB-6\fR: This specifies that users added in this invocation will need a secure "Account Coupon" containing additional verification information beyond name and ID number to be allowed to register. .SH AUTHOR Mark Rosenstein .SH SEE ALSO moira(1), userreg(1)