Re: Environment test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11Oct2007 07:46, Michael Scully <agentscully@xxxxxxxxxxxxxxxxxxxxxx> wrote:
| 	I have users who connect via ssh to run a particular application.
| For those, I have their .bash_profile set to run this application and exit
| when they close it.  But I often need those same users to login at the
| console or via an X-Windows session for other things.  If they try to log in
| via the console or X-client, it will fail because it tries to run this
| application instead.
| 
| 	What environment variable or tty test would work easiest to make
| this "autorun" conditional?  If they are using X and create a terminal
| session somewhere on the desktop, I DO NOT want that one to launch the
| application either.  Thanks in advance.

If it's always "ssh runs the app" and "non-ssh is a normal login", then
put the code to run the app in the "command=" parameter in their
authorized_keys file for their key. (You _are_ requiring them to use a
key to log in, and not a password, yes?) Then remove the code from their
.bash_profile. See "man sshd" under the heading "AUTHORIZED_KEYS FILE
FORMAT".
-- 
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

The best way to rob a bank is to own one.       - Roberto Calvi

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux