Commit 12446686 authored by Mike Hibler's avatar Mike Hibler
Browse files

Check for existence of "toor" user before trying to change password.

parent 3cf35fbe
#!/usr/bin/perl -wT
#
# Copyright (c) 2000-2016 University of Utah and the Flux Group.
# Copyright (c) 2000-2017 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -510,6 +510,7 @@ sub os_modpasswd($$)
return -1;
}
if ($login eq "root" &&
!system("grep -q toor /etc/passwd") &&
system("$CHPASS '$pswd' toor") != 0) {
warn "*** WARNING: $CHPASS $login error.\n";
return -1;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment