SU question

Hi all

what the different

and

thanks in adv
jiajin

man su:

"The optional argument - may be used to provide an environment similar to what the user would expect had the user logged in directly."

Hi

If the first argument to su is a dash (-), the environment will be changed to what would be expected if the user actually logged in as the specified user. Otherwise, the environment is passed along, with the exception of $PATH, which is controlled by PATH and SUPATH in /etc/default/su.

Cheers,
Shazin