Changing Identity(su command)

I am a new Solaris administrator. When you "su" to another person ex: (su - James).  What should I use the root password or my user password to assume a users identity. Neither have been working for me.

Who is Participating?
if you current login as user  gumball60, and do:
su - fred
you need to type in fred's password.

if you login as root or su as root, then
su - fred
you don't need to give any password.

su -

from the current login change to "root", need to give root's password.

man su
to learn more details.
A little more detail that may be missed in the man page.

Running "su - <ID>" will change to that user but also run that user's .profile/.cshrc or whatever.  The - symbol makes this happen.

Just running "su <ID>" changes to that user but does not run that user's .profile/.cshrc or whatever.
to be more exact:
  su - ID  #  is identical to a login (see man su)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.