diff options
-rw-r--r-- | NEWS | 2 | ||||
-rwxr-xr-x | userdrake | 6 |
2 files changed, 8 insertions, 0 deletions
@@ -1,3 +1,5 @@ +- add patch to notify of existing home directory (mga#21333) + Version 2.16 - 5 June 2017 - Translation updates @@ -585,6 +585,12 @@ sub AddUser() { $userEnt->Gid($u{gid}); $userEnt->ShadowMin(-1); $userEnt->ShadowMax(99999); $userEnt->ShadowWarn(-1); $userEnt->ShadowInact(-1); + if ((-e $u{homedir}) && (-d $u{homedir})) { + my $keephomedir = $in->ask_yesorno(N("Home directory already exists"), N("The requested home directory already exists. Would you like to preserve the existing home directory?")); + if (!$keephomedir) { + return; + } + } $ctx->UserAdd($userEnt, $is_system, $dontcreatehomedir, $homedir_perms); $ctx->UserSetPass($userEnt, $u{passwd}); defined $us->{o}{iconval} and |