ruser Command

Purpose

Directly manipulates entries in three separate system databases that control foreign host access to programs.

Syntax

To Add or Delete a Database File Name Entry

ruser {  -a |  -d } {  -f "UserName ...| -p "HostName ...|  -r "HostName ..." }

To Delete or Display All Name Entries in a Database File

ruser-X | -s } {  -F | -P | -R } [ -Z ]

Description

The ruser low-level command adds or deletes entries in three separate system databases. Which database you are manipulating is determined by using the -p, -r, or -f flags. In addition, the ruser command can show one or all entries in one of the databases. Each database is a list of names. The three databases are as follows:

You can use the Users application in Web-based System Manager to change user characteristics.

You could also use the System Management Interface Tool (SMIT) smit users fast path to run this command or type:
smit rprint

Flags

Item Description
-a Adds a name to the database. The -a flag must be used with either the -p, -r, or -f flag.
-d Deletes a name from the database. Must be used with either the -p, -r, or -f flag.
-F Deletes or shows all entries in the /etc/ftpusers file. Use this flag with the -X flag to delete all entries. Use this flag with the -s flag to show all entries.
-f "UserName ..." Adds or deletes the user name specified by the UserName variable to the /etc/ftpusers database that contains a list of local user names that cannot be used by remote FTP clients. The -f flag must be used with either the -a or -d flag.
-P Deletes or shows all entries in the /etc/hosts.lpd file. Use this flag with the -X flag to delete all entries. Use this flag with the -s flag to show all entries.
-p "HostName ..." Adds or deletes the host name, specified by the HostName variable, in the database that specifies which foreign host may print on your machine. The -p flag must be used with either the -a or -d flag.
-R Deletes or shows all entries in the /etc/hosts.equiv file. Use this flag with the -X flag to delete all entries. Use this flag with the -s flag to show all entries.
-r "HostName ..." Adds or deletes the host name, specified by the HostName variable, in the /etc/hosts.equiv database that specifies which foreign host may perform the remote commands (rlogin, rcp, rsh, or print) on your machine. The -r flag must be used with either the -a or -d flag.
-s Shows all entries in the database. Use this flag with either the -P, -R, or -F flag.
-X Deletes all names from the database. Use this flag with either the -P, -R, or -F flag.
-Z The -s flag is required when the -Z flag is specified. If the -Z flag is specified, a brief title is displayed before the database display.

Security

Attention RBAC users and Trusted AIX® users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

Examples

  1. To add an entry in the /etc/hosts.lpd database, which specifies which foreign host may print on the local machine, type the command in the following format:

    ruser  -a  -p "host1"

    In this example, the foreign host is host1.
  2. To delete an entry in the database that controls printing only (/etc/hosts.lpd), and also delete the same name from the database that controls remote access for the rlogin, rcp, and rsh commands (/etc/hosts.equiv), type:

    ruser  -d  -r "host2"  -p "host1"

    In this example, the host from which the database entry is deleted is host1.