The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

prevent users from editing or deleting .bash_history

Discussion in 'General Discussion' started by mahinder, Apr 29, 2009.

  1. mahinder

    mahinder Well-Known Member

    Joined:
    Jun 12, 2003
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    matrix
    how do i prevent users from editing or deleting .bash_history file?
     
  2. PlatinumServerM

    PlatinumServerM Well-Known Member
    PartnerNOC

    Joined:
    Jul 10, 2005
    Messages:
    397
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    New Jersey, USA
    cPanel Access Level:
    Root Administrator
  3. mahinder

    mahinder Well-Known Member

    Joined:
    Jun 12, 2003
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    matrix
    i don't want them to be able to manually edit/remove it. I have one suspecious user who ssh on server but his .bash_history is always empty. it appears he is doing something suspicious on server but is .bash_history is always empty hence its obvious that he is removing commands from history file. I want to prevent this.

    can any one help? nick!
     
  4. txmom

    txmom Member

    Joined:
    Apr 29, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    If they can't clear their history, they'll know something's up.

    Can you run a CRON job to periodically copy the file to your location?

    I must say that we want to be careful to preserve their right to privacy.
     
  5. teh

    teh Member

    Joined:
    Jul 13, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    You know, there are ext2/3 file system attributes. There's the append-only flag. Read the manual pages for lsattr and chattr.
     
Loading...

Share This Page