Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 32330

Summary: Propose to add /etc/skel/.bash_logout with clear command
Product: Gentoo Linux Reporter: Gustav Schaffter <gustav.schaffter>
Component: [OLD] baselayoutAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: enhancement CC: clock, Gustav_Schaffter
Priority: High Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Skeleton file for new bash logins

Description Gustav Schaffter 2003-10-30 06:11:17 UTC
Current problem:

When logging out (CLI), the last commands executed and their output remain on
screen. This can be a security issue, like in the following example:

# cat /etc/passwd
# logout

For those that use bash, which I believe counts for a majority of users today,
the problem can be remedied by adding the command "clear" to the ~/.bash_logout
file, thereby also creating the file.

I propose to provide such a file in /etc/skel/ , thereby providing this feature
to all new user accounts created on the local system.

This would create the "clear" feature as a default behavior for all users of the
local system. (As opposed to all users having to create this behavior themself.)


Reproducible: Always
Steps to Reproduce:
1. login
2. cat /etc/passwd
3. logout

X. Add the file .bash_logout with appropriate contents to /etc/skel
Y. Create new user test

A. login test
B. cat /etc/passwd
C. logout

Actual Results:  
After (3), parts of /etc/passwd remains on screen.


Expected Results:  
Adding the new file to /etc/skel in X and creating new user at Y.

The screen is cleared at C.


I believe the file (which I will append) should be added to the
sys-apps/baselayout package.

I'm surpriced it isn't already and realize there may be a real reason for *not*
adding this. If so, I'd very much appreciate to know the reason... ;-)
Comment 1 Gustav Schaffter 2003-10-30 06:14:58 UTC
Created attachment 19979 [details]
Skeleton file for new bash logins

This file should preferrably be added to the sys-apps/baselayout package
and
there be named: /etc/skel/.bash_logout
Comment 2 Jaco Kroon 2003-12-05 01:45:40 UTC
I aggree with all this, except that it should perhaps rather become part of the bash ebuild since not all systems (believe it or not) has bash on it - in which case this would not make much sence.
Comment 3 Aron Griffis (RETIRED) gentoo-dev 2004-09-27 20:20:09 UTC
I've added this to rc-scripts cvs so it will appear in the next baselayout release.

Jaco, you might be right, the bash ebuild might be a better place for this.  But I put this in baselayout for now since the other skel files are already there.  Maybe at some point in the future we'll change it, when there's enough reason to bother...
Comment 4 SpanKY gentoo-dev 2004-10-14 16:02:06 UTC
in baselayout-1.11.2
Comment 5 SpanKY gentoo-dev 2005-04-29 05:59:43 UTC
*** Bug 90724 has been marked as a duplicate of this bug. ***