Description Usage Arguments Value Possible Errors Possible Warnings Examples
Get a user's groups
1 |
user |
The name of the user to check groups for. By default this is
|
unsafe |
Set |
The vector of group names to which the user belongs.
"System command failed with status <status>
Command was: groups <user>
The system-level error message (if any) was: ..."
Failure of the system command is caught and reported. E.g. if there
is no system level groups
command.
"groups() is only implemented for unix systems"
Will die with error if .Platform$OS.type != 'unix'.
"User '<user>' ignored; potentially unsafe."
As described above, you must explicitly allow use of the user parameter
by agreeing to run this is an unsafe= TRUE
way.
1 2 3 4 5 6 7 8 9 | groups()
groups( user='root' ) # user ignored, caller's user name used.
groups( user='root', unsafe=TRUE )
# Example of unsafe use.
groups( user=';ls', unsafe=TRUE )
# Imagine if instead of ';ls' an evil user force-deleted, recursive on /
# and R itself ran as root (as it might be poorly configured to do to
# access some secure files...)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.