su, without the hyphen, you continue to retain your current Environment. In simple terms, just the $USER and $HOME change to root. While the rest of bash Global variables stay the same. On certain distributions like OpenSuSe, even when I login as just su, I don't have access to 'fdisk' as opposed to su -.
Variable(s) are not the only thing that changes between su and su -.
Like 'su' is a emulated session and 'su -' is the real deal. Probably can start GUI applications in just 'su' and fail in 'su -', unable to connect to X server. Something to that effect.
Last edited by lhorace; 10-26-2009 at 01:38 AM.