From owner-freebsd-questions@FreeBSD.ORG Thu Feb 28 13:00:30 2008 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D5E21065673 for ; Thu, 28 Feb 2008 13:00:30 +0000 (UTC) (envelope-from girishvenkatachalam@gmail.com) Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.187]) by mx1.freebsd.org (Postfix) with ESMTP id A7E7C8FC30 for ; Thu, 28 Feb 2008 13:00:29 +0000 (UTC) (envelope-from girishvenkatachalam@gmail.com) Received: by ti-out-0910.google.com with SMTP id j2so2855588tid.3 for ; Thu, 28 Feb 2008 05:00:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:date:from:to:subject:message-id:reply-to:mail-followup-to:mime-version:content-type:content-disposition:user-agent; bh=7qvaOPqODscluP7DhZidT/pATY+ynCuXky0qtqIP5qQ=; b=aXh/bNAiQVffnoT+AtsjIle6sLekq3k3YAFe+/amwfkIz+/T/u+BuRfnmNjhk+BMBeVU2DSNGm2ksJiCbxNPmO5DQapcTFmJ6yq5VN9EJOZVTchl6gzcObvAGZVWZJJ5KAg8R5qykSEVws5KR9UZDrn3CDwy9YycjGL8900EMzs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:reply-to:mail-followup-to:mime-version:content-type:content-disposition:user-agent; b=tzLQDAIGt1dNFq6Gp2QQJUuDNdbqmZCV+C4hGFYC4FzCkBBlkMW70FPU9LlXtGmZCVfcj9fKeuePTj5yhwP65GV/tMPhn+XMxYcc1uh2DOo4FFJ9HKibtcSipALO86kfo/U8YJNr/cg0+QzfWQzgPs83mldM/pYh5dyGgoCNH5g= Received: by 10.151.148.2 with SMTP id a2mr2718947ybo.186.1204201871716; Thu, 28 Feb 2008 04:31:11 -0800 (PST) Received: from saraswathy.madambakam.org ( [59.92.34.39]) by mx.google.com with ESMTPS id b45sm1665899hsa.7.2008.02.28.04.31.07 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 28 Feb 2008 04:31:10 -0800 (PST) Received: by saraswathy.madambakam.org (Postfix, from userid 1002) id 7D30539FF5C; Thu, 28 Feb 2008 18:00:53 +0530 (IST) Date: Thu, 28 Feb 2008 18:00:52 +0530 From: Girish Venkatachalam To: questions@freebsd.org Message-ID: <20080228123052.GA976@saraswathy.madambakam.org> Mail-Followup-To: questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.16 (2007-06-09) Cc: Subject: Making .bash_history non writeable by user? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: girishvenkatachalam@gmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2008 13:00:30 -0000 Hello friends, My friend wants the user commands history file ~/.bash_history to be non writeable by user. He feels that the user should not able to erase the commands entered by him. A reasonable requirement. In case the ~/.bash_history file can also be written to another location that the root alone can access then perhaps we can solve this problem. But AFAIK bash runs as the user process. How can you make the file readable and writeable by root alone? In that case how can the history mechanism function? Do you guys know a way to get around this problem? Thanks. -Girish -- "unix soi qui mal y pense" UNIX to him who evil thinks