no command history with ksh as root?
A. Lester Buck
buck at siswat.UUCP
Tue Feb 13 03:44:41 AEST 1990
In article <720012 at hpcljws.HP.COM>, jws at hpcljws.HP.COM (John Stafford) writes:
> The reason ksh wants HISTFILE set for root is that it is deemed impolite
> to automatically write the history file for a root user. That root user
> might be trying to repair a file system and writing history to that file
> system would be unfriendly.
While this might make some sense, this was not the problem, since ksh was
happily writing my /.sh_history file, it just wouldn't let me edit it.
Thanks to the several people who sent me suggestions that I needed to set
HISTFILE explicitly, and that does solve the access problem. Larry Jones
(scjones at sdrc.uu.net) had the most reasonable guess for this behaviour:
Not having source code I can't say for sure, but it looks to me
like a simple bug in ksh. My guess is it uses
"$HOME/.sh_history" as the name of the history file which, if
you're root, turns out to be "//.sh_history" which don't work too
good.
--
A. Lester Buck buck at siswat.lonestar.org ...!texbell!moray!siswat!buck
More information about the Comp.unix.questions
mailing list