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.
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.
Submitted by Mike Maciolek firstname.lastname@example.org
cd /bin; ln csh -csh
cat <<EOF >/bin/csh_front
if [ "$HOME" = "/" ]; then
echo ""; echo "No home directory. Login denied."; echo ""
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 Physics directories are temporarily unavailable.
echo WARNING: Logging in in directory /.
echo Please cd to somewhere sensible.
>From Jeff Kays - email@example.com - 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.
Jeff Kays - firstname.lastname@example.org
Curt Vandetta - email@example.com
Mike Maciolek - firstname.lastname@example.org
Dan Stromberg - email@example.com
John Justin Hough - firstname.lastname@example.org
Steve Philson - email@example.com
Chris Dale - firstname.lastname@example.org
Robert Evans - Robert.Evans@cm.cf.ac.uk
Kevin Sheehan - email@example.com
David T. Bath - firstname.lastname@example.org
Barry Margolin - barmar@Think.COM
Richard Czech - Richard.Czech@gmd.de
Geert Jan de Groot - email@example.com
Malcolm C. Strickland - firstname.lastname@example.org
Tom Olin - email@example.com
Morry Katz firstname.lastname@example.org
Bill Nolf email@example.com
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