[GE users] Environment variables

Wheeler, Dr M.D. mdw10 at leicester.ac.uk
Wed Jan 19 08:47:53 GMT 2005


    [ The following text is in the "iso-8859-1" character set. ]
    [ Your display is set for the "ISO-8859-10" character set.  ]
    [ Some special characters may be displayed incorrectly. ]

Thanks, maybe you could help me further, I am trying to setup a wrapper script that determines whether a user can login to a machine or not (I would like users to be able to have inrteractive access to the frontend machine but not the compute nodes).  So far I have this

#!/bin/bash
#
#wrapper script to provide shell access to frontend
#while denying access to compute nodes
#

FRONTEND_HOSTNAME="my.fqdn.net"

if [ "`hostname`" = "$FRONTEND_HOSTNAME" ] || [ -n "$JOB_ID" ]; then
    #provide a bash login shell
    /bin/bash -l

else
    #politely refuse login and exit
    echo ""
    echo "############################################################################"
    echo "You do not have permission to login on compute node `hostname`"
    echo "############################################################################"
    echo ""
    sleep 1
    exit 0
fi

exit 0

however, while this prevents users from loggin in to a machine, it also seems to be preventing them submitting jobs too.
Any ideas how I might make this work?

Martyn

----------------------------------------------
Dr. Martyn D. Wheeler
Department of Chemistry
University of Leicester
University Road
Leicester, LE1 7RH, UK.
Tel (office): +44 (0)116 252 3985
Tel (lab):    +44 (0)116 252 2115
Fax:          +44 (0)116 252 3789
Email:        martyn.wheeler at le.ac.uk
http://www.le.ac.uk/chemistry/staff/mdw10.html
 

> -----Original Message-----
> From: Ron Chen [mailto:ron_chen_123 at yahoo.com]
> Sent: 19 January 2005 08:35
> To: users at gridengine.sunsource.net
> Subject: Re: [GE users] Environment variables
> 
> 
> I like this one: $JOB_ID
> 
> Actually, there are many variables setup by SGE, you
> can submit a job to print all the env. vars.:
> 
> ==========
> #!/bin/sh
> 
> env
> ==========
> 
>  -Ron
> 
> --- "Wheeler, Dr M.D." <mdw10 at leicester.ac.uk> wrote:
> > Is there a way of distinguishing when a user is
> > running a job on a node via SGE and when a user is
> > simply trying to log in to a node.  Maybe there is
> > an environment variable set up or soemthing?  I'd
> > like to find a simple way of distinguishing between
> > interactive logins and jobs submitted via SGE
> > 
> > Thanks
> > MArtyn
> > 
> > ----------------------------------------------
> > Dr. Martyn D. Wheeler
> > Department of Chemistry
> > University of Leicester
> > University Road
> > Leicester, LE1 7RH, UK.
> > Tel (office): +44 (0)116 252 3985
> > Tel (lab):    +44 (0)116 252 2115
> > Fax:          +44 (0)116 252 3789
> > Email:        martyn.wheeler at le.ac.uk
> > http://www.le.ac.uk/chemistry/staff/mdw10.html
> >  
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > users-unsubscribe at gridengine.sunsource.net
> > For additional commands, e-mail:
> > users-help at gridengine.sunsource.net
> > 
> > 
> 
> 
> 
> 		
> __________________________________ 
> Do you Yahoo!? 
> Yahoo! Mail - 250MB free storage. Do more. Manage less. 
> http://info.mail.yahoo.com/mail_250
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
> For additional commands, e-mail: users-help at gridengine.sunsource.net
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net




More information about the gridengine-users mailing list