su.1 750 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. .Dd February 2, 2015
  2. .Dt SU 1
  3. .Os ubase
  4. .Sh NAME
  5. .Nm su
  6. .Nd run a command with a substitute user and group ID
  7. .Sh SYNOPSIS
  8. .Nm
  9. .Op Fl lp
  10. .Op Ar username
  11. .Sh DESCRIPTION
  12. .Nm
  13. allows to run commands with a substitute user and group ID. When called
  14. without arguments,
  15. .Nm
  16. defaults to running an interactive shell as root. For backward compatibility
  17. .Nm
  18. defaults to not change the current directory and to only set the environment
  19. variables
  20. .Ev HOME
  21. and
  22. .Ev SHELL
  23. (plus
  24. .Ev USER
  25. and
  26. .Ev LOGNAME
  27. if the target
  28. .Ar username
  29. is not root).
  30. .Sh OPTIONS
  31. .Bl -tag -width Ds
  32. .It Fl l
  33. Starts the shell as login shell with an environment similar to a real
  34. login.
  35. .It Fl p
  36. Preserves the whole environment. This option is ignored if the
  37. .Fl l
  38. option is specified.
  39. .El