diff --git a/tests/servers.pm b/tests/servers.pm index 29e214de30..9a2c57dcdf 100644 --- a/tests/servers.pm +++ b/tests/servers.pm @@ -209,9 +209,17 @@ sub initserverconfig { $USER = $ENV{USER}; # Linux if (!$USER) { $USER = $ENV{USERNAME}; # Windows - if (!$USER) { - $USER = $ENV{LOGNAME}; # Some Unix (I think) - } + } + if (!$USER) { + $USER = $ENV{LOGNAME}; # Some Unix (I think) + } + if (!$USER) { + $USER = `whoami`; + chomp $USER; + } + if (!$USER) { + $USER = `id -un`; + chomp $USER; } init_serverpidfile_hash(); }