replace sudo with as_root