Second Question on Linux Bash Prompt Lab

Hey all.

Question on the second question in the lab, which asks us to change the default shell for bob from bash to Bourne shell. I kept having issues with this question because the prompt asks us to use sudo to make the change, however whenever I try to change the shell with sudo (“sudo chsh”) I get the answer marked incorrect. If I don’t use sudo however, I get marked correct and can move on with the lab. Wondering if there is something wrong with this question. I’m assuming in real world that sudo would be required to change the shell.

It helps if you provide a link to the lab so we know which one you are referring to.

If you want to change the shell for the current user then use just chsh without sudo

Runniing chsh for another user will require the user of sudo and you also need to pass in the username to change, for example:

sudo chsh sara

It’s this lab here:

It was confusing because there is a note that reads:

" Note: - Normal users can not execute the high-level tasks so add sudo before the command."

Yet without using sudo I was able to complete the task.

The “sudo chsh bob” command works and completes the task as well, but I checked the lecture and the sudo command was not covered.