(gh-542) fix bug with sed conditional check during permit root login