Forgetting about history in ksh solved

Piercarlo Grandi pcg at aber-cs.UUCP
Sat Apr 1 20:47:03 AEST 1989


In article <2561 at splut.UUCP> jay at splut.UUCP (Jay "you ignorant splut!" Maynard) writes:
    
    Bernie Hoffstadt (cutsys!cutter) had the answer. I had to add the line:
    HISTFILE=/.history; export HISTFILE
    to root's .profile.
    
    Any idea why root would need that, while a normal user wouldn't?

By the way, this is actually documented in the KSH manual. The reason is
fairly obvious:  if you are not careful with your umask (e.g. it is 022 as
on many systems), the /.history file is readable by everybody, and this is
not something you really want. This applies also to other users, but root is
more sensitive, e.g. if root on one systems rlogins on another systems, and
puts the password on the command line etc...

Also, tipically root is a login that ought not to be used much.

(Well, I do use history on the root login on my machine, and make sure that
its permissions are u=rw,og= :->).
-- 
Piercarlo "Peter" Grandi            |  ARPA: pcg%cs.aber.ac.uk at nss.cs.ucl.ac.uk
Dept of CS, UCW Aberystwyth         |  UUCP: ...!mcvax!ukc!aber-cs!pcg
Penglais, Aberystwyth SY23 3BZ, UK  |  INET: pcg at cs.aber.ac.uk



More information about the Comp.unix.microport mailing list