[GE users] Environment variables

Ron Chen ron_chen_123 at yahoo.com
Wed Jan 19 09:14:29 GMT 2005


I don't know much about Rocks, may be you can ask
people on the rocks mailing list about /etc/nologin?

And no, you don't need to reinstall SGE, and you don't
even need to restart SGE. Jobs should get the change
when they start up.

 -Ron


--- "Wheeler, Dr M.D." <mdw10 at leicester.ac.uk> wrote:
> Hmmm, here lies the problem I am using Rocks which
> for some reason removes the /etc/nologin file
> everytime the system reboots.
> 
> > batch jobs are fine), and you will need to specify
> > "-i" in your SGE config to tell rshd to ignore the
> 
> does this mean I would have to reinstall SGE?
> 
> Any suggestions welcome...
> 
> 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 09:04
> > To: users at gridengine.sunsource.net
> > Subject: RE: [GE users] Environment variables
> > 
> > 
> > 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
> 
=== message truncated ===



		
__________________________________ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 

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