I have a system that is setup to require a password both to elevate to root, and to switch to the only user that can do so, so currently if I need to do something as root from another account I would do the following:
su admin sudo su
The problem with this is that it requires me to enter my password twice, and since my admin account's password is long that makes it prone to mistakes.
What I'm wondering is, assuming the basic setup cannot be changed (i.e- no passwordless
sudo etc.), is there a way to combine both commands so that I can only have to enter my password once?