diff options
author | Seemant Kulleen <seemant@gentoo.org> | 2004-06-01 21:11:12 +0000 |
---|---|---|
committer | Seemant Kulleen <seemant@gentoo.org> | 2004-06-01 21:11:12 +0000 |
commit | b3229b58816b1b4bffd9fd72d74034ee0f32b36e (patch) | |
tree | 1bbe13775e1dfc0e13b9e7e28f959b856f8bbe96 /app-admin | |
parent | stable on amd64 (Manifest recommit) (diff) | |
download | gentoo-2-b3229b58816b1b4bffd9fd72d74034ee0f32b36e.tar.gz gentoo-2-b3229b58816b1b4bffd9fd72d74034ee0f32b36e.tar.bz2 gentoo-2-b3229b58816b1b4bffd9fd72d74034ee0f32b36e.zip |
version bump to latest available version. Also, removed 1.0.5
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/superadduser/ChangeLog | 10 | ||||
-rw-r--r-- | app-admin/superadduser/Manifest | 12 | ||||
-rw-r--r-- | app-admin/superadduser/files/1.0.8/superadduser (renamed from app-admin/superadduser/files/1.0.5/superadduser) | 80 | ||||
-rw-r--r-- | app-admin/superadduser/files/1.0.8/superadduser.8 (renamed from app-admin/superadduser/files/1.0.5/superadduser.8) | 1 | ||||
-rw-r--r-- | app-admin/superadduser/files/digest-superadduser-1.0.8 (renamed from app-admin/superadduser/files/digest-superadduser-1.0.5) | 0 | ||||
-rw-r--r-- | app-admin/superadduser/superadduser-1.0.8.ebuild (renamed from app-admin/superadduser/superadduser-1.0.5.ebuild) | 8 |
6 files changed, 75 insertions, 36 deletions
diff --git a/app-admin/superadduser/ChangeLog b/app-admin/superadduser/ChangeLog index 0940f3eb5072..7f759b6d7be9 100644 --- a/app-admin/superadduser/ChangeLog +++ b/app-admin/superadduser/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for app-admin/superadduser # Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/superadduser/ChangeLog,v 1.23 2004/05/22 22:27:42 gustavoz Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/superadduser/ChangeLog,v 1.24 2004/06/01 21:11:12 seemant Exp $ + +*superadduser-1.0.8 (01 Jun 2004) + + 01 Jun 2004; Seemant Kulleen <seemant@gentoo.org> -files/1.0.5/superadduser, + -files/1.0.5/superadduser.8, +files/1.0.8/superadduser, + +files/1.0.8/superadduser.8, -superadduser-1.0.5.ebuild, + +superadduser-1.0.8.ebuild: + version bump to latest available version. Also, removed 1.0.5 22 May 2004; Gustavo Zacarias <gustavoz@gentoo.org> superadduser-1.0.7.ebuild: diff --git a/app-admin/superadduser/Manifest b/app-admin/superadduser/Manifest index 6c2161ee9077..b99f5157ca72 100644 --- a/app-admin/superadduser/Manifest +++ b/app-admin/superadduser/Manifest @@ -1,10 +1,10 @@ -MD5 945da9f520c36154705f15b1ddcf5540 ChangeLog 2978 -MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164 -MD5 8981994e6666f95c56aea373fd7e5007 superadduser-1.0.5.ebuild 515 +MD5 d8e874cf2fac96b9a4693f6e2366db5e superadduser-1.0.8.ebuild 582 MD5 d762cb4b5427c87c16d861c1e4e9d786 superadduser-1.0.7.ebuild 540 -MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-superadduser-1.0.5 0 +MD5 0e333040faea806797af39e785f61b68 ChangeLog 3305 +MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164 MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-superadduser-1.0.7 0 -MD5 a2ce27f4b1af8dd990226aa524469466 files/1.0.5/superadduser 10912 -MD5 0d866baf36d353055132e9ea49920b02 files/1.0.5/superadduser.8 522 +MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-superadduser-1.0.8 0 MD5 602e98c0b5014d28a71d33c9ed2744ed files/1.0.7/superadduser 12302 MD5 2fb629d8e8eb75d7640613f05b4a5240 files/1.0.7/superadduser.8 518 +MD5 c95c8479110dd8c7ae720ada7f6b76c0 files/1.0.8/superadduser 12594 +MD5 2fb629d8e8eb75d7640613f05b4a5240 files/1.0.8/superadduser.8 518 diff --git a/app-admin/superadduser/files/1.0.5/superadduser b/app-admin/superadduser/files/1.0.8/superadduser index f650391b997b..802e727b5b81 100644 --- a/app-admin/superadduser/files/1.0.5/superadduser +++ b/app-admin/superadduser/files/1.0.8/superadduser @@ -1,19 +1,37 @@ -#!/bin/sh +#!/bin/bash ########################################################################## # Program: /usr/sbin/adduser # Purpose: Interactive front end to /usr/sbin/useradd for Slackware Linux -# Author: Stuart Winter <stuart@polplex.co.uk> -# based on the original Slackware adduser by Hrvoje Dogan +# Author : Stuart Winter <stuart@polplex.co.uk> +# Based on the original Slackware adduser by Hrvoje Dogan # with modifications by Patrick Volkerding -# Version: 1.05 +# Version: 1.08 +########################################################################## +# Usage..: adduser [<new_user_name>] ########################################################################## # History # ########### +# v1.08 - 25/04/04 +# * Disallow user names that begin with a numeric because useradd +# (from shadow v4.03) does not allow them. <sw> +# v1.07 - 07/03/03 +# * When supplying a null string for the uid (meaning 'Choose next available'), +# if there were file names in the range 'a-z' in the pwd then the +# egrep command considered these files rather than the null string. +# The egrep expression is now in quotes. +# Reported & fixed by Vadim O. Ustiansky <sw> +# v1.06 - 31/03/03 +# * Ask to chown user.group the home directory if it already exists. +# This helps reduce later confusion when adding users whose home dir +# already exists (mounted partition for example) and is owned +# by a user other than the user to which the directory is being +# assigned as home. Default is not to chown. +# Brought to my attention by mRgOBLIN. <sw> # v1.05 - 04/01/03 # * Advise & prevent users from creating logins with '.' characters -# in the user name. -# * Made pending account creation info look neater +# in the user name. <sw> +# * Made pending account creation info look neater <sw> # v1.04 - 09/06/02 # * Catered for shadow-4.0.3's 'useradd' binary that no longer # will let you create a user that has any uppercase chars in it @@ -32,8 +50,6 @@ # v1.00 - 22/03/02 # * Created ####################################################################### -# Syntax: adduser [<new_user_name>] -####################################################################### # Path to files pfile=/etc/passwd @@ -50,24 +66,25 @@ chmod=/bin/chmod defhome=/home defshell=/bin/bash defchmod=711 # home dir permissions - may be preferable to use 701, however. +defgroup=users # Determine what the minimum UID is (for UID recycling) # (we ignore it if it's not at the beginning of the line (i.e. commented out with #)) -export recycleUIDMIN="$(grep ^UID_MIN /etc/login.defs | awk {'print $2'} 2>/dev/null)" +export recycleUIDMIN="$(grep ^UID_MIN /etc/login.defs | awk '{print $2}' 2>/dev/null)" # If we couldn't find it, set it to the default of 1000 if [ -z "$recycleUIDMIN" ]; then - export recycleUIDMIN=1000 # this is the default from /etc/login.defs + export recycleUIDMIN=1000 # this is the default from Slackware's /etc/login.defs fi # This setting enables the 'recycling' of older unused UIDs. # When you userdel a user, it removes it from passwd and shadow but it will -# never get used again unless you specify it expliticly -- useradd just -# (appears to) looks at the last line in passwd and increments the uid -# I like the idea of recycling uids but you may have very good reasons not to -# (old forgotten confidential files still on the system could then be owned by -# this new user). We'll set this to no because this is what the original -# adduser shell script did and it's what users expect. +# never get used again unless you specify it expliticly -- useradd (appears to) just +# look at the last line in passwd and increment the uid. I like the idea of +# recycling uids but you may have very good reasons not to (old forgotten +# confidential files still on the system could then be owned by this new user). +# We'll set this to no because this is what the original adduser shell script +# did and it's what users expect. recycleuids=no # Function to read keyboard input. @@ -76,7 +93,7 @@ recycleuids=no function get_input() { local output if [ "`echo $BASH_VERSION | cut -b1`" = "1" ]; then - echo -n "${1} " >&2 ; # fudge for use with bash v1 + echo -n "${1} " >&2 # fudge for use with bash v1 read output else # this should work with any other /bin/sh read -ep "${1} " output @@ -136,6 +153,9 @@ while [ ! -z $needinput ]; do if [ $? -eq 0 ]; then echo "- User '$LOGIN' already exists; please choose another" unset LOGIN + elif [ ! -z "$( echo $LOGIN | grep "^[0-9]" )" ]; then + echo "- User names cannot begin with a number; please choose another" + unset LOGIN elif [ ! "$LOGIN" = "`echo $LOGIN | tr A-Z a-z`" ]; then # useradd does not allow uppercase echo "- User '$LOGIN' contains illegal characters (uppercase); please choose another" unset LOGIN @@ -165,7 +185,7 @@ while [ ! -z "$needinput" ]; do grep -v "^$" $pfile | awk -F: '{print $3}' | grep "^${_UID}$" >/dev/null 2>&1 if [ $? -eq 0 ]; then echo "- That UID is already in use; please choose another" - elif [ ! -z "$(echo $_UID | egrep [A-Za-z])" ]; then + elif [ ! -z "$(echo $_UID | egrep '[A-Za-z]')" ]; then echo "- UIDs are numerics only" else unset needinput @@ -187,7 +207,7 @@ fi echo needinput=yes while [ ! -z "$needinput" ]; do - GID="$(get_input "Initial group [ users ]:")" + GID="$(get_input "Initial group [ ${defgroup} ]:")" check_group "$GID" if [ $? -gt 0 ]; then echo "- Please choose another" @@ -197,7 +217,7 @@ while [ ! -z "$needinput" ]; do done # Syntax the variable ready for useradd if [ -z "$GID" ]; then - GID="-g users" + GID="-g ${defgroup}" else GID="-g ${GID}" fi @@ -208,7 +228,7 @@ echo needinput=yes while [ ! -z "$needinput" ]; do AGID="$(get_input "Additional groups (comma separated) []:")" - AGID="$(echo "$AGID" | tr -d ' ' | tr , ' ')" ; # fix up for parsing + AGID="$(echo "$AGID" | tr -d ' ' | tr , ' ')" # fix up for parsing if [ ! -z "$AGID" ]; then check_group "$AGID" # check all groups at once (treated as N # of params) if [ $? -gt 0 ]; then @@ -234,9 +254,14 @@ while [ ! -z "$needinput" ]; do # Warn the user if the home dir already exists if [ -d "$HME" ]; then echo "- Warning: '$HME' already exists !" - getyn="$(get_input " Do you wish to change the home directory path? (Y/n) ")" + getyn="$(get_input " Do you wish to change the home directory path ? (Y/n) ")" if [ "$(echo $getyn | grep -i "n")" ]; then unset needinput + # You're most likely going to only do this if you have the dir *mounted* for this user's $HOME + getyn="$(get_input " Do you want to chown $LOGIN.$( echo $GID | awk '{print $2}') $HME ? (y/N) ")" + if [ "$(echo $getyn | grep -i "y")" ]; then + CHOWNHOMEDIR=$HME # set this to the home directory + fi fi else unset needinput @@ -263,7 +288,7 @@ while [ ! -z "$needinput" ]; do got_error=yes fi if [ ! -z "$got_error" ]; then - getyn="$(get_input " Do you wish to change the shell? (Y/n) ")" + getyn="$(get_input " Do you wish to change the shell ? (Y/n) ")" if [ "$(echo $getyn | grep -i "n")" ]; then unset needinput fi @@ -323,7 +348,13 @@ if [ $? -gt 0 ]; then echo "(cmd: $CMD)" exit 1 fi - + +# chown the home dir ? We can only do this once the useradd has +# completed otherwise the user name doesn't exist. +if [ ! -z "${CHOWNHOMEDIR}" ]; then + chown "$LOGIN"."$( echo $GID | awk '{print $2}')" "${CHOWNHOMEDIR}" +fi + # Set the finger information $chfn "$LOGIN" if [ $? -gt 0 ]; then @@ -348,3 +379,4 @@ echo echo echo "Account setup complete." exit 0 + diff --git a/app-admin/superadduser/files/1.0.5/superadduser.8 b/app-admin/superadduser/files/1.0.8/superadduser.8 index c6ced2f1a974..f83cb22b04fc 100644 --- a/app-admin/superadduser/files/1.0.5/superadduser.8 +++ b/app-admin/superadduser/files/1.0.8/superadduser.8 @@ -18,4 +18,3 @@ Script by Hrvoje Dogan <hdogan@student.math.hr> useradd(8) .TP The \fI/usr/sbin/superadduser\fR script. -.TP diff --git a/app-admin/superadduser/files/digest-superadduser-1.0.5 b/app-admin/superadduser/files/digest-superadduser-1.0.8 index e69de29bb2d1..e69de29bb2d1 100644 --- a/app-admin/superadduser/files/digest-superadduser-1.0.5 +++ b/app-admin/superadduser/files/digest-superadduser-1.0.8 diff --git a/app-admin/superadduser/superadduser-1.0.5.ebuild b/app-admin/superadduser/superadduser-1.0.8.ebuild index ab9e6cbfc270..b4cf06f224b2 100644 --- a/app-admin/superadduser/superadduser-1.0.5.ebuild +++ b/app-admin/superadduser/superadduser-1.0.8.ebuild @@ -1,14 +1,14 @@ # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/superadduser/superadduser-1.0.5.ebuild,v 1.8 2004/05/04 13:45:49 kloeri Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/superadduser/superadduser-1.0.8.ebuild,v 1.1 2004/06/01 21:11:12 seemant Exp $ -DESCRIPTION="Interactive adduser script" +DESCRIPTION="Interactive adduser script from Slackware" SRC_URI="" -HOMEPAGE="http://www.gentoo.org/" +HOMEPAGE="http://www.interlude.org.uk/unix/slackware/" SLOT="0" LICENSE="GPL-2" -KEYWORDS="x86 ppc sparc ~alpha amd64" +KEYWORDS="~x86 ~ppc ~sparc ~alpha ~hppa ~mips ~amd64 ~ia64 ~ppc64" RDEPEND="sys-apps/shadow" |