Yea Team!
Original Post -
I need suggestion on how to set a "front-end" to the users shell. In our
network sometimes (not often) when user login in their home directory is
not mounted for some reason. I would like to be able to check to see if their
home is there before letting them in. I don't want them to go to the /
partition. Most of the time, they don't even see the message about
not having a HOME.
If I could check if their home exists, if not display message and log them out,
else continue into their shell.
Responses -
The reponses fell into two catagories, 1) create a front-end (What I asked for)
or 2) In the /.login add a check to see if / is your home directory.
I went with the #2 option, because
The main problem with a front-end is that most UNIX programs assume that
what they see in the passwd map will actually be a shell, and they'll sometimes run it (eg editors). This might not be a problem to you, but it might drive
some people up the wall and such changes are not guaranteed to work past
your next upgrade. (Reason supplied by Steve Kilbane).
Also, I seem easier to can the .login file.
front-end
Submitted by Mike Maciolek mikem@ll.mit.edu
cd /bin; ln csh -csh
cat <<EOF >/bin/csh_front
#!/bin/sh -
if [ "$HOME" = "/" ]; then
echo ""; echo "No home directory. Login denied."; echo ""
exit
fi
exec /bin/-csh
EOF
chmod 755 /bin/csh_front
Then Change their default login shells to '/bin/csh_front', or
an appropriate alternate front-end for other shells.
-------- /.login --------- Submitted by Robert.Evans@cm.cf.ac.uk
# @(#)login 1.7 89/09/05 SMI
if( ~$user != "/" ) then
echo ""
echo Physics directories are temporarily unavailable.
echo WARNING: Logging in in directory /.
echo Please cd to somewhere sensible.
endif
--------------------------
Other suggestions:
>From Jeff Kays - jkays@msc.edu - try cknfs - which is a program checks
for dead NFS servers. I am still check this out to see
what it can do for me.
I know I didn't do justice for some of your suggestions, they were all great.
Thanks to:
Jeff Kays - jkays@msc.edu
Curt Vandetta - curt@pepe.oce.orst.edu
Mike Maciolek - mikem@ll.mit.edu
Dan Stromberg - strombrg@hydra.acs.uci.edu
John Justin Hough - john@oncology.uthscsa.edu
Steve Philson - philson@nmr.chem.umn.edu
Steve_Kilbane@gec-epl.co.uk
Chris Dale - cccd@frey.newcastle.edu.au
Robert Evans - Robert.Evans@cm.cf.ac.uk
Kevin Sheehan - kevin@uniq.com.au
David T. Bath - dtb@otto.bf.rmit.oz.au
Barry Margolin - barmar@Think.COM
Richard Czech - Richard.Czech@gmd.de
Geert Jan de Groot - geertj@ica.philips.nl
Malcolm C. Strickland - chuck-strickland@orl.mmc.com
Tom Olin - tro@partech.com
Morry Katz katz@rpal.rockwell.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Bill Nolf nolfb@jcdbs.2000.disa.mil
Logicon 703-318-1074 ex-202
1831 Wiehle Ave.
Reston, VA 22090
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:07:48 CDT