[GE users] Environment variables

Ron Chen ron_chen_123 at yahoo.com
Wed Jan 19 09:04:01 GMT 2005


Your OS should support "nologin", just do a "man
nologin".

Note that adding the "nologin" file would also block
interactive SGE login sections (qrsh, qsh, etc, but
batch jobs are fine), and you will need to specify
"-i" in your SGE config to tell rshd to ignore the
file.

BTW, below is the manpage for Linux:
=======================================================
nologin(5) - Linux man page

NAME 
nologin - prevent non-root users from logging into the
system 

DESCRIPTION 
If the file /etc/nologin exists, login(1) will allow
access only to root. Other users will be shown the
contents of this file and their logins will be
refused. 

FILES 
/etc/nologin 
=====================================================

Of course there are many ways, some people prefer to
config a non-existence login shell for the users., and
may be there are other ways to do it with PAM or NIS+.
But nologin seems to be easy enough for me :)

 -Ron


--- "Wheeler, Dr M.D." <mdw10 at leicester.ac.uk> wrote:
> 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
> 
> 



		
__________________________________ 
Do you Yahoo!? 
All your favorites on one personal page ? Try My Yahoo!
http://my.yahoo.com 

---------------------------------------------------------------------
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