[sudo-users] sudo -i vs su -

Todd Michael Bushnell toddmichael at gmail.com
Sat Dec 10 17:16:25 EST 2005

Currently I have to permit my db2 admins the ability to "su -" as every db
user on our systems as they claim that sudo -i does not give them the
environment necessary to perform their tasks.  I just installed a recent
version of sudo after reading that "sudo -i" was added as an alternative to
"su -", but I'm apparently not understanding how to use it.  My assumption
was that I could run "sudo -u username -i command" and sudo would initiate a
login shell which would give me the necessary environment to do whatever I
needed to do.  Unfortunately, when I test this by running sudo -i printenv
(or any other command for that matter) I get "printenv: /usr/bin/printenv:
cannot execute binary file."

Could someone please excuse my ignorance and explain to me how sudo
-i should be used as a replacement for su -?  Thank you.


More information about the sudo-users mailing list