From d372a3f2f5266ee06436043fe37f251b03ef1da6 Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Thu, 19 Oct 1995 06:26:49 +0000 Subject: Various fixes to make this work better when called from other tools. Submitted by: Coranth Gryphon & Wolfram Schneider --- adduser/adduser.perl | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'adduser') diff --git a/adduser/adduser.perl b/adduser/adduser.perl index 5d27ddb..44fd3f8 100644 --- a/adduser/adduser.perl +++ b/adduser/adduser.perl @@ -32,7 +32,7 @@ # # Email: Wolfram Schneider # -# $Id: adduser.perl,v 1.6 1995/04/30 19:20:25 ache Exp $ +# $Id: adduser.perl,v 1.7 1995/05/20 13:05:22 jkh Exp $ # # read variables @@ -123,6 +123,16 @@ sub shells_read { } } } + +# Allow /nonexistant and /bin/date as a valid shell for system utils + push(@list, "/nonexistant"); + push(@shellpref, "no"); + $shell{"no"} = "/nonexistant"; + + push(@list, "/bin/date"); + push(@shellpref, "date"); + $shell{"date"} = "/bin/date"; + return $err; } @@ -928,6 +938,8 @@ sub home_create { return 0; } + return mkdir("$homedir",0755) if $dotdir eq "no"; + # copy files from $dotdir to $homedir # rename 'dot.foo' files to '.foo' print "Copy files from $dotdir to $homedir\n" if $verbose; @@ -1378,7 +1390,7 @@ $home = &home_partition($home); # find HOME partition $dotdir = &dotdir_default; # check $dotdir $send_message = &message_default; # send message to new user $defaultpasswd = &password_default; # maybe use password -&config_write(0); # write variables in file +&config_write(!$verbose); # write variables in file # main loop for creating new users &new_users; # add new users -- cgit v1.2.3-56-ge451