Web page hosting, cheap domain name & website promotion services
  

 Home

Red Hat Linux 7.2: The Official Red Hat Linux Customization Guide
PrevChapter 17. Console AccessNext

Enabling Console Access for Other Applications

If you wish to make other applications accessible to console users, you will have to do just a little bit more work.

First of all, console access only works for applications which reside in /sbin or /usr/sbin, so the application that you wish to run must be there. After verifying that, do the following steps:

  1. Create a link from the name of your application, such as our sample foo program, to the /usr/bin/consolehelper application:
    cd /usr/bin
    ln -s consolehelper foo

  2. Create the file /etc/security/console.apps/foo:
    touch /etc/security/console.apps/foo

  3. Create a PAM configuration file for the foo service in /etc/pam.d/. An easy way to do this is to start with a copy of the halt service's PAM configuration file, and then modify the file if you want to change the behavior:
    cp /etc/pam.d/halt /etc/pam.d/foo

Now, when you run /usr/bin/foo, it will call consolehelper, which will authenticate the user with the help of /usr/sbin/userhelper. To authenticate the user, consolehelper will ask for the user's password if /etc/pam.d/foo is a copy of /etc/pam.d/halt (otherwise, it will do precisely what is specified in /etc/pam.d/foo) and then run /usr/sbin/foo with root permissions.


PrevHomeNext
Making Files Accessible From the ConsoleUpThe floppy Group
 

 

 

 

Seosubmit.com: Web site promotion | Domain register and transfer | Buy cheap domain name 

Disclaimer: For authoritative source or latest update to this documentation, please refer to http://www.redhat.com/docs/manuals/linux/

 

 
Quotes: True happiness, we are told, consists in getting out of one's self, but the point is not only to get out, you must stay out; and to stay out you must have some absorbing errand.There are two kinds of taste, the taste for emotions of surprise and the taste for emotions of recognition.Live all you can; it's a mistake not to. It doesn't so much matter what you do in particular, so long as you have your life. If you haven't had that what have you had?