Problem
How can I enable(C) and disable(C) /dev/tty devices as a regular
user instead of as a superuser? When trying to enable and disable
as a regular user, I get the error:Insufficient authorization for attempted operation Solution
You can use the asroot(ADM) command. In order to grant a user
the right to enable and disable tty devices, take the following
steps while logged in as root:1. Since enable and disable are setuid(S) commands, asroot
must run them from a shell script. Create the following files
in the /tcb/files/rootcmds directory:enablewhich should have the line:/usr/bin/enable $*disablewhich should have the line:/usr/bin/disable $*The permissions on both files should be -r-xr-xr-x. You can
change this with the chmod(C) command. Perform this command:chmod 555 enable disablein the /tcb/files/rootcmds directory.2. Edit the file /etc/auth/system/authorize. (See authorize(F)). Find the line that reads:
root:shutdownAdd enable and disable to the end, separated by commas:
root:shutdown,enable,disable3. Go into Account Manager and highlight the user you want to
allow to use enable/disable. From the User menu, choose
Privileges and add execsuid to the list of allowed privileges.Now choose Authorizations from the Users menu and add enable
and disable to the list of allowed authorizations. If enable
and disable do not show on the list, verify the steps in 2).4. When users have been granted enable/disable authorization, they can use the enable/disable commands by running asroot(ADM) with the following syntax:
/tcb/bin/asroot enable tty1ANOTE: To allow a user to enable and disable printers, you only need to
grant them "lp" authorization in Account Manager. They will then
be able to run enable and disable on printers without using asroot. See also
asroot(ADM), enable(C), disable(C)