Path: utzoo!attcan!uunet!mcvax!ukc!dcl-cs!aber-cs!pcg From: pcg@aber-cs.UUCP (Piercarlo Grandi) Newsgroups: comp.unix.microport Subject: Re: Forgetting about history in ksh solved Summary: History off by default because root is superuser... Message-ID: <797@aber-cs.UUCP> Date: 1 Apr 89 10:47:03 GMT Reply-To: pcg@cs.aber.ac.uk (Piercarlo Grandi) Distribution: eunet,world Organization: Dept of CS, UCW Aberystwyth (Disclaimer: my statements are purely personal) Lines: 23 In article <2561@splut.UUCP> jay@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@nss.cs.ucl.ac.uk Dept of CS, UCW Aberystwyth | UUCP: ...!mcvax!ukc!aber-cs!pcg Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@cs.aber.ac.uk