The difference between using su - and su is explained (somewhat) in the manual page for su.
However it is not entirely clear.
When you use the su command with the - parameter then after you successfully enter the new user's password your process will execute the same scripts as if you had logged on to that user account in a console terminal. If you do not use the - parameter then you will not execute the login scripts.
The result of not executing the login scripts are that
1) you will have the same current working directory as before you executed the su command
2) you will have the same environment variable values as before you executed the su command
3) you will not execute any commands in their $HOME/.bash_profile and other user specific login commands
If you do use the - parameter when executing su then
1) you will have the HOME directory of the user as your current working directory
2) you will have the same environment variables as if the user had logged in from a console terminal
3) you will also execute any commands in their $HOME/.bash_profile and other user specific login commands
---------- Post added 01-17-11 at 09:33 AM ----------
Originally Posted by Soji Antony
I read this some where
Here I think you are confusing the word "shell" with the word "prompt". They are entirely different.