RTEMS Logo

RTEMS 4.9.5 On-Line Library


General Commands id - show uid gid euid and egid

PREV UP NEXT Bookshelf RTEMS Shell User's Guide

2.2.5: id - show uid gid euid and egid

SYNOPSYS:

id

DESCRIPTION:

This command prints the user identity. This includes the user id (uid), group id (gid), effective user id (euid), and effective group id (egid).

EXIT STATUS:

This command returns 0 on success and non-zero if an error is encountered.

NOTES:

Remember there is only one POSIX process in a single processor RTEMS application. Each thread may have its own user identity and that identity is used by the filesystem to enforce permissions.

EXAMPLES:

The first example of the id command is from a session logged in as the normal user rtems:

SHLL [/] # id
uid=1(rtems),gid=1(rtems),euid=1(rtems),egid=1(rtems)

The second example of the id command is from a session logged in as the root user:

SHLL [/] # id
uid=0(root),gid=0(root),euid=0(root),egid=0(root)

CONFIGURATION:

This command is included in the default shell command set. When building a custom command set, define CONFIGURE_SHELL_COMMAND_ID to have this command included.

This command can be excluded from the shell command set by defining CONFIGURE_SHELL_NO_COMMAND_ID when all shell commands have been configured.

PROGRAMMING INFORMATION:

The id is implemented by a C language function which has the following prototype:

int rtems_shell_rtems_main_id(
  int    argc,
  char **argv
);

The configuration structure for the id has the following prototype:

extern rtems_shell_cmd_t rtems_shell_ID_Command;


PREV UP NEXT Bookshelf RTEMS Shell User's Guide

Copyright © 1988-2008 OAR Corporation