diff options
author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1995-10-19 06:26:49 +0000 |
---|---|---|
committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1995-10-19 06:26:49 +0000 |
commit | 2abfdd7f9c3304192efa6c987a427be1827a1d98 (patch) | |
tree | df651e9a6d63e9a3fe7c6b1d17b2291542e7a952 /usr.sbin/adduser/adduser.perl | |
parent | ee61b5a715f75ecca4282d282f5469d9f4777d04 (diff) | |
download | src-2abfdd7f9c3304192efa6c987a427be1827a1d98.tar.gz src-2abfdd7f9c3304192efa6c987a427be1827a1d98.zip |
Various fixes to make this work better when called from other tools.
Submitted by: Coranth Gryphon <gryphon@healer.com> & Wolfram Schneider <wosch@cs.tu-berlin.de>
Notes
Notes:
svn path=/head/; revision=11563
Diffstat (limited to 'usr.sbin/adduser/adduser.perl')
-rw-r--r-- | usr.sbin/adduser/adduser.perl | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/usr.sbin/adduser/adduser.perl b/usr.sbin/adduser/adduser.perl index 5d27ddb0244b..44fd3f8b2ce5 100644 --- a/usr.sbin/adduser/adduser.perl +++ b/usr.sbin/adduser/adduser.perl @@ -32,7 +32,7 @@ # # Email: Wolfram Schneider <wosch@cs.tu-berlin.de> # -# $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 |