resmgr

Langue: en

Autres versions - même langue

Version: 08/02/2007 (openSuse - 09/10/07)

Autres sections - même nom

Section: 1 (Commandes utilisateur)

NAME

resmgr - resource manager client

SYNOPSIS

resmgr [-s socket] [-u user] [-t] [command...]

DESCRIPTION

The resmgr command is a command line client for the resource manager daemon resmgrd(8). It passes the specified command to the daemon, and prints the response.

OPTIONS

resmgr understands the following command line options:

-t

By default, resmgr will not include the server's numeric response codes in its output. By using the -t option, you can force resmgr to display the server's response as-is.

-u user

This option can be used by the root user when he wishes to con- tact the resource manager as user. This option is mostly for debugging and testing purposes.

-s socket

specifies the name of the socket on which the resource manager is listening. This option is mostly for debugging and testing purposes.

COMMANDS

Currently, the resource manager protocol supports the following commands, all of which can be performed from the command line using resmgr:

help

Display the list of available commands.

login user tty [rhost=hostname] [service=servicename]

Indicates to the resource manager that user logged in on terminal tty. This will cause the resource manager to create a session record for the, and grant the user access to all resource classes that ACLs he matches.
This command is restricted to the administrator. Usually, the login command is executed by the pam_resmgr module when the user logs in, but you can also use it from the X11 GiveConsole script, for instance.
The syntax of the tty parameter is mostly irrelevant, except that it must be unique. When calling login with a tty name for which a session already exists, the previous session is deleted first. This is intended to increase robustness, when for some reason the logout command was not issued.
Example:

# resmgr login joesix :0

success

logout tty

This will cause the resource manager to delete any session record for the indicated tty, and decrement the reference count on the user record associated with that session. If this was the last session for the user, all access rights for the user are revoked.
This command is restricted to the administrator. Usually, the logout command is executed by the pam_resmgr module when the user logs in, but you can also use it from the X11 TakeConsole script, for instance.

logout

This command lists all currently active sessions. It is restricted to the administrator.

grant user class

This command grants the indicated user access to the resource class class.
This command is restricted to the administrator. Usually, the grant command is executed by the pam_resmgr module when the user logs in, but you can also use it from the X11 GiveConsole script, for instance.
Example:

# resmgr grant joesix modem

success

revoke user [class]

This command revokes a user's access rights to the given class. If no class argument is given, access to all classes is revoked.
this command is restricted to the administrator. It is not very useful, but was added for symmetry with grant.

dump [type]

dumps resmgrd's internal state. The output can be piped into resmgr again to restore the state. For example after restart of the daemon.
Without aguments dump dumps the entire internal state. By passing any of classes, sessions, grants, devices, dynamic-devices or static-devices as type argument the output can be stricted to the specified kind of data.
this command is restricted to the administrator.

SEE ALSO

resmgrd(8) pam_resmgr(8)