# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# $Id: adduser.perl,v 1.35 1997/08/26 22:47:51 wosch Exp $
+# $Id: adduser.perl,v 1.38 1997/12/24 11:44:14 wosch Exp $
# read variables
# check for valid passwddb
sub passwd_check {
- system("$pwd_mkdb -c $etc_passwd");
+ system("$pwd_mkdb -C $etc_passwd");
die "\nInvalid $etc_passwd - cannot add any users!\n" if $?;
}
if ($verbose && $sh &&
!$shell{&basename($sh)} &&
$p_username !~ /^(news|xten|bin|nobody|uucp)$/ &&
- $sh !~ /\/(pppd|sliplogin|nologin)$/);
+ $sh !~ /\/(pppd|sliplogin|nologin|nonexistent)$/);
$uid{$p_uid} = $p_username;
$pwgid{$p_gid} = $p_username;
}
! $uid{$u_id_tmp};
if ($uid{$u_id_tmp}) {
warn "Uid ``$u_id_tmp'' in use!\a\n";
+ $uid_start = $u_id_tmp;
+ ($u_id, $g_id) = &next_id($name);
+ next;
} else {
warn "Wrong uid.\a\n";
}
}
# use calculated uid
- return ($u_id_tmp, $g_id) if $u_id_tmp eq $u_id;
+ # return ($u_id_tmp, $g_id) if $u_id_tmp eq $u_id;
# recalculate gid
$uid_start = $u_id_tmp;
return &next_id($name);
defaultclass = "$defaultclass"
# new users get this uid (1000)
-uid_start = 1000
+uid_start = "$uid_start"
$do_not_delete
## your own variables, see /etc/adduser.message