On Mon, Aug 9, 2010 at 6:18 PM, William Hubbs wrote: > On Mon, Aug 09, 2010 at 05:30:40PM -0700, Kevin O'Gorman wrote: > > On Mon, Aug 9, 2010 at 1:20 PM, Bill Longman > wrote: > > > I actually prefer "sudo su -" -- as long as I'm giving it away! :o) > > Afaik, there is no reason for "sudo su -" It should be either > > su - > > or, if you are using sudo, > > sudo -i > > The disadvantage of "su -" is that it requires the user to know the root > password. But, "sudo -i" does the same thing without requiring the user > to know the root password. > > You either didn't think or didn't actually try it. "sudo su -" needs a password, but it's the user password. Running su as root never needs a password. Accordingly, this works on a stock Ubuntu with no root password. "su -" requires the root password unless you're already root, and the root password may or may not exist. I didn't know about "sudo -i" (thanks), but when I tried "sudo -i" it immediately asked for a password, for which the user password was sufficient. So it's entirely equivalent to but slightly shorter than my version. I'll stick with mine because it's made of parts I already know and won't forget. I think that if sudoers don't need to enter passwords, they're still equivalent, but I have not tried this. -- Kevin O'Gorman, PhD