usermod: report error if homedir does not exist
Report error if usermod asked for moving homedir and it does not exist. Signed-off-by: Tomáš Mráz <tm@t8m.info> Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
This commit is contained in:
parent
e503fd574b
commit
ead03afeba
@ -1882,6 +1882,11 @@ static void move_home (void)
|
||||
Prog, prefix_user_home, prefix_user_newhome);
|
||||
fail_exit (E_HOMEDIR);
|
||||
}
|
||||
} else {
|
||||
fprintf (stderr,
|
||||
_("%s: The previous home directory (%s) does not "
|
||||
"exist or is inaccessible. Move cannot be completed.\n"),
|
||||
Prog, prefix_user_home);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user