]> git.proxmox.com Git - pve-common.git/blobdiff - data/PVE/Tools.pm
cleanup error message from usermod command
[pve-common.git] / data / PVE / Tools.pm
index 319961651669136c427dde07c0a77de9e908203f..66bc644d3bde91262d44e849e714d47100985653 100644 (file)
@@ -417,6 +417,7 @@ sub run_command {
        }
 
        if ($errmsg) {
+           $err =~ s/^usermod:\s*// if $cmdstr =~ m|^(\S+/)?usermod\s|;
            die "$errmsg: $err";
        } else {
            die "command '$cmdstr' failed: $err";