From owner-svn-src-user@freebsd.org Sat May 28 18:47:26 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAA0FB4ED06 for ; Sat, 28 May 2016 18:47:26 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C27401BF5; Sat, 28 May 2016 18:47:26 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4SIlPrT042325; Sat, 28 May 2016 18:47:25 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4SIlPoK042324; Sat, 28 May 2016 18:47:25 GMT (envelope-from des@FreeBSD.org) Message-Id: <201605281847.u4SIlPoK042324@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Sat, 28 May 2016 18:47:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r300909 - user/des/fbce/script X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2016 18:47:27 -0000 Author: des Date: Sat May 28 18:47:25 2016 New Revision: 300909 URL: https://svnweb.freebsd.org/changeset/base/300909 Log: Add POD. Modified: user/des/fbce/script/fbce_user.pl Modified: user/des/fbce/script/fbce_user.pl ============================================================================== --- user/des/fbce/script/fbce_user.pl Sat May 28 18:44:52 2016 (r300908) +++ user/des/fbce/script/fbce_user.pl Sat May 28 18:47:25 2016 (r300909) @@ -6,3 +6,126 @@ Catalyst::ScriptRunner->run('FBCE', 'Use 1; # $FreeBSD$ + +=encoding utf8 + +=head1 NAME + +fbce_user.pl - Manage FBCE Users + +=head1 SYNOPSIS + +fbce_user.pl [options] command [arguments] + + Options: + --debug print additional information while working + --dryrun don't actually do anything + --pwfile name of password file for pwgen command + --pwtarball name of password tarball for pwgen command + --help show this message and exit + + Commands: + + list list existing users + import import new users + gecos set real name for listed user(s) + pwgen generate passwords + smash clear active and incumbent bit for all users + activate set active bit for listed user(s) + deactivate clear active bit for listed user(s) + incumbent set incumbent bit for listed user(s) + +=head1 DESCRIPTION + +The B script is used to manage users in the FBCE system. +The following commands are available: + +=over + +=item B + +List all users. Prints one line per user with their login, active +status, admin status and name as recorded in the database. + +=item B [I ...] + +Import users. If the input includes the users' names, those will be +imported too; otherwise, their names will be set equal to their login +names. + +=item B [I ...] + +Set the specified users' names to those indicated in the input. Note +that if the input includes lines where no name is specified, those +users' names will be reset to their login. + +=item B + +Generate passwords for users that don't already have one. This +command will also generate a tarball containing individual files for +each user, containing that user's password, in a subdirectory bearing +the user's name. Each file's owner and group will be set equal to the +corresponding user's login. + +=item B + +Clear all users' active and incumbent bits. + +=item B [I ...] + +Mark the specified users as active, allowing them to run and vote in +the election. + +=item B [I ...] + +Mark the specified users as inactive, preventing them from running or +voting in the election. + +=item B [I ...] + +Mark the specified users as incumbents so they are listed as such in +the list of candidates presented to voters. + +=back + +=head2 Input Format + +All commands that operate on a list of users, rather than on the +entire user base, expect that list to be provided either on stdin or +in files listed on the command line. Each line in the input must be +in one of the following formats: + +=over + +=item * + +login only (any leading or trailing whitespace is ignored) + +=item * + +login and real name separated by whitespace (any leading or trailing +whitespace is ignored) + +=item * + +Unix v7 (seven-field) passwd format + +=item * + +BSD (ten-field) passwd format + +=back + +Any input which B doesn't understand will simply be +ignored. + +=head1 AUTHORS + +Dag-Erling Smørgrav + +=head1 COPYRIGHT + +This library is free software. You can redistribute it and/or modify +it under the same terms as Perl itself. + +=cut