diff options
author | Nicolas Lécureuil <neoclust@mageia.org> | 2018-01-11 18:19:26 +0100 |
---|---|---|
committer | Nicolas Lécureuil <neoclust@mageia.org> | 2018-01-11 18:19:26 +0100 |
commit | eea83398deb651edac83b481393f441484c21b53 (patch) | |
tree | 6920eaac00c5ca1041b3a65667c3b92f1c327dc2 | |
parent | a3bc1fbf4f74dc9a15b24920e23e1d8cc5e3fc5b (diff) | |
download | userdrake-eea83398deb651edac83b481393f441484c21b53.tar userdrake-eea83398deb651edac83b481393f441484c21b53.tar.gz userdrake-eea83398deb651edac83b481393f441484c21b53.tar.bz2 userdrake-eea83398deb651edac83b481393f441484c21b53.tar.xz userdrake-eea83398deb651edac83b481393f441484c21b53.zip |
add patch to notify of existing home directory (mga#21333)
From Mike Rambo
-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 |