diff options
author | Karl Trygve Kalleberg <karltk@gentoo.org> | 2002-04-09 22:39:28 +0000 |
---|---|---|
committer | Karl Trygve Kalleberg <karltk@gentoo.org> | 2002-04-09 22:39:28 +0000 |
commit | 24068957758730d6cf9afcdd1b5454d96d38db94 (patch) | |
tree | 9ed918e58f45881e8fb003cdd24d67496ce23b2e /app-admin/superadduser | |
parent | Fixed #1577 (diff) | |
download | historical-24068957758730d6cf9afcdd1b5454d96d38db94.tar.gz historical-24068957758730d6cf9afcdd1b5454d96d38db94.tar.bz2 historical-24068957758730d6cf9afcdd1b5454d96d38db94.zip |
Superadduser 1.0, fixed #1383, #1235
Diffstat (limited to 'app-admin/superadduser')
-rw-r--r-- | app-admin/superadduser/ChangeLog | 9 | ||||
-rw-r--r-- | app-admin/superadduser/files/superadduser | 108 | ||||
-rw-r--r-- | app-admin/superadduser/files/superadduser.8 | 21 | ||||
-rw-r--r-- | app-admin/superadduser/superadduser-1.0.ebuild | 16 |
4 files changed, 154 insertions, 0 deletions
diff --git a/app-admin/superadduser/ChangeLog b/app-admin/superadduser/ChangeLog new file mode 100644 index 000000000000..efb3bd164470 --- /dev/null +++ b/app-admin/superadduser/ChangeLog @@ -0,0 +1,9 @@ +# ChangeLog for app-admin/superadduser +# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL +# $Header: /var/cvsroot/gentoo-x86/app-admin/superadduser/ChangeLog,v 1.1 2002/04/09 22:39:28 karltk Exp $ + +*superadduser-1.0 (09 Apr 2002) + + 09 Apr 2002; Karl Trygve Kalleberg <karltk@gentoo.org> superadduser-1.0.ebuild files/digest-superadduser-1.0 files/superadduser files/superadduser.8: + + An interactive wrapper for shadow's useradd. diff --git a/app-admin/superadduser/files/superadduser b/app-admin/superadduser/files/superadduser new file mode 100644 index 000000000000..d6136ffa0d67 --- /dev/null +++ b/app-admin/superadduser/files/superadduser @@ -0,0 +1,108 @@ +#!/bin/sh +# adduser script for use with shadow passwords and useradd command. +# by Hrvoje Dogan <hdogan@student.math.hr>, Dec 1995. +# Modified by Patrick Volkerding, Oct 1997, Mar 1999, May 2000. + +echo +echo -n "Login name for new user []: " +read LOGIN +if [ -z "$LOGIN" ]; then + echo "Come on, man, you can't leave the login field empty..." + exit +fi +echo +echo -n "User id for $LOGIN [ defaults to next available]: " +read ID +GUID="-u $ID" +if [ -z "$ID" ]; then + GUID="" +fi + +echo +echo -n "Initial group for $LOGIN [users]: " +read GID +if [ -z "$GID" ]; then + GID="users" +fi +GGID="-g $GID" +echo +echo "Additional groups for $LOGIN (seperated" +echo -n "with commas, no spaces) []: " +read AGID +GAGID="-G $AGID" +if [ -z "$AGID" ]; then + GAGID="" +fi + +echo +echo -n "$LOGIN's home directory [/home/$LOGIN]: " +read HME +if [ -z "$HME" ]; then + HME="/home/$LOGIN" +fi +GHME="-d $HME" + +echo +echo -n "$LOGIN's shell [/bin/bash]: " +read SHL +GSHL="-s $SHL" +if [ -z "$SHL" ]; then + GSHL="-s /bin/bash" + SHL="/bin/bash" +fi +echo +echo -n "$LOGIN's account expiry date (YYYY-MM-DD) []: " +read EXP +GEXP="-e $EXP" +if [ -z "$EXP" ]; then + GEXP="" +fi +echo +echo "OK, I'm about to make a new account. Here's what you entered so far:" +echo +echo New login name: $LOGIN +if [ -z "$GUID" ]; then + echo New UID: [Next available] +else + echo New UID: $UID +fi +if [ -z "$GGID" ]; then + echo Initial group: users +else + echo Initial group: $GID +fi +if [ -z "$GAGID" ]; then + echo Additional groups: [none] +else + echo Additional groups: $AGID +fi +if [ -z "$GHME" ]; then + echo Home directory: /home/$LOGIN +else + echo Home directory: $HME +fi +if [ -z "$GSHL" ]; then + echo Shell: /bin/bash +else + echo Shell: $SHL +fi +if [ -z "$GEXP" ]; then + echo Expiry date: [no expiration] +else + echo Expiry date: $EXP +fi +echo +echo "This is it... if you want to bail out, hit Control-C. Otherwise, press" +echo "ENTER to go ahead and make the account." +read FOO +echo +echo Making new account... +/usr/sbin/useradd $GHME -m $GEXP $GGID $GAGID $GSHL $GUID $LOGIN +if [ -d $HME ]; then + chmod 711 $HME +fi +echo +/usr/bin/chfn $LOGIN +echo +/usr/bin/passwd $LOGIN +echo "Done..." diff --git a/app-admin/superadduser/files/superadduser.8 b/app-admin/superadduser/files/superadduser.8 new file mode 100644 index 000000000000..c6ced2f1a974 --- /dev/null +++ b/app-admin/superadduser/files/superadduser.8 @@ -0,0 +1,21 @@ +.TH superadduser "8" "April 2002" "superadduser 1.0" +.SH NAME +superadduser \- manual page for the superadduser program, an interactive +version of adduser. +.SH SYNOPSIS +.B superadduser +.SH DESCRIPTION +Superadduser interactively asks the user to fill in the necessary parameters to +the +.I shadow +package's useradd program. +.PP +.SH AUTHOR +Man page by Karl Trygve Kalleberg <karltk@gentoo.org> +.br +Script by Hrvoje Dogan <hdogan@student.math.hr> +.SH "SEE ALSO" +useradd(8) +.TP +The \fI/usr/sbin/superadduser\fR script. +.TP diff --git a/app-admin/superadduser/superadduser-1.0.ebuild b/app-admin/superadduser/superadduser-1.0.ebuild new file mode 100644 index 000000000000..55c357a4f3f7 --- /dev/null +++ b/app-admin/superadduser/superadduser-1.0.ebuild @@ -0,0 +1,16 @@ +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Maintainer: Karl Trygve Kalleberg <karltk@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/app-admin/superadduser/superadduser-1.0.ebuild,v 1.1 2002/04/09 22:39:28 karltk Exp $ + +S=${WORKDIR}/${P} +DESCRIPTION="Interactive adduser script" +SRC_URI="" +HOMEPAGE="" + +RDEPEND=">=sys-apps/shadow-20001016-r6" + +src_install () { + dosbin files/superadduser + doman files/superadduser.1 +} |