martes, 17 de julio de 2012

Temporarily Changing User Identity with the su Command

A popular misconception is that the su command is short for super-user; it really just means substitute user. An important but often overlooked distinction is that between su and su -. In the former instance, you become that user but keep your own environmental variables (such as paths). In the latter, you inherit the environment of that user.

This is most noticeable when you use su to become the super-user, root. Without appending the -, you do not inherit the path variable that includes /bin or /sbin, so you must always enter the full path to those commands when you just su to root.



https://help.ubuntu.com/community/RootSudo

No hay comentarios:

Publicar un comentario