I using Redhat linux. I am trying to run the following command and would like to know why it is not prompting for password?
Here is what I am doing. I open the terminal window and enter my username and password. After that I run the following command
sudo su - anotherusername
The command runs successfully without prompting for password of anotherusername. I want to know why I don't get password prompt?
Are there any circumstances where I will get password prompt for anotherusername?
Or Is there a different command that will prompt me for anotherusername password?
I mistakenly posted this question in StackOverflow https://stackoverflow.com/questions/46632690/sudo-su-username-not-prompting-for-password and I was told that if my username is part of sudoers group then I will not get password prompt.
Just want to confirm if that is the only reason or there are other reasons as well for not receiving password prompt.