I took the assessment Linux test and in question number 9 it asked to modify the port for the https.service (Apache) and the user/group for that service. I went to go restart the service but it kept asking for the root password which I didn’t have?
Looks like you meant this lab – again, always include a link to your lab – then you don’t actually need a password for Q9: you can just use sudo directly, like this:
sudo -i
which will give you a root shell; this will let you edit the httpd.conf file.
but as for Q9, I was able to write and edit the https.conf file but as you can see in the screenshot, the moment I needed to restart the service or even start it, it would ask for a sudo password. I’ve tried to start it, restart and same situation. Just trying to understand if sudo -I would have prevented this as well?