• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 297
  • Last Modified:

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.

0
gumball60
Asked:
gumball60
1 Solution
 
yuzhCommented:
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 -
or
su

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

man su
to learn more details.
0
 
NukfrorCommented:
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.
0
 
ahoffmannCommented:
to be more exact:
  su - ID  #  is identical to a login (see man su)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now