Posts Tagged ‘chattr’

Using chattr to Eliminate Command Line Histories

Tuesday, September 9th, 2008

Most distributions use Bash as its default shell. One of the features of Bash is its ability to keep a running history of commands the user has typed. This could, however, end up being a security problem. If a bad guy were able to compromise a user’s home directory, they could view commands the user has executed. In some cases, this could expose improperly used passwords or special privileges available to the user (such as sudo.)
> (more…)

Change Permissions on Password files so no one can change them

Wednesday, May 14th, 2008

The following changes following file permissions, so that nobody can change the account privileges:

chattr +i /etc/passwd
chattr +i /etc/shadow
chattr +i /etc/group
chattr +i /etc/gshadow

See here for further details of the chattr command