Securing Systems and Attached Devices in Oracle® Solaris 11.2

Exit Print View

Updated: September 2014
 
 

How to Allocate a Device

Before You Begin

Device allocation must be enabled, as described in How to Enable Device Allocation. If authorization is required, the user must have the authorization.

  1. Allocate the device.

    Specify the device by device name.

    % allocate device-name
  2. Verify that the device is allocated by repeating the command.
    % allocate device-name
    allocate. Device already allocated.
Example 4-5  Allocating a Microphone

In this example, the user jdoe allocates a microphone, audio0.

% whoami
jdoe
% allocate audio0
Example 4-6  Allocating a Printer

In this example, a user allocates a printer. No one else can print to printer-1 until the user deallocates it, or until the printer is forcibly allocated to another user.

% allocate /dev/lp/printer-1

For an example of forcible deallocation, see How to Forcibly Deallocate a Device.

Example 4-7  Allocating a USB Flash Drive

In this example, a user allocates a USB flash drive, rmdisk1.

% allocate rmdisk1

Troubleshooting

If the allocate command cannot allocate the device, an error message is displayed in the console window. For a list of allocation error messages, see the allocate (1) man page.