diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/install_steps.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 0159e1e3a..5f329bf12 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -722,8 +722,8 @@ sub addUser { foreach (@$users) { $_->{home} ||= "/home/$_->{name}"; - my $u = $_->{uid} || ($_->{oldu} = (stat("$p$_->{home}"))[4]); - my $g = $_->{gid} || ($_->{oldg} = (stat("$p$_->{home}"))[5]); + my $u = $_->{uid} || ($_->{oldu} = (stat("$p$_->{home}"))[4]) || int getpwnam($_->{name}); + my $g = $_->{gid} || ($_->{oldg} = (stat("$p$_->{home}"))[5]) || int getgrnam($_->{name}); #- search for available uid above 501 else initscripts may fail to change language for KDE. if (!$u || getpwuid($u)) { for ($u = 501; getpwuid($u) || $uids{$u}; $u++) {} } if (!$g) { for ($g = 501; getgrgid($g) || $gids{$g}; $g++) {} } |