3 # SPDX-License-Identifier: BSD-2-Clause
5 # Copyright (c) 2002-2004 Michael Telahun Makonnen. All rights reserved.
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted provided that the following conditions
10 # 1. Redistributions of source code must retain the above copyright
11 # notice, this list of conditions and the following disclaimer.
12 # 2. Redistributions in binary form must reproduce the above copyright
13 # notice, this list of conditions and the following disclaimer in the
14 # documentation and/or other materials provided with the distribution.
16 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 # Email: Mike Makonnen <mtm@FreeBSD.Org>
32 # Display $msg on stderr, unless we're being quiet.
35 if [ -z "$quietflag" ]; then
36 echo 1>&2 ${THISCMD}: ERROR: $*
41 # Display $msg on stdout, unless we're being quiet.
44 if [ -z "$quietflag" ]; then
45 echo ${THISCMD}: INFO: $*
50 # Output the value of $_uid if it is available for use. If it
51 # is not, output the value of the next higher uid that is available.
52 # If a uid is not specified, output the first available uid, as indicated
59 if [ -z "$_uid" ]; then
60 _nextuid="`${PWCMD} usernext | cut -f1 -d:`"
63 ${PWCMD} usershow $_uid > /dev/null 2>&1
64 if [ ! "$?" -eq 0 ]; then
75 # Display usage information for this utility.
78 echo "usage: ${THISCMD} [options]"
79 echo " options may include:"
80 echo " -C save to the configuration file only"
81 echo " -D do not attempt to create the home directory"
82 echo " -E disable this account after creation"
83 echo " -G additional groups to add accounts to"
84 echo " -L login class of the user"
85 echo " -M file permission for home directory"
86 echo " -N do not read configuration file"
87 echo " -Z do not attempt to create ZFS home dataset"
88 echo " -S a nonexistent shell is not an error"
89 echo " -d home directory"
90 echo " -f file from which input will be received"
91 echo " -g default login group"
92 echo " -h display this usage message"
93 echo " -k path to skeleton home directory"
94 echo " -m user welcome message file"
95 echo " -q absolute minimal user feedback"
97 echo " -u uid to start at"
98 echo " -w password type: no, none, yes or random"
102 # Outputs a list of valid shells from /etc/shells. Only the
103 # basename of the shell is output.
108 while read _path _junk ; do
113 echo -n "${_prefix}`basename $_path`"
119 # /usr/sbin/nologin is a special case
120 [ -x "${NOLOGIN_PATH}" ] && echo -n " ${NOLOGIN}"
123 # fullpath_from_shell shell
124 # Given $shell, which is either the full path to a shell or
125 # the basename component of a valid shell, get the
126 # full path to the shell from the /etc/shells file.
128 fullpath_from_shell() {
130 [ -z "$_shell" ] && return 1
132 # /usr/sbin/nologin is a special case; it needs to be handled
133 # before the cat | while loop, since a 'return' from within
134 # a subshell will not terminate the function's execution, and
135 # the path to the nologin shell might be printed out twice.
137 if [ "$_shell" = "${NOLOGIN}" -o \
138 "$_shell" = "${NOLOGIN_PATH}" ]; then
144 while read _path _junk ; do
149 if [ "$_path" = "$_shell" -o \
150 "`basename $_path`" = "$_shell" ]; then
162 # If the given shell is listed in ${ETCSHELLS} or it is
163 # the nologin shell this function will return 0.
164 # Otherwise, it will return 1. If shell is valid but
165 # the path is invalid or it is not executable it
166 # will emit an informational message saying so.
170 _shellchk="${GREPCMD} '^$_sh$' ${ETCSHELLS} > /dev/null 2>&1"
172 if ! eval $_shellchk; then
173 # The nologin shell is not listed in /etc/shells.
174 if [ "$_sh" != "${NOLOGIN_PATH}" ]; then
175 err "Invalid shell ($_sh) for user $username."
180 info "The shell ($_sh) does not exist or is not executable."
186 # Save some variables to a configuration file.
187 # Note: not all script variables are saved, only those that
188 # it makes sense to save.
191 echo "# Configuration file for adduser(8)." > ${ADDUSERCONF}
192 echo "# NOTE: only *some* variables are saved." >> ${ADDUSERCONF}
193 echo "# Last Modified on `${DATECMD}`." >> ${ADDUSERCONF}
194 echo '' >> ${ADDUSERCONF}
195 echo "defaultHomePerm=$uhomeperm" >> ${ADDUSERCONF}
196 echo "defaultLgroup=$ulogingroup" >> ${ADDUSERCONF}
197 echo "defaultclass=$uclass" >> ${ADDUSERCONF}
198 echo "defaultgroups=$ugroups" >> ${ADDUSERCONF}
199 echo "passwdtype=$passwdtype" >> ${ADDUSERCONF}
200 echo "homeprefix=$homeprefix" >> ${ADDUSERCONF}
201 echo "defaultshell=$ushell" >> ${ADDUSERCONF}
202 echo "udotdir=$udotdir" >> ${ADDUSERCONF}
203 echo "msgfile=$msgfile" >> ${ADDUSERCONF}
204 echo "disableflag=$disableflag" >> ${ADDUSERCONF}
205 echo "uidstart=$uidstart" >> ${ADDUSERCONF}
209 # Add a user to the user database. If the user chose to send a welcome
210 # message or lock the account, do so.
214 # Is this a configuration run? If so, don't modify user database.
216 if [ -n "$configflag" ]; then
237 _name="-n '$username'"
238 [ -n "$uuid" ] && _uid='-u "$uuid"'
239 [ -n "$ulogingroup" ] && _group='-g "$ulogingroup"'
240 [ -n "$ugroups" ] && _grouplist='-G "$ugroups"'
241 [ -n "$ushell" ] && _shell='-s "$ushell"'
242 [ -n "$uclass" ] && _class='-L "$uclass"'
243 [ -n "$ugecos" ] && _comment='-c "$ugecos"'
244 [ -n "$udotdir" ] && _dotdir='-k "$udotdir"'
245 [ -n "$uexpire" ] && _expire='-e "$uexpire"'
246 [ -n "$upwexpire" ] && _pwexpire='-p "$upwexpire"'
247 if [ -z "$Dflag" -a -n "$uhome" ]; then
248 # The /nonexistent home directory is special. It
249 # means the user has no home directory.
250 if [ "$uhome" = "$NOHOME" ]; then
253 # Use home directory permissions if specified
254 if [ -n "$uhomeperm" ]; then
255 _home='-m -d "$uhome" -M "$uhomeperm"'
257 _home='-m -d "$uhome"'
260 elif [ -n "$Dflag" -a -n "$uhome" ]; then
265 _passwdmethod="-w no"
269 # Note on processing the password: The outer double quotes
270 # make literal everything except ` and \ and $.
271 # The outer single quotes make literal ` and $.
272 # We can ensure the \ isn't treated specially by specifying
273 # the -r switch to the read command used to obtain the input.
275 _passwdmethod="-w yes"
277 _upasswd='echo "$upass" |'
280 _passwdmethod="-w none"
283 _passwdmethod="-w random"
287 # create ZFS dataset before home directory is created with pw
288 if [ "${Zcreate}" = "yes" ]; then
289 if [ "${Zencrypt}" = "yes" ]; then
290 echo "Enter encryption keyphrase for ZFS dataset (${zhome}):"
292 if [ -n "$BSDINSTALL_CHROOT" ]; then
293 create_zfs_chrooted_dataset
296 if [ "$?" -ne 0 ]; then
297 err "There was an error adding user ($username)."
303 _pwcmd="$_upasswd ${PWCMD} useradd $_uid $_name $_group $_grouplist $_comment"
304 _pwcmd="$_pwcmd $_shell $_class $_home $_dotdir $_passwdmethod $_passwd"
305 _pwcmd="$_pwcmd $_expire $_pwexpire"
307 if ! _output=`eval $_pwcmd` ; then
308 err "There was an error adding user ($username)."
311 info "Successfully added ($username) to the user database."
312 if [ "random" = "$passwdtype" ]; then
313 randompass="$_output"
314 info "Password for ($username) is: $randompass"
318 if [ -n "$disableflag" ]; then
319 if ${PWCMD} lock $username ; then
320 info "Account ($username) is locked."
322 info "Account ($username) could NOT be locked."
326 # give newly created user permissions to their home zfs dataset
327 if [ "${Zcreate}" = "yes" ]; then
329 if [ -n "$BSDINSTALL_CHROOT" ]; then
337 if [ -n "$msgflag" ]; then
338 [ -r "$msgfile" ] && {
339 # We're evaluating the contents of an external file.
340 # Let's not open ourselves up for attack. _perms will
341 # be empty if it's writeable only by the owner. _owner
342 # will *NOT* be empty if the file is owned by root.
344 _dir="`dirname $msgfile`"
345 _file="`basename $msgfile`"
346 _perms=`/usr/bin/find $_dir -name $_file -perm +07022 -prune`
347 _owner=`/usr/bin/find $_dir -name $_file -user 0 -prune`
348 if [ -z "$_owner" -o -n "$_perms" ]; then
349 err "The message file ($msgfile) may be writeable only by root."
353 while read _line ; do
355 done | ${MAILCMD} -s"Welcome" ${username}
356 info "Sent welcome message to ($username)."
362 # Reads username of the account from standard input or from a global
363 # variable containing an account line from a file. The username is
364 # required. If this is an interactive session it will prompt in
365 # a loop until a username is entered. If it is batch processing from
366 # a file it will output an error message and return to the caller.
371 # No need to take down user names if this is a configuration saving run.
372 [ -n "$configflag" ] && return
375 if [ -z "$fflag" ]; then
379 _input="`echo "$fileline" | cut -f1 -d:`"
382 # There *must* be a username, and it must not exist. If
383 # this is an interactive session give the user an
384 # opportunity to retry.
386 if [ -z "$_input" ]; then
387 err "You must enter a username!"
388 [ -z "$fflag" ] && continue
390 ${PWCMD} usershow $_input > /dev/null 2>&1
391 if [ "$?" -eq 0 ]; then
393 [ -z "$fflag" ] && continue
401 # Reads extra information about the user. Can be used both in interactive
402 # and batch (from file) mode.
407 # No need to take down additional user information for a configuration run.
408 [ -n "$configflag" ] && return
410 if [ -z "$fflag" ]; then
411 echo -n "Full name: "
414 _input="`echo "$fileline" | cut -f7 -d:`"
420 # Get the account's shell. Works in interactive and batch mode. It
421 # accepts either the base name of the shell or the full path.
422 # If an invalid shell is entered it will simply use the default shell.
427 ushell="$defaultshell"
429 # Make sure the current value of the shell is a valid one
430 if [ -z "$Sflag" ]; then
431 if ! shell_exists $ushell ; then
432 info "Using default shell ${defaultshell}."
433 ushell="$defaultshell"
437 if [ -z "$fflag" ]; then
438 echo -n "Shell ($shells) [`basename $ushell`]: "
441 _input="`echo "$fileline" | cut -f9 -d:`"
443 if [ -n "$_input" ]; then
444 if [ -n "$Sflag" ]; then
447 _fullpath=`fullpath_from_shell $_input`
448 if [ -n "$_fullpath" ]; then
451 err "Invalid shell ($_input) for user $username."
452 info "Using default shell ${defaultshell}."
453 ushell="$defaultshell"
460 # Reads the account's home directory. Used both with interactive input
465 if [ -z "$fflag" ]; then
466 echo -n "Home directory [${homeprefix}/${username}]: "
469 _input="`echo "$fileline" | cut -f8 -d:`"
472 if [ -n "$_input" ]; then
474 # if this is a configuration run, then user input is the home
475 # directory prefix. Otherwise it is understood to
478 [ -z "$configflag" ] && homeprefix="`dirname $uhome`" || homeprefix="$uhome"
480 uhome="${homeprefix}/${username}"
485 # Reads the account's home directory permissions.
488 uhomeperm=$defaultHomePerm
492 if [ -n "$uhomeperm" ]; then
493 _prompt="Home directory permissions [${uhomeperm}]: "
495 _prompt="Home directory permissions (Leave empty for default): "
497 if [ -z "$fflag" ]; then
502 if [ -n "$_input" ]; then
508 # Determine if homeprefix is located on a ZFS filesystem and if
509 # so, enable ZFS home dataset creation.
512 # check if zfs kernel module is loaded before attempting to run zfs to
513 # prevent loading the kernel module on systems that don't use ZFS
514 if ! "$KLDSTATCMD" -q -m zfs; then
518 zfs_homeprefix=`${ZFSCMD} list -Ho name "${homeprefix}" 2>/dev/null`
519 if [ "$?" -ne 0 ]; then
521 elif [ -z "${zfs_homeprefix}" ]; then
524 zhome="${zfs_homeprefix}/${username}"
528 # Reads a numeric userid in an interactive or batch session. Automatically
529 # allocates one if it is not specified.
536 if [ -n "$uuid" ]; then
537 uuid=`get_nextuid $uuid`
538 _prompt="Uid [$uuid]: "
540 _prompt="Uid (Leave empty for default): "
542 if [ -z "$fflag" ]; then
546 _input="`echo "$fileline" | cut -f2 -d:`"
549 [ -n "$_input" ] && uuid=$_input
550 uuid=`get_nextuid $uuid`
555 # Reads login class of account. Can be used in interactive or batch mode.
558 uclass="$defaultclass"
560 _class=${uclass:-"default"}
562 if [ -z "$fflag" ]; then
563 echo -n "Login class [$_class]: "
566 _input="`echo "$fileline" | cut -f4 -d:`"
569 [ -n "$_input" ] && uclass="$_input"
573 # Reads user's login group. Can be used in both interactive and batch
574 # modes. The specified value can be a group name or its numeric id.
575 # This routine leaves the field blank if nothing is provided and
576 # a default login group has not been set. The pw(8) command
577 # will then provide a login group with the same name as the username.
580 ulogingroup="$defaultLgroup"
583 if [ -z "$fflag" ]; then
584 echo -n "Login group [${ulogingroup:-$username}]: "
587 _input="`echo "$fileline" | cut -f3 -d:`"
590 # Pw(8) will use the username as login group if it's left empty
591 [ -n "$_input" ] && ulogingroup="$_input"
595 # Read additional groups for the user. It can be used in both interactive
599 ugroups="$defaultgroups"
601 _group=${ulogingroup:-"${username}"}
603 if [ -z "$configflag" ]; then
604 [ -z "$fflag" ] && echo -n "Login group is $_group. Invite $username"
605 [ -z "$fflag" ] && echo -n " into other groups? [$ugroups]: "
607 [ -z "$fflag" ] && echo -n "Enter additional groups [$ugroups]: "
611 [ -n "$_input" ] && ugroups="$_input"
615 # Read expiry information for the account and also for the password. This
616 # routine is used only from batch processing mode.
619 upwexpire="`echo "$fileline" | cut -f5 -d:`"
620 uexpire="`echo "$fileline" | cut -f6 -d:`"
624 # Read the password in batch processing mode. The password field matters
625 # only when the password type is "yes" or "random". If the field is empty and the
626 # password type is "yes", then it assumes the account has an empty passsword
627 # and changes the password type accordingly. If the password type is "random"
628 # and the password field is NOT empty, then it assumes the account will NOT
629 # have a random password and set passwdtype to "yes."
632 # We may temporarily change a password type. Make sure it's changed
633 # back to whatever it was before we process the next account.
635 [ -n "$savedpwtype" ] && {
636 passwdtype=$savedpwtype
640 # There may be a ':' in the password
641 upass=${fileline#*:*:*:*:*:*:*:*:*:}
643 if [ -z "$upass" ]; then
646 # if it's empty, assume an empty password
662 # Ask user if they want to enable encryption on their ZFS home dataset.
664 get_zfs_encryption() {
666 _prompt="Enable ZFS encryption? (yes/no) [${Zencrypt}]: "
671 [ -z "$_input" ] && _input=$Zencrypt
677 [Yy][Ee][Ss]|[Yy][Ee]|[Yy])
682 # invalid answer; repeat loop
688 if [ "${Zencrypt}" = "yes" ]; then
689 zfsopt="-o encryption=on -o keylocation=prompt -o keyformat=passphrase"
693 # create_zfs_chrooted_dataset
694 # Create ZFS dataset owned by the user that was just added within a bsdinstall chroot
696 create_zfs_chrooted_dataset() {
697 if ! ${ZFSCMD} create -u ${zfsopt} "${zhome}"; then
698 err "There was an error creating ZFS dataset (${zhome})."
701 ${ZFSCMD} set mountpoint=legacy "${zhome}"
702 ${MKDIRCMD} -p "${uhome}"
703 ${MOUNTCMD} -t zfs "${zhome}" "${uhome}"
707 # Unmount ZFS home directory created as a legacy mount and switch inheritance
709 umount_legacy_zfs() {
710 ${UMOUNTCMD} "${uhome}"
711 ${ZFSCMD} inherit mountpoint "${zhome}"
715 # Create ZFS dataset owned by the user that was just added.
717 create_zfs_dataset() {
718 if ! ${ZFSCMD} create ${zfsopt} "${zhome}"; then
719 err "There was an error creating ZFS dataset (${zhome})."
722 info "Successfully created ZFS dataset (${zhome})."
727 # Give new user ownership of newly created zfs dataset.
730 if ! ${ZFSCMD} allow "${username}" create,destroy,mount,snapshot "${zhome}"; then
731 err "There was an error setting permissions on ZFS dataset (${zhome})."
737 # Reads a line of account information from standard input and
738 # adds it to the user database.
743 while read -r fileline ; do
759 ugroups="$defaultgroups"
768 # Prompts for user information interactively, and commits to
771 input_interactive() {
799 # The case where group = user is handled elsewhere, so
800 # validate any other groups the user is invited to.
801 until [ "$_logingroup_ok" = yes ]; do
804 if [ -n "$ulogingroup" -a "$username" != "$ulogingroup" ]; then
805 if ! ${PWCMD} show group $ulogingroup > /dev/null 2>&1; then
806 echo "Group $ulogingroup does not exist!"
811 until [ "$_groups_ok" = yes ]; do
814 for i in $ugroups; do
815 if [ "$username" != "$i" ]; then
816 if ! ${PWCMD} show group $i > /dev/null 2>&1; then
817 echo "Group $i does not exist!"
829 [ "$Zcreate" = "yes" ] && get_zfs_encryption
832 echo -n "Use password-based authentication? [$_usepass]: "
834 [ -z "$_input" ] && _input=$_usepass
839 [Yy][Ee][Ss]|[Yy][Ee]|[Yy])
841 echo -n "Use an empty password? (yes/no) [$_emptypass]: "
843 [ -n "$_input" ] && _emptypass=$_input
846 echo -n "Use a random password? (yes/no) [$_random]: "
848 [ -n "$_input" ] && _random="$_input"
850 [Yy][Ee][Ss]|[Yy][Ee]|[Yy])
856 [ -n "$configflag" ] && break
857 trap 'stty echo; exit' 0 1 2 3 15
859 echo -n "Enter password: "
862 echo -n "Enter password again: "
863 IFS= read -r _passconfirm
866 # if user entered a blank password
867 # explicitly ask again.
868 [ -z "$upass" -a -z "$_passconfirm" ] \
871 [Yy][Ee][Ss]|[Yy][Ee]|[Yy])
876 # invalid answer; repeat the loop
880 if [ "$upass" != "$_passconfirm" ]; then
881 echo "Passwords did not match!"
888 # invalid answer; repeat loop
894 _disable=${disableflag:-"no"}
896 echo -n "Lock out the account after creation? [$_disable]: "
898 [ -z "$_input" ] && _input=$_disable
903 [Yy][Ee][Ss]|[Yy][Ee]|[Yy])
907 # invalid answer; repeat loop
914 # Display the information we have so far and prompt to
917 _disable=${disableflag:-"no"}
918 [ -z "$configflag" ] && printf "%-11s : %s\n" Username $username
933 [ -z "$configflag" ] && printf "%-11s : %s\n" "Password" "$_pass"
934 [ -n "$configflag" ] && printf "%-11s : %s\n" "Pass Type" "$passwdtype"
935 [ -z "$configflag" ] && printf "%-11s : %s\n" "Full Name" "$ugecos"
936 [ -z "$configflag" ] && printf "%-11s : %s\n" "Uid" "$uuid"
937 [ "$Zcreate" = "yes" -a -z "$configflag" ] && printf "%-11s : %s\n" "ZFS dataset" "${zhome}"
938 [ "$Zencrypt" = "yes" -a -z "$configflag" ] && printf "%-11s : %s\n" "Encrypted" "${Zencrypt}"
939 printf "%-11s : %s\n" "Class" "$uclass"
940 printf "%-11s : %s %s\n" "Groups" "${ulogingroup:-$username}" "$ugroups"
941 printf "%-11s : %s\n" "Home" "$uhome"
942 printf "%-11s : %s\n" "Home Mode" "$uhomeperm"
943 printf "%-11s : %s\n" "Shell" "$ushell"
944 printf "%-11s : %s\n" "Locked" "$_disable"
946 echo -n "OK? (yes/no) [$_all_ok]: "
948 if [ -z "$_input" ]; then
955 [Yy][Ee][Ss]|[Yy][Ee]|[Yy])
967 #### END SUBROUTINE DEFINITION ####
969 THISCMD=`/usr/bin/basename $0`
971 ADDUSERCONF="${ADDUSERCONF:-/etc/adduser.conf}"
972 PWCMD="${PWCMD:-/usr/sbin/pw}"
973 MAILCMD="${MAILCMD:-mail}"
974 ETCSHELLS="${ETCSHELLS:-/etc/shells}"
975 NOHOME="/nonexistent"
977 NOLOGIN_PATH="/usr/sbin/nologin"
978 GREPCMD="/usr/bin/grep"
980 MKDIRCMD="/bin/mkdir"
981 MOUNTCMD="/sbin/mount"
982 UMOUNTCMD="/sbin/umount"
984 KLDSTATCMD="/sbin/kldstat"
998 udotdir=/usr/share/skel
1002 shells="`valid_shells`"
1004 msgfile=/etc/adduser.msg
1022 defaultshell="${DEFAULTSHELL}"
1027 # Make sure the user running this program is root. This isn't a security
1028 # measure as much as it is a useful method of reminding the user to
1029 # 'su -' before he/she wastes time entering data that won't be saved.
1031 procowner=${procowner:-`/usr/bin/id -u`}
1032 if [ "$procowner" != "0" ]; then
1033 err 'you must be the super-user (uid 0) to use this utility.'
1037 # Override from our conf file
1038 # Quickly go through the commandline line to see if we should read
1039 # from our configuration file. The actual parsing of the commandline
1040 # arguments happens after we read in our configuration file (commandline
1041 # should override configuration file).
1044 if [ "$_i" = "-N" ]; then
1049 if [ -n "$readconfig" ]; then
1050 # On a long-lived system, the first time this script is run it
1051 # will barf upon reading the configuration file for its perl predecessor.
1052 if ( . ${ADDUSERCONF} > /dev/null 2>&1 ); then
1053 [ -r ${ADDUSERCONF} ] && . ${ADDUSERCONF} > /dev/null 2>&1
1057 # Process command-line options
1082 [ "$2" != "-" ] && infile="$2"
1139 defaultshell="`fullpath_from_shell $2`"
1157 # If the -f switch was used, get input from a file. Otherwise,
1158 # this is an interactive session.
1160 if [ -n "$fflag" ]; then
1161 if [ -z "$infile" ]; then
1163 elif [ -n "$infile" ]; then
1164 if [ -r "$infile" ]; then
1165 input_from_file < $infile
1167 err "File ($infile) is unreadable or does not exist."
1173 if [ -z "$configflag" ]; then
1174 echo -n "Add another user? (yes/no) [$_another_user]: "
1176 echo -n "Re-edit the default configuration? (yes/no) [$_another_user]: "
1179 if [ -z "$_input" ]; then
1180 _input=$_another_user
1183 [Yy][Ee][Ss]|[Yy][Ee]|[Yy])
1184 uidstart=`get_nextuid $uidstart`