summaryrefslogtreecommitdiffstats
path: root/perl-install/install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/install')
-rw-r--r--perl-install/install/NEWS6
-rw-r--r--perl-install/install/gtk.pm2
-rw-r--r--perl-install/install/help/help.pm39
-rw-r--r--perl-install/install/install2.pm11
-rw-r--r--perl-install/install/steps.pm9
-rw-r--r--perl-install/install/steps_auto_install.pm3
-rw-r--r--perl-install/install/steps_interactive.pm45
-rw-r--r--perl-install/install/steps_list.pm4
8 files changed, 39 insertions, 80 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 58aba047f..334b2755c 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,9 @@
+- merge root password step and create user step
+- fix checking user creation info (#32517)
+- allow to create only one user per default, but add an entry in summary to
+ create more users
+- authentication method is not configurable anymore for now.
+ should we add it to summary?
- 'ibm_acpi' driver was replaced by 'thinkpad_acpi (#31606)
- internal
o use urpm::select::get_preferred to choose preferred packages
diff --git a/perl-install/install/gtk.pm b/perl-install/install/gtk.pm
index 877f62596..22ef0eb18 100644
--- a/perl-install/install/gtk.pm
+++ b/perl-install/install/gtk.pm
@@ -135,7 +135,7 @@ sub create_steps_window {
my @l = $category->(N("Installation"));
foreach (grep { !eval $o->{steps}{$_}{hidden} } @{$o->{orderedSteps}}) {
- if ($_ eq 'setRootPassword') {
+ if ($_ eq 'setRootPassword_addUser') {
push @l, '', $category->(N("Configuration"));
}
my $img = gtknew('Image', file => 'steps_off.png');
diff --git a/perl-install/install/help/help.pm b/perl-install/install/help/help.pm
index dd30f1457..70aa3a785 100644
--- a/perl-install/install/help/help.pm
+++ b/perl-install/install/help/help.pm
@@ -16,7 +16,7 @@ covers the entire Mandriva Linux distribution. If you agree with all the
terms it contains, check the \"%s\" box. If not, clicking on the \"%s\"
button will reboot your computer.", N("Accept"), N("Quit"));
}
-sub addUser() {
+sub setRootPassword_addUser() {
N("GNU/Linux is a multi-user system which means each user can have his or her
own preferences, own files and so on. But unlike \"root\", who is the
system administrator, the users you add at this point will not be authorized
@@ -681,43 +681,6 @@ sub selectSerialPort() {
N("Please select the correct port. For example, the \"COM1\" port under
Windows is named \"ttyS0\" under GNU/Linux.");
}
-sub setRootPassword() {
- N("This is the most crucial decision point for the security of your GNU/Linux
-system: you must enter the \"root\" password. \"Root\" is the system
-administrator and is the only user authorized to make updates, add users,
-change the overall system configuration, and so on. In short, \"root\" can
-do everything! That's why you must choose a password which is difficult to
-guess: DrakX will tell you if the password you chose is too simple. As you
-can see, you're not forced to enter a password, but we strongly advise
-against this. GNU/Linux is just as prone to operator error as any other
-operating system. Since \"root\" can overcome all limitations and
-unintentionally erase all data on partitions by carelessly accessing the
-partitions themselves, it is important that it be difficult to become
-\"root\".
-
-The password should be a mixture of alphanumeric characters and at least 8
-characters long. Never write down the \"root\" password -- it makes it far
-too easy to compromise your system.
-
-One caveat: do not make the password too long or too complicated because you
-must be able to remember it!
-
-The password will not be displayed on screen as you type it. To reduce the
-chance of a blind typing error you'll need to enter the password twice. If
-you do happen to make the same typing error twice, you'll have to use this
-``incorrect'' password the first time you'll try to connect as \"root\".
-
-If you want an authentication server to control access to your computer,
-click on the \"%s\" button.
-
-If your network uses either LDAP, NIS, or PDC Windows Domain authentication
-services, select the appropriate one for \"%s\". If you do not know which
-one to use, you should ask your network administrator.
-
-If you happen to have problems with remembering passwords, or if your
-computer will never be connected to the Internet and you absolutely trust
-everybody who uses your computer, you can choose to have \"%s\".", N("Advanced"), N("authentication"), N("No password"));
-}
sub setupBootloaderBeginner() {
N("A boot loader is a little program which is started by the computer at boot
time. It's responsible for starting up the whole system. Normally, the boot
diff --git a/perl-install/install/install2.pm b/perl-install/install/install2.pm
index 8532a02c5..8addfdb33 100644
--- a/perl-install/install/install2.pm
+++ b/perl-install/install/install2.pm
@@ -271,17 +271,10 @@ sub configureServices {
installStepsCall($o, $auto, 'configureServices');
}
#------------------------------------------------------------------------------
-sub setRootPassword {
+sub setRootPassword_addUser {
my ($auto) = @_;
- return if $o->{isUpgrade};
- installStepsCall($o, $auto, 'setRootPassword');
-}
-#------------------------------------------------------------------------------
-sub addUser {
- my ($auto) = @_;
-
- installStepsCall($o, $auto, 'addUser') if !$o->{isUpgrade};
+ installStepsCall($o, $auto, 'setRootPassword_addUser') if !$o->{isUpgrade};
}
#------------------------------------------------------------------------------
diff --git a/perl-install/install/steps.pm b/perl-install/install/steps.pm
index e10c010ea..05dd04758 100644
--- a/perl-install/install/steps.pm
+++ b/perl-install/install/steps.pm
@@ -728,6 +728,13 @@ sub configureServices {
}
#------------------------------------------------------------------------------
+sub setRootPassword_addUser {
+ my ($o) = @_;
+
+ setRootPassword($o);
+ addUser($o);
+}
+
sub setRootPassword {
my ($o) = @_;
$o->{superuser} ||= {};
@@ -736,8 +743,6 @@ sub setRootPassword {
install::any::set_authentication($o);
}
-#------------------------------------------------------------------------------
-
sub addUser {
my ($o) = @_;
my $users = $o->{users} ||= [];
diff --git a/perl-install/install/steps_auto_install.pm b/perl-install/install/steps_auto_install.pm
index a8327df97..dfaa5f0e3 100644
--- a/perl-install/install/steps_auto_install.pm
+++ b/perl-install/install/steps_auto_install.pm
@@ -15,8 +15,9 @@ use install::steps;
sub new {
my ($type, $o) = @_;
- # Handle legacy options
$o->{interactive} ||= 'gtk' if $graphical || !is_empty_array_ref($o->{interactiveSteps});
+ # Handle legacy options
+ push @{$o->{interactiveSteps}}, qw(setRootPassword_addUser) if intersection($o->{interactiveSteps}, ['addUser', 'setRootPassword']);
push @{$o->{interactiveSteps}}, qw(installPackages configureNetwork), @graphical_steps, if_(!$o->{autoExitInstall}, 'exitInstall');
if ($o->{interactive}) {
diff --git a/perl-install/install/steps_interactive.pm b/perl-install/install/steps_interactive.pm
index e40f19eb0..0d3146df9 100644
--- a/perl-install/install/steps_interactive.pm
+++ b/perl-install/install/steps_interactive.pm
@@ -784,6 +784,16 @@ sub summary {
push @l, {
group => N("System"),
+ label => N("User management"),
+ clicked => sub {
+ if (my $u = any::ask_user($o, $o->{users}, $o->{security}, needauser => 1)) {
+ any::add_users([$u], $o->{authentication});
+ }
+ },
+ };
+
+ push @l, {
+ group => N("System"),
label => N("Services"),
val => sub {
require services;
@@ -935,37 +945,18 @@ sub summary {
}
#------------------------------------------------------------------------------
-sub setRootPassword {
- my ($o, $clicked) = @_;
- my $sup = $o->{superuser} ||= {};
- $sup->{password2} ||= $sup->{password} ||= "";
-
- if ($o->{security} >= 1 || $clicked) {
- require authentication;
- authentication::ask_root_password_and_authentication($o, $o->{net}, $sup, $o->{authentication} ||= {}, $o->{meta_class}, $o->{security});
- }
- install::steps::setRootPassword($o);
-}
-
-#------------------------------------------------------------------------------
-#-addUser
+#-setRootPassword_addUser
#------------------------------------------------------------------------------
-sub addUser {
- my ($o, $clicked) = @_;
+sub setRootPassword_addUser {
+ my ($o) = @_;
$o->{users} ||= [];
- if ($o->{security} < 1) {
- push @{$o->{users}}, { password => 'mandrake', realname => 'default', icon => 'automagic' }
- if !member('mandrake', map { $_->{name} } @{$o->{users}});
- }
- if ($o->{security} >= 1 || $clicked) {
- my @suggested_names = @{$o->{users}} ? () : grep { !/^\./ && $_ ne 'lost+found' && -d "$::prefix/home/$_" } all("$::prefix/home");
- any::ask_users($o, $o->{users}, $o->{security}, \@suggested_names);
- }
- add2hash($o, any::get_autologin());
- any::autologin($o, $o);
- any::set_autologin($o->do_pkgs, $o->{autologin}, $o->{desktop}) if $::globetrotter;
+ my $sup = $o->{superuser} ||= {};
+ $sup->{password2} ||= $sup->{password} ||= "";
+
+ any::ask_user_and_root($o, $sup, $o->{users}, $o->{security});
+ install::steps::setRootPassword($o);
install::steps::addUser($o);
}
diff --git a/perl-install/install/steps_list.pm b/perl-install/install/steps_list.pm
index 814fae0a4..03cfdc182 100644
--- a/perl-install/install/steps_list.pm
+++ b/perl-install/install/steps_list.pm
@@ -24,8 +24,8 @@ use common;
formatPartitions => [ N_("_: Keep these entry short\nFormatting"), 1, -1, '1', "doPartitionDisks" ],
choosePackages => [ N_("_: Keep these entry short\nChoosing packages"), 1, -2, '1', "formatPartitions" ],
installPackages => [ N_("_: Keep these entry short\nInstalling"), 1, -1, '', ["formatPartitions", "selectInstallClass"] ],
- setRootPassword => [ N_("_: Keep these entry short\nAuthentication"), 1, 1, '', "installPackages" ],
- addUser => [ N_("_: Keep these entry short\nUsers"), 1, 1, '', "installPackages" ],
+ setRootPassword_addUser
+ => [ N_("_: Keep these entry short\nUsers"), 1, 1, '', "installPackages" ],
configureNetwork => [ N_("_: Keep these entry short\nNetworking"), 1, 1, '1', "formatPartitions" ],
setupBootloader => [ N_("_: Keep these entry short\nBootloader"), 1, 0, '', "installPackages" ],
configureX => [ N_("_: Keep these entry short\nConfigure X"), 1, 1, '1', ["formatPartitions", "setupBootloader"] ],