News for hackers. Stuff that matters.
Re:Su VS sudo su VS sudo -u -i by johnkpaul on Saturday March 24, 2012 @05:31PM (#3750789)
AFAIK, sudo -s is only if you would like to open a shell as root, not when you would like to open a shell as another user. The original point of the post was about how to create a shell as another user, without needing any password.

Edit: just added the last phrase. "without needing a password".

Re:Su VS sudo su VS sudo -u -i by lubutu on Saturday March 24, 2012 @05:34PM (#3750793)
That's possible using sudo -su user (which looks similar, but doesn't hand over to su).
Re:Su VS sudo su VS sudo -u -i by johnkpaul on Saturday March 24, 2012 @05:37PM (#3750799)
Again, AFAIK, that doesn't respect the NOPASSWD option in /etc/sudoers. That might just be the specific configuration I'm working with though.
Re:Su VS sudo su VS sudo -u -i by lubutu on Saturday March 24, 2012 @05:45PM (#3750830)
I've just done some testing, and my sudo (1.7.4p6) does honour NOPASSWD in /etc/sudoers, when I sudo -su to any user. Are you sure your configuration is correct?
Re:Su VS sudo su VS sudo -u -i by johnkpaul on Saturday March 24, 2012 @05:56PM (#3750866)
No, I'm not sure. I'm using Sudo version 1.7.4p5. sudo su <user> does not prompt for a password. sudo -su <user> and sudo -s -u <user> do prompt for a password.
Re:Su VS sudo su VS sudo -u -i by lobster_johnson on Saturday March 24, 2012 @09:45PM (#3751434)
Works here. We use it extensively on our boxes to allow access to certain initscripts, among other things.