logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

runuid.8 (2839B)


  1. .\" runuid.8
  2. .\" wcm, 2009.12.11 - 2012.01.04
  3. .\" ===
  4. .TH runuid 8 "January 2013" "runtools-2.07" "runtools"
  5. .SH NAME
  6. runuid \- run a program with specific user and group permissions
  7. .SH SYNOPSIS
  8. .B runuid [\-hV] [\-g
  9. .I group
  10. .B ] [\-s | \-S
  11. .I grplist
  12. .B ]
  13. .I account program
  14. .B [
  15. .I args ...
  16. .B ]
  17. .SH DESCRIPTION
  18. .B runuid
  19. runs
  20. .I program
  21. with the uid and gid set according to the user and group ID of
  22. .IR account .
  23. .PP
  24. If
  25. .I program
  26. does not contain a ``/'' slash character,
  27. .B runuid
  28. will perform a shell-like search for the executable using the
  29. .B PATH
  30. variable in the current environment.
  31. .PP
  32. .B runuid
  33. itself needs root privilege to run.
  34. .SH OPTIONS
  35. .TP
  36. .B \-g group
  37. Group.
  38. Normally
  39. .B runuid
  40. sets the base group permission corresponding to the group ID of the
  41. .IR account .
  42. The
  43. .B \-g
  44. option may be used to specify a different base group permission.
  45. .TP
  46. .B \-h
  47. Help.
  48. Print a brief usage message to stderr and exit.
  49. .TP
  50. .B \-S grplist
  51. Supplemental (listed).
  52. Normally
  53. .B runuid
  54. sets only a single group permission corresponding to the group ID of the
  55. .IR account ,
  56. or as specified with the
  57. .B \-g
  58. option.
  59. The
  60. .B \-S
  61. option will additionally set supplemental group permissions
  62. as given in the
  63. .I grplist
  64. argument,
  65. a colon-delimited list of one or more arbitrary group names as defined in
  66. .IR /etc/group .
  67. The
  68. .B \-S
  69. option and the
  70. .B \-s
  71. option are mutually exclusive.
  72. .TP
  73. .B \-s
  74. Supplemental (/etc/group).
  75. Normally
  76. .B runuid
  77. sets only a single group permission corresponding to the group ID of the
  78. .IR account ,
  79. or as specified with the
  80. .B \-g
  81. option.
  82. The
  83. .B \-s
  84. option will additionally set all supplemental group permissions
  85. defined for the
  86. .I account
  87. in
  88. .I /etc/group
  89. as described in
  90. .BR initgroups (3).
  91. The
  92. .B \-s
  93. option and the
  94. .B \-S
  95. option are mutually exclusive.
  96. .TP
  97. .B \-V
  98. Version.
  99. Print the version number to stderr and exit.
  100. .SH EXIT STATUS
  101. .B runuid
  102. exits with one of the following values:
  103. .TP
  104. 0
  105. .I program
  106. was invoked and completed successfully.
  107. In this case,
  108. the exit code is returned by the
  109. .IR program ,
  110. rather than by
  111. .B runuid
  112. itself.
  113. .TP
  114. 100
  115. .B runuid
  116. failed because of a usage error,
  117. such as an invalid command\-line option or argument.
  118. In this case,
  119. .B runuid
  120. prints a brief error message and usage help to stderr on exit.
  121. .TP
  122. 111
  123. .B runuid
  124. failed due to some system or resource error.
  125. In this case,
  126. .B runuid
  127. prints a brief diagnostic message to stderr on exit.
  128. .TP
  129. 1\-127
  130. .I program
  131. was invoked and failed with its own non-zero exit status.
  132. .SH AUTHOR
  133. Wayne Marshall, http://b0llix.net/perp/
  134. .SH SEE ALSO
  135. .nh
  136. .BR runtools_intro (8),
  137. .BR runargs (8),
  138. .BR runargv0 (8),
  139. .BR runchoom (8),
  140. .BR rundetach (8),
  141. .BR rundeux (8),
  142. .BR runenv (8),
  143. .BR runfile (8),
  144. .BR runlimit (8),
  145. .BR runlock (8),
  146. .BR runpause (8),
  147. .BR runsession (8),
  148. .BR runtool (8),
  149. .BR runtrap (8),
  150. .BR initgroups (3),
  151. .BR setgroups (2)
  152. .\" EOF