2 # Copyright (c) 2000,2004 Matthias S. Benkmann <article AT winterdrache DOT de>
3 # You may do everything with this code except misrepresent its origin.
4 # PROVIDED `AS IS' WITH ABSOLUTELY NO WARRANTY OF ANY KIND!
8 echo 1>&2 'USAGE: install_package <description> <name> <group>'
10 echo 1>&2 'Creates a new package user called <name> with primary group <group>'
11 echo 1>&2 'and description <description>.'
12 echo 1>&2 'If the user account has been created successfully, `su <name>'"'"' will be'
13 echo 1>&2 'executed so that you can start working with the new account right away.'
15 echo 1>&2 '<description> needs to be a valid string for the /etc/passwd description'
16 echo 1>&2 ' field. This means, among other things, that it must not contain ":".'
17 echo 1>&2 ' Don'"'"'t forget to properly quote <description> if it contains spaces or'
18 echo 1>&2 ' other characters interpreted by the shell!'
20 echo 1>&2 'This script leaves the actual creation of the new account to the'
21 echo 1>&2 'add_package_user script. Check out its documentation for details.'
26 if [ $UID -ne 0 ]; then
27 echo Please run this script as root.
31 add_package_user "${1}" $2 10000 20000 $3 10000 20000 || exit 1