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