diff options
Diffstat (limited to 'perl-install/standalone/adduserdrake')
| -rwxr-xr-x | perl-install/standalone/adduserdrake | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/perl-install/standalone/adduserdrake b/perl-install/standalone/adduserdrake new file mode 100755 index 000000000..a2d380766 --- /dev/null +++ b/perl-install/standalone/adduserdrake @@ -0,0 +1,25 @@ +#!/usr/bin/perl + +use lib qw(/usr/lib/libDrakX); + +use standalone; #- warning, standalone must be loaded very first, for 'explanations' + +use common; +use interactive; +use security::level; +use authentication; +use any; + +my $users = []; +my $in; + +if (my @l = grep { ! /^-/ } @ARGV) { + $users = [ map { { name => $_, realname => $_ } } @l ]; +} else { + $in = 'interactive'->vnew('su'); + any::ask_users($in, $users, security::level::get(), []); +} + +any::add_users($users, authentication::get()); + +$in->exit(0) if $in; |
