[comp.unix.i386] Strange effects of TZ on su -l

john@design.axis.fr (John H) (05/23/90)

Here is a wierdy I came across a while ago.  I have my "TZ" environment
variable set to:

TZ="HFH-1HFE-2;84/2:00,273/2:00"

So I get DST at the right time here in France.  It works very well.

But!  Whenever I do a "su -l" (or any of the sysadm scripts that do
a "su -l" internaly) I get the error:

	00: Invalid identifier

just after I've entered the password.  Does anyone know what might
be going wrong here?

I see the same effect in 386/ix 2.0.2 and Esix System 5.3.2 Rev. C.

John Hughes.

gemini@geminix.mbx.sub.org (Uwe Doering) (05/28/90)

john@design.axis.fr (John H) writes:

>Here is a wierdy I came across a while ago.  I have my "TZ" environment
>variable set to:

>TZ="HFH-1HFE-2;84/2:00,273/2:00"

>So I get DST at the right time here in France.  It works very well.

>But!  Whenever I do a "su -l" (or any of the sysadm scripts that do
>a "su -l" internaly) I get the error:

>	00: Invalid identifier

>just after I've entered the password.  Does anyone know what might
>be going wrong here?

>I see the same effect in 386/ix 2.0.2 and Esix System 5.3.2 Rev. C.

I've experienced the same problem here in Germany. There seems to be a
bug in `su' that prevents it from working with the long form of the
time zone string. Eventually I gave up and returned to the short form.
It's easier to change this string twice a year than to change it whenever
you want to use `su'. Hope this is fixed in Interactives 2.2 release.

     Uwe
-- 
Uwe Doering   |  Domain   : gemini@geminix.mbx.sub.org
Berlin        |---------------------------------------------------------------
West Germany  |  Bangpath : ...!uunet!pyramid!tub!tmpmbx!geminix!gemini

tneff@bfmny0.BFM.COM (Tom Neff) (05/29/90)

My guess is that the environment setup 'su' does for the child process
includes something of the form

	TZ=$yourtz

without quotes around the variable!

All I can suggest is that you create some cute front end shell script like

	TZ='"'$TZ'"' exec /bin/su $*

and use that instead of 'su'.  It should fool the child's shell.

martin@mwtech.UUCP (Martin Weitzel) (06/02/90)

In article <GU3FQ8L@geminix.mbx.sub.org> gemini@geminix.mbx.sub.org (Uwe Doering) writes:
>john@design.axis.fr (John H) writes:
>
[about problems with certain characters in the "TZ" environment variable]
>
>I've experienced the same problem here in Germany. There seems to be a
>bug in `su' that prevents it from working with the long form of the
>time zone string. Eventually I gave up and returned to the short form.

Me too.

>It's easier to change this string twice a year than to change it whenever
>you want to use `su'. Hope this is fixed in Interactives 2.2 release.

Yes, the price of having a system that doesn't boot - which can also
occur in this situation - is too high.

My "philosphy" in this respect tends to become:

	- let the system run with UTC (also the hardware
	  clock runs with this setting)

	- let every user who wants it set TZ in the ".profile"
	  or ".login"

Eventually I will supply two files with apropriate TZ settings,
and link these files alternately to one standard name when DST
switches. Everyone who likes may then include this standard file
in the login configuration.

Well, not only with respect to the purged DES algorithms, also
concerning timezones we europeans sometimes feel a little like
"second class citizens" if we use "ami-ware" (= american hard-
and software) ... 1/2:-).
-- 
Martin Weitzel, email: martin@mwtech.UUCP, voice: 49-(0)6151-6 56 83