sudo su asks for invoking user's password as default sudo behaviour.
With Defaults rootpw it will ask root's password.
- But is there a way, to make
sudo subehave likesu? Like it'll ask password of the user mentioned in the parameter?
Like:
sudo su/ sudo su - # ask root's password
sudo su foo/ sudo su - foo # ask foo's password
sudo su bar/ sudo su - bar # ask bar's passwordDefaults rootpwwill ask root's password for all the rules mentioned in sudoers file. Is it possible to make it ask root's password for onlysudo su/ sudo su -rule and not other rules? Correct me if I'm wrong here?