Re: How to disable command prompt history?

2007-06-03 Thread VeeJay

Thank you guys,

Actually, it was for the security reason that if somebody breaks in the
server then he/she doesn't see what commands are being executed, etc,
etc

and I am using /bin/sh

any more comments?

thanks,
VJ


On 6/2/07, Kevin Hunter [EMAIL PROTECTED] wrote:


At 1:56p -0400 on 02 Jun 2007, sac wrote:
 On 6/2/07, Christopher Hilton [EMAIL PROTECTED] wrote:
 VeeJay wrote:
 Could someone would like to describe that how we can disable to show
 last executed commands by pressing Up Arrow?


 That would depend on which shell you are running. Can you run the
 following command and post the results here?

  echo $SHELL

 By default most of the shells like bash, zsh, ksh have history option.
 But you can avoid writing the history of the current session to the
 history file by unsetting the HISTFILE environment variable.
 So next time when you login the history of the previous session will
 not be shown.

I'd be curious as to the underlying why?.  Having a history of what
you've done is generally a Good Thing.  The only reason that I
personally have ever come across to necessitate not storing my actions
is when I'm playing a prank on one of my friends.  Other than that,
having the ability to go see what commands I was executing three years
ago comes in awful handy.  I /could/ recreate that arcane command
sequence for that one-off job I needed 1,237 days ago, or I could do a

history | grep 'substring I remember in command' | less

And, if you're worried about the space it takes to store the history,
don't.  It's extremely negligible.

Kevin





--
Thanks!

BR / vj
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to disable command prompt history?

2007-06-03 Thread [EMAIL PROTECTED]

On 03/06/07, VeeJay [EMAIL PROTECTED] wrote:

Thank you guys,

Actually, it was for the security reason that if somebody breaks in the
server then he/she doesn't see what commands are being executed, etc,
etc

and I am using /bin/sh

any more comments?



I would not have (honestly!) thought that
/bin/sh _when called as such_ would save
a history*.

Glancing at man sh cured me of that notion.



* I mean, it's a primitive piece of crap, in its
own special way, but that's how /bin/sh is
supposed to respond, AFIK? Syntax confu-
sing is, never the same person twice, fnord?

--
--
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to disable command prompt history?

2007-06-03 Thread Kevin Hunter
At 4:42a -0400 on 03 Jun 2007, VeeJay wrote:
 Actually, it was for the security reason that if somebody breaks in the
 server then he/she doesn't see what commands are being executed, etc,
 etc
 
 and I am using /bin/sh
 
 any more comments?

I don't use /bin/sh on a regular basis (bash, for better or worse) so I
can't help you.

From a security standpoint, I'm more wondering what makes you so worried
that someone will break in?  Would some suggestions from the community
about securing your system be helpful?  (I'm no security guru so don't
ask me . . . 8- )

Also, why are you worried about them seeing what commands you've been
running?  My first thought is that at the point a malicious someone has
broken into your system, you have (much) bigger things to worry about.

But, to dumbly answer your question, see if sh looks for ~/.logout.  If
it does, have it remove ~/.history and clear the screen.  Or, if the
order of that doesn't work (if .logout is read /before/ .history is
written), 'chmod 000 .history'.

Best of luck,

Kevin
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to disable command prompt history?

2007-06-03 Thread Norberto Meijome
On Sun, 03 Jun 2007 22:37:59 -0400
Kevin Hunter [EMAIL PROTECTED] wrote:

 Also, why are you worried about them seeing what commands you've been
 running?  My first thought is that at the point a malicious someone has
 broken into your system, you have (much) bigger things to worry about.

good point. I do have this done in my laptop, only because I can :D (and a bit 
harder for someone to know what u're supposed to do to mount the encrypted 
drives big deal :D )

anyway, I just linked ~/.bash_history to /dev/null - history works within the 
current shell, but not once I've exited. Anyway, having multiple shells writing 
to the same history file is always problematic - it never keeps the one you 
really need :-S

_
{Beto|Norberto|Numard} Meijome

He uses statistics as a drunken man uses lamp-posts ... for support rather 
than illumination.
  Andrew Lang (1844-1912)

I speak for myself, not my employer. Contents may be hot. Slippery when wet. 
Reading disclaimers makes you go blind. Writing them is worse. You have been 
Warned.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


How to disable command prompt history?

2007-06-02 Thread VeeJay

Hello there

Could someone would like to describe that how we can disable to show last
executed commands by pressing Up Arrow?

--
Thanks!

BR / vj
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to disable command prompt history?

2007-06-02 Thread Christopher Hilton

VeeJay wrote:

Hello there

Could someone would like to describe that how we can disable to show last
executed commands by pressing Up Arrow?



That would depend on which shell you are running. Can you run the 
following command and post the results here?


echo $SHELL

-- Chris

--
  __o  All I was doing was trying to get home from work.
_`\,_   -Rosa Parks
___(*)/_(*)___
Christopher Sean Hiltonchris | at | vindaloo.com
pgp key: D0957A2D/f5 30 0a e1 55 76 9b 1f 47 0b 07 e9 75 0e 14
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to disable command prompt history?

2007-06-02 Thread sac

On 6/2/07, Christopher Hilton [EMAIL PROTECTED] wrote:

VeeJay wrote:
 Hello there

 Could someone would like to describe that how we can disable to show last
 executed commands by pressing Up Arrow?


That would depend on which shell you are running. Can you run the
following command and post the results here?

 echo $SHELL



By default most of the shells like bash, zsh, ksh have history option.
But you can avoid writing the history of the current session to the
history file by unsetting the HISTFILE environment variable.
So next time when you login the history of the previous session will
not be shown.

sac.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to disable command prompt history?

2007-06-02 Thread Kevin Hunter
At 1:56p -0400 on 02 Jun 2007, sac wrote:
 On 6/2/07, Christopher Hilton [EMAIL PROTECTED] wrote:
 VeeJay wrote:
 Could someone would like to describe that how we can disable to show 
 last executed commands by pressing Up Arrow?

 
 That would depend on which shell you are running. Can you run the 
 following command and post the results here?
 
  echo $SHELL
 
 By default most of the shells like bash, zsh, ksh have history option. 
 But you can avoid writing the history of the current session to the 
 history file by unsetting the HISTFILE environment variable.
 So next time when you login the history of the previous session will
 not be shown.

I'd be curious as to the underlying why?.  Having a history of what
you've done is generally a Good Thing.  The only reason that I
personally have ever come across to necessitate not storing my actions
is when I'm playing a prank on one of my friends.  Other than that,
having the ability to go see what commands I was executing three years
ago comes in awful handy.  I /could/ recreate that arcane command
sequence for that one-off job I needed 1,237 days ago, or I could do a

history | grep 'substring I remember in command' | less

And, if you're worried about the space it takes to store the history,
don't.  It's extremely negligible.

Kevin
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to disable command prompt history?

2007-06-02 Thread 'Anubhav A.'
in message
[EMAIL PROTECTED], wrote
sac thusly...

  VeeJay wrote:
  
   Could someone would like to describe that how we can disable
   to show last executed commands by pressing Up Arrow?
...
  By default most of the shells like bash, zsh, ksh have history
  option.  But you can avoid writing the history of the current
  session to the history file by unsetting the HISTFILE environment
  variable.  So next time when you login the history of the
  previous session will not be shown.

Perhaps so, but to me it seems that OP was asking to turn off the
history recall in the current session itself.  In bash  zsh,
setting HISTSIZE may be of some value.


  - Parv

-- 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]