From: Ian (I.P.Morris@southampton.ac.uk)
Date: 02/10/93


From: Ian <I.P.Morris@southampton.ac.uk>
Subject: Getting a login shell with bash
Date: 10 Feb 1993 07:14:34 -0500

I posted a few weeks ago about getting users nice'd at login. Many of you
suggested that i write a small program which i execute in place of the shell
thats specified in /etc/passwd.

I have done this and it works quite well. All i do is to put an entry in
/etc/nicevals (my creation) that reads user:nicevalue:shell. The program finds
out whether the user now logging in should be niced and if so does so.

The problem is that when i exec the shell certain environment variables don't
get set. I tried starting up the shell (bash) with -login which solves most of
the problem, however certain variables still don't get set (e.g. HOME)

How does login tell bash to set these? I guess it must be parameters but which
ones?

I presume it must be login that tells bash to set these otherwise if login set
them they would be handed down from my program since i am execing the new
shell.

Cheers

Ian.